[jOOQ/jOOQ#14155] Added failing test for BatchSingle
This commit is contained in:
parent
3f1db2bded
commit
3e38d3b0ed
@ -284,14 +284,7 @@ abstract class AbstractQuery<R extends Record> extends AbstractAttachableQueryPa
|
||||
|
||||
// [#385] First time statement preparing
|
||||
else {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ctx.transformQuery(listener);
|
||||
|
||||
listener.renderStart(ctx);
|
||||
rendered = getSQL0(ctx);
|
||||
|
||||
@ -186,7 +186,7 @@ final class BatchSingle extends AbstractBatch implements BatchBindStep {
|
||||
}
|
||||
|
||||
private final int[] executePrepared() {
|
||||
ExecuteContext ctx = new DefaultExecuteContext(configuration, new Query[] { query });
|
||||
DefaultExecuteContext ctx = new DefaultExecuteContext(configuration, new Query[] { query });
|
||||
ExecuteListener listener = ExecuteListeners.get(ctx);
|
||||
Connection connection = ctx.connection();
|
||||
|
||||
@ -195,6 +195,7 @@ final class BatchSingle extends AbstractBatch implements BatchBindStep {
|
||||
try {
|
||||
// [#8968] Keep start() event inside of lifecycle management
|
||||
listener.start(ctx);
|
||||
ctx.transformQuery(listener);
|
||||
|
||||
listener.renderStart(ctx);
|
||||
// [#1520] TODO: Should the number of bind values be checked, here?
|
||||
|
||||
@ -37,6 +37,7 @@
|
||||
*/
|
||||
package org.jooq.impl;
|
||||
|
||||
import static java.lang.Boolean.TRUE;
|
||||
import static org.jooq.conf.SettingsTools.renderLocale;
|
||||
import static org.jooq.impl.Tools.EMPTY_INT;
|
||||
import static org.jooq.impl.Tools.EMPTY_QUERY;
|
||||
@ -66,6 +67,7 @@ import org.jooq.DDLQuery;
|
||||
import org.jooq.DSLContext;
|
||||
import org.jooq.Delete;
|
||||
import org.jooq.ExecuteContext;
|
||||
import org.jooq.ExecuteListener;
|
||||
import org.jooq.ExecuteType;
|
||||
import org.jooq.Insert;
|
||||
import org.jooq.Merge;
|
||||
@ -757,5 +759,24 @@ class DefaultExecuteContext implements ExecuteContext {
|
||||
|
||||
@Override
|
||||
public final void release(Connection c) {}
|
||||
}
|
||||
|
||||
|
||||
final void transformQuery(ExecuteListener listener) {
|
||||
|
||||
|
||||
|
||||
|
||||
if (TRUE.equals(settings().isTransformPatterns()) && configuration().requireCommercial(() -> "SQL transformations are a commercial only feature. Please consider upgrading to the jOOQ Professional Edition or jOOQ Enterprise Edition.")) {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user