[jOOQ/jOOQ#17037] Add BigQuery support for various array functions
This includes: - [jOOQ/jOOQ#17036] Add BigQuery support for arrayGet()
This commit is contained in:
parent
67e6657192
commit
30be9eee28
@ -140,15 +140,29 @@ implements
|
||||
|
||||
@Override
|
||||
public void accept(Context<?> ctx) {
|
||||
switch (ctx.family()) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
accept0(ctx, index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void accept0(Context<?> ctx, Field<?> i) {
|
||||
|
||||
// [#13808] When using an array element reference as a store assignment
|
||||
// target, the parentheses must not be rendered
|
||||
if (array instanceof TableField || Boolean.TRUE.equals(ctx.data(DATA_STORE_ASSIGNMENT)))
|
||||
ctx.visit(array).sql('[').visit(index).sql(']');
|
||||
ctx.visit(array).sql('[').visit(i).sql(']');
|
||||
|
||||
// [#12480] For expressions the parens might be required
|
||||
else
|
||||
ctx.sql('(').visit(array).sql(')').sql('[').visit(index).sql(']');
|
||||
ctx.sql('(').visit(array).sql(')').sql('[').visit(i).sql(']');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user