From c2c5cd72afde5e5cc0a50a67144c856f4e484a5d Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Tue, 30 May 2023 10:56:54 +0200 Subject: [PATCH] [jOOQ/jOOQ#3862] Improve Javadoc on DSLContext.executeInsert(), executeUpdate(), and executeDelete() about optimistic locking not applying --- jOOQ/src/main/java/org/jooq/DSLContext.java | 59 ++++++++++++++++++--- 1 file changed, 51 insertions(+), 8 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/DSLContext.java b/jOOQ/src/main/java/org/jooq/DSLContext.java index d8c6577c29..45b1e4b34c 100644 --- a/jOOQ/src/main/java/org/jooq/DSLContext.java +++ b/jOOQ/src/main/java/org/jooq/DSLContext.java @@ -14795,13 +14795,20 @@ public interface DSLContext extends Scope { /** * Insert one record. *

- * This executes something like the following statement: - *

INSERT INTO [table] … VALUES [record] 
+ * This executes the following statement: + * + *
+     * INSERT INTO [table] ([modified columns in record])
+     * VALUES ([modified values in record])
+     * 
*

- * Unlike {@link UpdatableRecord#store()}, this does not change any of the + * Unlike {@link UpdatableRecord#insert()}, this does not change any of the * argument record's internal "changed" flags, such that a - * subsequent call to {@link UpdatableRecord#store()} might lead to another + * subsequent call to {@link UpdatableRecord#insert()} might lead to another * INSERT statement being executed. + *

+ * Also any optimistic locking related {@link Settings} do not apply for + * this method. * * @return The number of inserted records * @throws DataAccessException if something went wrong executing the query @@ -14812,7 +14819,17 @@ public interface DSLContext extends Scope { /** * Update a table. - *

UPDATE [table] SET [modified values in record] WHERE [record is supplied record] 
+ *

+ * This executes the following statement: + * + *

+     * UPDATE [table]
+     * SET [modified values in record]
+     * WHERE [record is supplied record]
+     * 
+ *

+ * Any optimistic locking related {@link Settings} do not apply for this + * method. * * @return The number of updated records * @throws DataAccessException if something went wrong executing the query @@ -14823,7 +14840,17 @@ public interface DSLContext extends Scope { /** * Update a table. - *

UPDATE [table] SET [modified values in record] WHERE [condition]
+ *

+ * This executes the following statement: + * + *

+     * UPDATE [table]
+     * SET [modified values in record]
+     * WHERE [condition]
+     * 
+ *

+ * Any optimistic locking related {@link Settings} do not apply for this + * method. * * @return The number of updated records * @throws DataAccessException if something went wrong executing the query @@ -14834,7 +14861,15 @@ public interface DSLContext extends Scope { /** * Delete a record from a table. - *

DELETE FROM [table] WHERE [record is supplied record]
+ *

+ * This executes the following statement: + * + *

+     * DELETE FROM [table] WHERE [record is supplied record]
+     * 
+ *

+ * Any optimistic locking related {@link Settings} do not apply for this + * method. * * @return The number of deleted records * @throws DataAccessException if something went wrong executing the query @@ -14845,7 +14880,15 @@ public interface DSLContext extends Scope { /** * Delete a record from a table. - *

DELETE FROM [table] WHERE [condition]
+ *

+ * This executes the following statement: + * + *

+     * DELETE FROM [table] WHERE [condition]
+     * 
+ *

+ * Any optimistic locking related {@link Settings} do not apply for this + * method. * * @return The number of deleted records * @throws DataAccessException if something went wrong executing the query