diff --git a/jOOQ/src/main/java/org/jooq/impl/Function.java b/jOOQ/src/main/java/org/jooq/impl/Function.java index 6ef0123d9c..e84ee59c80 100644 --- a/jOOQ/src/main/java/org/jooq/impl/Function.java +++ b/jOOQ/src/main/java/org/jooq/impl/Function.java @@ -594,51 +594,37 @@ class Function extends AbstractField implements if (distinct) if (args.size() > 1 && SUPPORT_DISTINCT_RVE.contains(ctx.family())) ctx.sql(')'); - - if (ctx.family() != H2) { - if (TRUE.equals(fromLast)) - ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_LAST); - else if (FALSE.equals(fromLast)) - ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_FIRST); - - if (TRUE.equals(ignoreNulls)) { - switch (ctx.family()) { - - - - - - default: - ctx.sql(' ').visit(K_IGNORE_NULLS); - break; - } - } - else if (FALSE.equals(ignoreNulls)) { - switch (ctx.family()) { - - - - - - default: - ctx.sql(' ').visit(K_RESPECT_NULLS); - break; - } - } - } } final void toSQLArguments2(Context ctx) { - if (ctx.family() == H2) { - if (TRUE.equals(fromLast)) - ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_LAST); - else if (FALSE.equals(fromLast)) - ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_FIRST); + if (TRUE.equals(fromLast)) + ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_LAST); + else if (FALSE.equals(fromLast)) + ctx.sql(' ').visit(K_FROM).sql(' ').visit(K_FIRST); - if (TRUE.equals(ignoreNulls)) - ctx.sql(' ').visit(K_IGNORE_NULLS); - else if (FALSE.equals(ignoreNulls)) - ctx.sql(' ').visit(K_RESPECT_NULLS); + if (TRUE.equals(ignoreNulls)) { + switch (ctx.family()) { + + + + + + default: + ctx.sql(' ').visit(K_IGNORE_NULLS); + break; + } + } + else if (FALSE.equals(ignoreNulls)) { + switch (ctx.family()) { + + + + + + default: + ctx.sql(' ').visit(K_RESPECT_NULLS); + break; + } } }