diff --git a/jOOQ/src/main/java/org/jooq/Context.java b/jOOQ/src/main/java/org/jooq/Context.java index 45adb69691..e7800d45cb 100644 --- a/jOOQ/src/main/java/org/jooq/Context.java +++ b/jOOQ/src/main/java/org/jooq/Context.java @@ -406,7 +406,11 @@ public interface Context> extends Scope { /** * Start indenting subsequent SQL at the same level as the current line, if * {@link Settings#isRenderFormatted()} is set to true. + * + * @deprecated - [#10317] - 3.14.0 - Do not reuse this method. It will be + * removed without replacement. */ + @Deprecated @NotNull C formatIndentLockStart(); @@ -430,7 +434,11 @@ public interface Context> extends Scope { /** * Stop indenting subsequent SQL at the same level as the current line, if * {@link Settings#isRenderFormatted()} is set to true. + * + * @deprecated - [#10317] - 3.14.0 - Do not reuse this method. It will be + * removed without replacement. */ + @Deprecated @NotNull C formatIndentLockEnd(); diff --git a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java index d939e49143..66172a8f6d 100644 --- a/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/InsertQueryImpl.java @@ -409,10 +409,10 @@ final class InsertQueryImpl extends AbstractStoreQuery impl .visit(K_DO_UPDATE) .formatSeparator() .visit(K_SET) - .sql(' ') - .formatIndentLockStart() + .formatIndentStart() + .formatSeparator() .visit(updateMap) - .formatIndentLockEnd(); + .formatIndentEnd(); if (condition.hasWhere()) ctx.formatSeparator() diff --git a/jOOQ/src/main/java/org/jooq/impl/UpdateQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/UpdateQueryImpl.java index b011d07681..42bca2b888 100644 --- a/jOOQ/src/main/java/org/jooq/impl/UpdateQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/UpdateQueryImpl.java @@ -549,7 +549,7 @@ final class UpdateQueryImpl extends AbstractStoreQuery impl ctx.formatSeparator() .start(UPDATE_SET) .visit(K_SET) - .sql(' '); + .separatorRequired(true); // A multi-row update was specified if (multiRow != null) { @@ -565,9 +565,10 @@ final class UpdateQueryImpl extends AbstractStoreQuery impl map.put(k, Tools.field(v, k)); } - ctx.formatIndentLockStart() + ctx.formatIndentStart() + .formatSeparator() .visit(map) - .formatIndentLockEnd(); + .formatIndentEnd(); } else { boolean qualify = ctx.qualify(); @@ -610,9 +611,10 @@ final class UpdateQueryImpl extends AbstractStoreQuery impl // A regular (non-multi-row) update was specified else { - ctx.formatIndentLockStart() + ctx.formatIndentStart() + .formatSeparator() .visit(updateMap) - .formatIndentLockEnd(); + .formatIndentEnd(); } ctx.end(UPDATE_SET);