[jOOQ/jOOQ#16340] DefaultRenderContext::peekIndex doesn't contain correct bind index
This commit is contained in:
parent
5a5b52b4d8
commit
e99c73b762
@ -736,6 +736,9 @@ class DefaultRenderContext extends AbstractContext<RenderContext> implements Ren
|
||||
Param<?> param = (Param<?>) internal;
|
||||
|
||||
if (!param.isInline()) {
|
||||
|
||||
// [#16340] Increment index even if we don't need it internally, while rendering
|
||||
nextIndex();
|
||||
bindValues.add(param);
|
||||
|
||||
Integer threshold = settings().getInlineThreshold();
|
||||
|
||||
@ -351,7 +351,7 @@ final class Val<T> extends AbstractParam<T> implements UEmpty {
|
||||
@NotNull
|
||||
final String getBindVariable(Context<?> ctx) {
|
||||
if (ctx.paramType() == NAMED || ctx.paramType() == NAMED_OR_INLINED) {
|
||||
int index = ctx.nextIndex();
|
||||
int index = ctx.peekIndex();
|
||||
String prefix = defaultIfNull(ctx.settings().getRenderNamedParamPrefix(), ":");
|
||||
|
||||
if (StringUtils.isBlank(getParamName()))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user