parent
fc4860accc
commit
b19d8ef9b6
@ -666,7 +666,7 @@ predicate =
|
||||
| 'IN' '(' ( select | fields ) ')'
|
||||
| 'BETWEEN' [ 'SYMMETRIC' ] concat 'AND' concat
|
||||
| ( 'REGEXP' | 'RLIKE' | 'LIKE_REGEX' ) concat
|
||||
| 'LIKE' concat [ 'ESCAPE' characterLiteral ]
|
||||
| ( 'LIKE' | 'ILIKE' ) concat [ 'ESCAPE' characterLiteral ]
|
||||
| 'SIMILAR' 'TO' concat [ 'ESCAPE' characterLiteral ]
|
||||
)
|
||||
| '@>' concat
|
||||
|
||||
@ -4338,6 +4338,18 @@ final class ParserImpl implements Parser {
|
||||
? ((Field) left).notLike(right)
|
||||
: ((Field) left).like(right);
|
||||
}
|
||||
else if (left instanceof Field && parseKeywordIf(ctx, "ILIKE")) {
|
||||
Field right = toField(ctx, parseConcat(ctx, null));
|
||||
boolean escape = parseKeywordIf(ctx, "ESCAPE");
|
||||
char character = escape ? parseCharacterLiteral(ctx) : ' ';
|
||||
return escape
|
||||
? not
|
||||
? ((Field) left).notLikeIgnoreCase(right, character)
|
||||
: ((Field) left).likeIgnoreCase(right, character)
|
||||
: not
|
||||
? ((Field) left).notLikeIgnoreCase(right)
|
||||
: ((Field) left).likeIgnoreCase(right);
|
||||
}
|
||||
else if (left instanceof Field && (parseKeywordIf(ctx, "REGEXP")
|
||||
|| parseKeywordIf(ctx, "RLIKE")
|
||||
|| parseKeywordIf(ctx, "LIKE_REGEX"))) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user