diff --git a/project/gradle.properties b/project/gradle.properties index b16bd7aaa1..f099a0b1dc 100644 --- a/project/gradle.properties +++ b/project/gradle.properties @@ -1,2 +1,2 @@ group=org.babyfish.jimmer -version=0.9.18 +version=0.9.19 diff --git a/project/jimmer-spring-boot-starter/src/main/java/org/babyfish/jimmer/spring/repo/PageParam.java b/project/jimmer-spring-boot-starter/src/main/java/org/babyfish/jimmer/spring/repo/PageParam.java index 06518f3b01..29e8ecbdd8 100644 --- a/project/jimmer-spring-boot-starter/src/main/java/org/babyfish/jimmer/spring/repo/PageParam.java +++ b/project/jimmer-spring-boot-starter/src/main/java/org/babyfish/jimmer/spring/repo/PageParam.java @@ -11,6 +11,12 @@ private PageParam(int index, int size) { this.size = size; } + /** + * Construct page param by page index and page size + * @param index Start from 0 + * @param size Must be greater than or equal to 0 + * @return A new page param object + */ public static PageParam byIndex(int index, int size) { if (index < 0) { throw new IllegalArgumentException("index cannot be negative"); @@ -21,6 +27,12 @@ public static PageParam byIndex(int index, int size) { return new PageParam(index, size); } + /** + * Construct page param by page number and page size + * @param no Start from 1 + * @param size Must be greater than or equal to 0 + * @return A new page param object + */ public static PageParam byNo(int no, int size) { if (no < 0) { throw new IllegalArgumentException("no must be negative"); diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractMutationTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractMutationTest.kt index 842107ce2c..0f6d4deca5 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractMutationTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractMutationTest.kt @@ -1,6 +1,6 @@ package org.babyfish.jimmer.sql.kt.common -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.ast.mutation.MutationResultItem import org.babyfish.jimmer.sql.kt.ast.KExecutable import org.babyfish.jimmer.sql.kt.ast.mutation.KBatchSaveResult diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractTest.kt index a8386e4c99..7775a9f8ae 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/common/AbstractTest.kt @@ -4,7 +4,7 @@ import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule import org.babyfish.jimmer.jackson.ImmutableModule import org.babyfish.jimmer.meta.ImmutableProp -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.kt.KSqlClient import org.babyfish.jimmer.sql.kt.cfg.KSqlClientDsl import org.babyfish.jimmer.sql.kt.newKSqlClient diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteTest.kt index b86c9c73fa..6f3dc1a996 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteTest.kt @@ -1,6 +1,6 @@ package org.babyfish.jimmer.sql.kt.filter -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.kt.common.AbstractMutationTest import org.babyfish.jimmer.sql.kt.filter.common.FileFilter import org.babyfish.jimmer.sql.kt.model.filter.File diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteWithTriggerTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteWithTriggerTest.kt index 028fa87029..66a758b114 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteWithTriggerTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/DeleteWithTriggerTest.kt @@ -1,6 +1,6 @@ package org.babyfish.jimmer.sql.kt.filter -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.kt.common.AbstractTriggerTest import org.babyfish.jimmer.sql.kt.filter.common.FileFilter import org.babyfish.jimmer.sql.kt.model.filter.File diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveTest.kt index 5f377956ab..50b3e949d2 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveTest.kt @@ -1,7 +1,7 @@ package org.babyfish.jimmer.sql.kt.filter import org.babyfish.jimmer.kt.new -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.collection.TypedList import org.babyfish.jimmer.sql.dialect.H2Dialect import org.babyfish.jimmer.sql.kt.KSqlClient diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveWithTriggerTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveWithTriggerTest.kt index 02e0a1c4ac..544d6e8573 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveWithTriggerTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/filter/SaveWithTriggerTest.kt @@ -1,7 +1,7 @@ package org.babyfish.jimmer.sql.kt.filter import org.babyfish.jimmer.kt.new -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.kt.KSqlClient import org.babyfish.jimmer.sql.kt.cfg.KSqlClientDsl import org.babyfish.jimmer.sql.kt.common.AbstractTriggerTest diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/DMLTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/DMLTest.kt index 6644fc5aee..565124b80f 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/DMLTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/DMLTest.kt @@ -1,10 +1,9 @@ package org.babyfish.jimmer.sql.kt.mutation -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.ast.mutation.DeleteMode import org.babyfish.jimmer.sql.kt.ast.expression.* import org.babyfish.jimmer.sql.kt.common.AbstractMutationTest -import org.babyfish.jimmer.sql.kt.model.* import org.babyfish.jimmer.sql.kt.model.classic.author.firstName import org.babyfish.jimmer.sql.kt.model.classic.book.Book import org.babyfish.jimmer.sql.kt.model.classic.book.authors diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/InheritanceMutationTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/InheritanceMutationTest.kt index 6baa9db00c..88b3a1bb22 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/InheritanceMutationTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/mutation/InheritanceMutationTest.kt @@ -3,7 +3,7 @@ package org.babyfish.jimmer.sql.kt.mutation import org.babyfish.jimmer.kt.isLoaded import org.babyfish.jimmer.kt.new import org.babyfish.jimmer.sql.DraftInterceptor -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.kt.KSqlClient import org.babyfish.jimmer.sql.kt.common.AbstractMutationTest import org.babyfish.jimmer.sql.kt.common.PreparedIdGenerator diff --git a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/o2o/O2OMutationTest.kt b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/o2o/O2OMutationTest.kt index 7f20871af7..f27cb5aa74 100644 --- a/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/o2o/O2OMutationTest.kt +++ b/project/jimmer-sql-kotlin/src/test/kotlin/org/babyfish/jimmer/sql/kt/o2o/O2OMutationTest.kt @@ -1,6 +1,6 @@ package org.babyfish.jimmer.sql.kt.o2o -import org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason +import org.babyfish.jimmer.sql.ast.mutation.QueryReason import org.babyfish.jimmer.sql.dialect.H2Dialect import org.babyfish.jimmer.sql.kt.common.AbstractMutationTest import org.babyfish.jimmer.sql.kt.model.o2o.Customer diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/AbstractAssociationOperator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/AbstractAssociationOperator.java index 9f2ef52d3f..d82beae75d 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/AbstractAssociationOperator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/AbstractAssociationOperator.java @@ -2,6 +2,7 @@ import org.babyfish.jimmer.meta.ImmutableProp; import org.babyfish.jimmer.sql.ast.impl.render.BatchSqlBuilder; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.tuple.Tuple2; import org.babyfish.jimmer.sql.ast.tuple.Tuple3; import org.babyfish.jimmer.sql.meta.MiddleTable; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/ChildTableOperator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/ChildTableOperator.java index 10214652e4..54259f283e 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/ChildTableOperator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/ChildTableOperator.java @@ -15,6 +15,7 @@ import org.babyfish.jimmer.sql.ast.impl.render.BatchSqlBuilder; import org.babyfish.jimmer.sql.ast.impl.render.ComparisonPredicates; import org.babyfish.jimmer.sql.ast.impl.value.ValueGetter; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.query.ConfigurableRootQuery; import org.babyfish.jimmer.sql.ast.table.Table; import org.babyfish.jimmer.sql.ast.tuple.Tuple2; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/EntityInvestigator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/EntityInvestigator.java index 474d4f718f..e77eb9668b 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/EntityInvestigator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/EntityInvestigator.java @@ -2,6 +2,7 @@ import org.babyfish.jimmer.meta.*; import org.babyfish.jimmer.runtime.ImmutableSpi; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.fetcher.Fetcher; import org.babyfish.jimmer.sql.fetcher.IdOnlyFetchType; import org.babyfish.jimmer.sql.fetcher.impl.FetcherImpl; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableInvestigator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableInvestigator.java index 5a862fd0d3..bad14b1346 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableInvestigator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableInvestigator.java @@ -3,6 +3,7 @@ import org.babyfish.jimmer.meta.ImmutableType; import org.babyfish.jimmer.meta.PropId; import org.babyfish.jimmer.runtime.ImmutableSpi; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.tuple.Tuple2; import org.babyfish.jimmer.sql.fetcher.Fetcher; import org.babyfish.jimmer.sql.fetcher.impl.FetcherImpl; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableOperator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableOperator.java index b232edda6f..af9d0c6452 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableOperator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MiddleTableOperator.java @@ -11,6 +11,7 @@ import org.babyfish.jimmer.sql.ast.impl.value.GetterMetadata; import org.babyfish.jimmer.sql.ast.impl.value.ValueGetter; import org.babyfish.jimmer.sql.ast.mutation.AffectedTable; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.tuple.Tuple2; import org.babyfish.jimmer.sql.ast.tuple.Tuple3; import org.babyfish.jimmer.sql.dialect.Dialect; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MutableDeleteImpl.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MutableDeleteImpl.java index 3f7a78abd8..864842debe 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MutableDeleteImpl.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/MutableDeleteImpl.java @@ -15,6 +15,7 @@ import org.babyfish.jimmer.sql.ast.impl.table.TableImplementor; import org.babyfish.jimmer.sql.ast.mutation.DeleteMode; import org.babyfish.jimmer.sql.ast.mutation.MutableDelete; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.table.Table; import org.babyfish.jimmer.sql.ast.table.TableEx; import org.babyfish.jimmer.sql.ast.table.spi.TableProxy; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Operator.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Operator.java index 66f7d7ca6b..b61e86605f 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Operator.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Operator.java @@ -13,6 +13,7 @@ import org.babyfish.jimmer.sql.ast.impl.table.TableImplementor; import org.babyfish.jimmer.sql.ast.impl.value.PropertyGetter; import org.babyfish.jimmer.sql.ast.impl.value.ValueGetter; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.mutation.UnloadedVersionBehavior; import org.babyfish.jimmer.sql.ast.mutation.UserOptimisticLock; import org.babyfish.jimmer.sql.ast.table.Table; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/PreHandler.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/PreHandler.java index 77a4d5d8bf..25c6330371 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/PreHandler.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/PreHandler.java @@ -12,6 +12,7 @@ import org.babyfish.jimmer.sql.ast.impl.query.MutableRootQueryImpl; import org.babyfish.jimmer.sql.ast.impl.util.ConcattedIterator; import org.babyfish.jimmer.sql.ast.impl.value.PropertyGetter; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.mutation.SaveMode; import org.babyfish.jimmer.sql.ast.mutation.UnloadedVersionBehavior; import org.babyfish.jimmer.sql.ast.mutation.UserOptimisticLock; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Rows.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Rows.java index fb4633e9f5..f831e9eb36 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Rows.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/Rows.java @@ -7,12 +7,12 @@ import org.babyfish.jimmer.sql.ast.impl.query.FilterLevel; import org.babyfish.jimmer.sql.ast.impl.query.Queries; import org.babyfish.jimmer.sql.ast.mutation.LockMode; +import org.babyfish.jimmer.sql.ast.mutation.QueryReason; import org.babyfish.jimmer.sql.ast.query.MutableQuery; import org.babyfish.jimmer.sql.ast.table.Table; import org.babyfish.jimmer.sql.fetcher.Fetcher; import org.babyfish.jimmer.sql.runtime.ExecutionPurpose; import org.babyfish.jimmer.sql.runtime.JSqlClientImplementor; -import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.sql.Connection; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/QueryReason.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/QueryReason.java similarity index 99% rename from project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/QueryReason.java rename to project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/QueryReason.java index ae7cda332f..cf77403b2d 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/impl/mutation/QueryReason.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/QueryReason.java @@ -1,4 +1,4 @@ -package org.babyfish.jimmer.sql.ast.impl.mutation; +package org.babyfish.jimmer.sql.ast.mutation; import org.babyfish.jimmer.sql.KeyUniqueConstraint; import org.babyfish.jimmer.sql.dialect.Dialect; diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/SaveMode.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/SaveMode.java index 9d87a59f4b..2efc2df21b 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/SaveMode.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/mutation/SaveMode.java @@ -23,7 +23,7 @@ public enum SaveMode { *
In this case, the {@code purpose} field of the * corresponding SQL statement in the SQL log will * provide the query reason. Users can refer to - * {@link org.babyfish.jimmer.sql.ast.impl.mutation.QueryReason} + * {@link QueryReason} * to understand what happened, in an effort to * optimize to the former situation.
* diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/query/ConfigurableRootQuery.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/query/ConfigurableRootQuery.java index 8cb9f25155..4f51d7a851 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/query/ConfigurableRootQuery.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/ast/query/ConfigurableRootQuery.java @@ -56,7 +56,8 @@ default boolean exists() { default boolean exists(Connection con) { return !limit(1, 0L) .reselect((q, t) -> q.select(Expression.constant(1))) - .execute(con).isEmpty(); + .execute(con) + .isEmpty(); } @NotNull diff --git a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/dialect/PostgresDialect.java b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/dialect/PostgresDialect.java index 5e7de2e182..403dea9e81 100644 --- a/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/dialect/PostgresDialect.java +++ b/project/jimmer-sql/src/main/java/org/babyfish/jimmer/sql/dialect/PostgresDialect.java @@ -235,7 +235,7 @@ public void upsert(UpsertContext ctx) { ctx.sql(" returning ").appendGeneratedId(); } } else if (ctx.hasGeneratedId()) { - ctx.sql(" do update set ").sql(FAKE_UPDATE_COMMENT).sql(" "); + ctx.sql(" do update set "); List