diff --git a/jOOQ/src/main/java/org/jooq/InsertOnConflictConditionStep.java b/jOOQ/src/main/java/org/jooq/InsertOnConflictConditionStep.java index 327c6a2d27..2f18cc091b 100644 --- a/jOOQ/src/main/java/org/jooq/InsertOnConflictConditionStep.java +++ b/jOOQ/src/main/java/org/jooq/InsertOnConflictConditionStep.java @@ -53,7 +53,8 @@ import org.jooq.impl.DSL; * .values(value3, value4) * .onDuplicateKeyUpdate() * .set(field1, value1) - * .set(field2, value2) + * .where(field2.eq(value5)) + * .or(field2.eq(value6)) * .execute(); * *
diff --git a/jOOQ/src/main/java/org/jooq/InsertOnConflictDoUpdateStep.java b/jOOQ/src/main/java/org/jooq/InsertOnConflictDoUpdateStep.java
index 2bba395c6b..626548bebc 100644
--- a/jOOQ/src/main/java/org/jooq/InsertOnConflictDoUpdateStep.java
+++ b/jOOQ/src/main/java/org/jooq/InsertOnConflictDoUpdateStep.java
@@ -58,9 +58,7 @@ import static org.jooq.SQLDialect.POSTGRES_9_5;
*
* create.insertInto(table, field1, field2)
* .values(value1, value2)
- * .values(value3, value4)
- * .onDuplicateKeyUpdate()
- * .set(field1, value1)
+ * .onConflict(field1)
* .set(field2, value2)
* .execute();
*
@@ -77,7 +75,7 @@ public interface InsertOnConflictDoUpdateStep
@@ -86,34 +86,38 @@ import org.jooq.impl.DSL;
public interface InsertOnConflictWhereStep
* NOTE: When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
@@ -128,7 +132,8 @@ public interface InsertOnConflictWhereStep
* NOTE: When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
@@ -143,7 +148,8 @@ public interface InsertOnConflictWhereStep
* NOTE: When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
@@ -159,7 +165,8 @@ public interface InsertOnConflictWhereStep
* NOTE: When inserting plain SQL into jOOQ objects, you must
* guarantee syntax integrity. You may also create the possibility of
@@ -175,13 +182,15 @@ public interface InsertOnConflictWhereStep
* Keys can either be of type {@link String}, {@link Name}, or
* {@link Field}.
@@ -128,7 +128,7 @@ public interface InsertOnDuplicateSetStep
* This is the same as calling {@link #set(Map)} with the argument record
* treated as a
* Only {@link SQLDialect#POSTGRES} has native support for this clause. The
* other dialects can emulate it using
* Only {@link SQLDialect#POSTGRES} has native support for this clause. The
* other dialects can emulate it using
* Only {@link SQLDialect#POSTGRES} has native support for this clause. The
* other dialects can emulate it using
* This will try to
* This will try to DO IGNORE clause.
+ * Add the DO NOTHING clause.
*/
@Support
InsertReturningStepWHERE clause to the query, connecting them with each
- * other with {@link Operator#AND}.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepWHERE clause to the query, connecting them with each
- * other with {@link Operator#AND}.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause,
+ * connecting them with each other using {@link Operator#AND}.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepWHERE clause to the query, connecting them with each
- * other with {@link Operator#AND}.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause,
+ * connecting them with each other using {@link Operator#AND}.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepWHERE clause to the query.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepWHERE clause to the query.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* WHERE clause to the query.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* WHERE clause to the query.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* WHERE clause to the query.
+ * Add a WHERE clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* WHERE EXISTS clause to the query.
+ * Add a WHERE EXISTS clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepWHERE NOT EXISTS clause to the query.
+ * Add a WHERE NOT EXISTS clause to the INSERT statement's
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, POSTGRES_9_5 })
InsertOnConflictConditionStepUPDATE in the INSERT statement's
- * ON DUPLICATE KEY UPDATE clause.
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 })
UPDATE in the INSERT statement's
- * ON DUPLICATE KEY UPDATE clause.
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 })
UPDATE in the INSERT statement's
- * ON DUPLICATE KEY UPDATE clause.
+ * ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
*/
@Support({ CUBRID, DERBY, HSQLDB, MARIADB, MYSQL, POSTGRES_9_5 })
UPDATE in the INSERT
- * statement's ON DUPLICATE KEY UPDATE clause.
+ * statement's ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* UPDATE in the INSERT
- * statement's ON DUPLICATE KEY UPDATE clause.
+ * statement's ON DUPLICATE KEY UPDATE or ON CONFLICT ... DO UPDATE clause.
* Map<Field<?>, Object>.
diff --git a/jOOQ/src/main/java/org/jooq/InsertOnDuplicateStep.java b/jOOQ/src/main/java/org/jooq/InsertOnDuplicateStep.java
index e61da4b2e7..cfcde674ad 100644
--- a/jOOQ/src/main/java/org/jooq/InsertOnDuplicateStep.java
+++ b/jOOQ/src/main/java/org/jooq/InsertOnDuplicateStep.java
@@ -93,25 +93,25 @@ import java.util.Collection;
public interface InsertOnDuplicateStepON CONFLICT ON CONSTRAINT clause to this query.
+ * Add a ON CONFLICT ON CONSTRAINT clause to this INSERT statement.
*/
@Support({ CUBRID, DERBY, FIREBIRD_3_0, HSQLDB, POSTGRES_9_5 })
InsertOnConflictDoUpdateStepON CONFLICT ON CONSTRAINT clause to this query.
+ * Add a ON CONFLICT ON CONSTRAINT clause to this INSERT statement.
*/
@Support({ CUBRID, DERBY, FIREBIRD_3_0, HSQLDB, POSTGRES_9_5 })
InsertOnConflictDoUpdateStepON CONFLICT ON CONSTRAINT clause to this query.
+ * Add a ON CONFLICT ON CONSTRAINT clause to this INSERT statement.
*/
@Support
InsertOnConflictDoUpdateStepON CONFLICT clause to this insert query.
+ * Add an ON CONFLICT clause to this INSERT statement.
* MERGE, if table meta
@@ -121,7 +121,7 @@ public interface InsertOnDuplicateStepON CONFLICT clause to this insert query.
+ * Add an ON CONFLICT clause to this INSERT statement.
* MERGE, if table meta
@@ -131,7 +131,7 @@ public interface InsertOnDuplicateStepON CONFLICT DO NOTHING clause to this insert query.
+ * Add an ON CONFLICT DO NOTHING clause to this INSERT statement.
* MERGE, if table meta
@@ -141,7 +141,7 @@ public interface InsertOnDuplicateStepON DUPLICATE KEY UPDATE clause to this insert query.
+ * Add an ON DUPLICATE KEY UPDATE clause to this INSERT statement.
* INSERT a record. If there is a primary key
* or unique key in this INSERT statement's affected table that
@@ -164,7 +164,7 @@ public interface InsertOnDuplicateStepON DUPLICATE KEY IGNORE clause to this insert query.
+ * Add an ON DUPLICATE KEY IGNORE clause to this INSERT statement.
* INSERT a record. If there is a primary key
* or unique key in this INSERT statement's affected table that