Skip to content

Commit

Permalink
[#6485] Support parsing JDBC escape syntax for {fn ... } calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Jan 15, 2018
1 parent 6ffc6c5 commit cf33bfd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion jOOQ/src/main/java/org/jooq/impl/ParserImpl.java
Expand Up @@ -3251,7 +3251,7 @@ else if (this == MINUS)
private static final FieldOrRow parseTerm(ParserContext ctx, Type type) { private static final FieldOrRow parseTerm(ParserContext ctx, Type type) {
parseWhitespaceIf(ctx); parseWhitespaceIf(ctx);


Field<?> field; FieldOrRow field;
Object value; Object value;


switch (ctx.character()) { switch (ctx.character()) {
Expand Down Expand Up @@ -3656,6 +3656,15 @@ else if ((field = parseFieldTimeLiteralIf(ctx)) != null)
field = inline(parseDateLiteral(ctx)); field = inline(parseDateLiteral(ctx));
break; 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':
case 'T': case 'T':
if (parseKeywordIf(ctx, "TS")) { if (parseKeywordIf(ctx, "TS")) {
Expand Down

0 comments on commit cf33bfd

Please sign in to comment.