[#7518] [#8401] Add support for Oracle REGEXP_LIKE

This commit is contained in:
lukaseder 2019-03-26 14:41:10 +01:00
parent d6ef24811f
commit fc4860accc
2 changed files with 9 additions and 0 deletions

View File

@ -674,6 +674,7 @@ predicate =
| concat '*=' concat
| concat '=*' concat
| row2 'OVERLAPS' row2
| 'REGEXP_LIKE' '(' concat ',' concat ')'
;
row2 = [ 'ROW' ] '(' field ',' field ')'

View File

@ -4191,7 +4191,15 @@ final class ParserImpl implements Parser {
return exists(select);
}
else if (parseKeywordIf(ctx, "REGEXP_LIKE")) {
parse(ctx, '(');
Field<?> f1 = parseField(ctx);
parse(ctx, ',');
Field<?> f2 = parseField(ctx);
parse(ctx, ')');
return f1.likeRegex((Field) f2);
}
else {
FieldOrRow left;
Comparator comp;