[jOOQ/jOOQ#9134] Fix NTH_VALUE() [ FROM { FIRST | LAST } ] rendering
The `NTH_VALUE() [ FROM { FIRST | LAST } ]` clause is rendered the same
for all dialects.
This commit is contained in:
parent
eaf48e48ef
commit
a3f25af543
@ -594,51 +594,37 @@ class Function<T> extends AbstractField<T> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user