[#6485] Support parsing JDBC escape syntax for {fn ... } calls

This commit is contained in:
lukaseder 2018-01-15 13:21:52 +01:00
parent 6ffc6c5afa
commit cf33bfd90c

View File

@ -3251,7 +3251,7 @@ final class ParserImpl implements Parser {
private static final FieldOrRow parseTerm(ParserContext ctx, Type type) {
parseWhitespaceIf(ctx);
Field<?> field;
FieldOrRow field;
Object value;
switch (ctx.character()) {
@ -3656,6 +3656,15 @@ final class ParserImpl implements Parser {
field = inline(parseDateLiteral(ctx));
break;
case 'f':
case 'F':
parseKeyword(ctx, "FN");
// TODO: Limit the supported expressions in this context to the ones specified here:
// http://download.oracle.com/otn-pub/jcp/jdbc-4_2-mrel2-eval-spec/jdbc4.2-fr-spec.pdf
field = parseTerm(ctx, type);
break;
case 't':
case 'T':
if (parseKeywordIf(ctx, "TS")) {