[jOOQ/jOOQ#11265] Internal DataKey.DATA_PREPEND_SQL functionality should
be cumulative
This commit is contained in:
parent
4672fc15bc
commit
50c32272e9
@ -176,7 +176,7 @@ final class ForLock extends AbstractQueryPart {
|
||||
|
||||
// [#11243] PostgreSQL FOR UPDATE WAIT <n> emulation
|
||||
if (forLockWaitMode == ForLockWaitMode.WAIT && EMULATE_FOR_UPDATE_WAIT.contains(ctx.dialect())) {
|
||||
prependSQL(ctx.skipUpdateCount(), ctx.dsl().queries(ctx.dsl().setLocal(N_LOCK_TIMEOUT, inline(forLockWait * 1000))));
|
||||
prependSQL(ctx.skipUpdateCount(), ctx.dsl().setLocal(N_LOCK_TIMEOUT, inline(forLockWait * 1000)));
|
||||
}
|
||||
else {
|
||||
ctx.sql(' ').visit(forLockWaitMode.toKeyword());
|
||||
|
||||
@ -5070,9 +5070,9 @@ final class Tools {
|
||||
return VARCHAR(length).nullability(type.nullability()).defaultValue((Field) type.defaultValue());
|
||||
}
|
||||
|
||||
static <C extends Context<? extends C>> C prependSQL(C ctx, Queries queries) {
|
||||
static <C extends Context<? extends C>> C prependSQL(C ctx, Query... queries) {
|
||||
ctx.data().compute(DataKey.DATA_PREPEND_SQL, (k, v) -> {
|
||||
String sql = ctx.dsl().renderInlined(queries);
|
||||
String sql = ctx.dsl().renderInlined(ctx.dsl().queries(queries));
|
||||
|
||||
if (v == null)
|
||||
return sql;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user