public interface InsertOnConflictWhereStep<R extends Record> extends InsertReturningStep<R>
Insert
's DSL API.
Example:
DSLContext create = DSL.using(configuration);
create.insertInto(table, field1, field2)
.values(value1, value2)
.values(value3, value4)
.onDuplicateKeyUpdate()
.set(field1, value1)
.set(field2, value2)
.execute();
XYZ*Step
types directly from client code
It is usually not recommended to reference any XYZ*Step
types
directly from client code, or assign them to local variables. When writing
dynamic SQL, creating a statement's components dynamically, and passing them
to the DSL API statically is usually a better choice. See the manual's
section about dynamic SQL for details: https://www.jooq.org/doc/latest/manual/sql-building/dynamic-sql.
Drawbacks of referencing the XYZ*Step
types directly:
Modifier and Type | Method and Description |
---|---|
InsertReturningStep<R> |
where(Collection<? extends Condition> conditions)
Add a
WHERE clause to the query, connecting them with each
other with Operator.AND . |
InsertReturningStep<R> |
where(Condition... conditions)
Add a
WHERE clause to the query, connecting them with each
other with Operator.AND . |
InsertReturningStep<R> |
where(Condition condition)
Add a
WHERE clause to the query, connecting them with each
other with Operator.AND . |
InsertReturningStep<R> |
where(Field<Boolean> field)
Add a
WHERE clause to the query. |
InsertReturningStep<R> |
where(SQL sql)
Add a
WHERE clause to the query. |
InsertReturningStep<R> |
where(String sql)
Add a
WHERE clause to the query. |
InsertReturningStep<R> |
where(String sql,
Object... bindings)
Add a
WHERE clause to the query. |
InsertReturningStep<R> |
where(String sql,
QueryPart... parts)
Add a
WHERE clause to the query. |
InsertReturningStep<R> |
whereExists(Select<?> select)
Add a
WHERE EXISTS clause to the query. |
InsertReturningStep<R> |
whereNotExists(Select<?> select)
Add a
WHERE NOT EXISTS clause to the query. |
returning, returning, returning, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult, returningResult
bind, bind, cancel, close, execute, executeAsync, executeAsync, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable, keepStatement, queryTimeout
attach, configuration, detach
@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> where(Condition condition)
WHERE
clause to the query, connecting them with each
other with Operator.AND
.@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> where(Condition... conditions)
WHERE
clause to the query, connecting them with each
other with Operator.AND
.@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> where(Collection<? extends Condition> conditions)
WHERE
clause to the query, connecting them with each
other with Operator.AND
.@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> where(Field<Boolean> field)
WHERE
clause to the query.@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) @PlainSQL InsertReturningStep<R> where(SQL sql)
WHERE
clause to the query.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
DSL.condition(SQL)
,
SQL
@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) @PlainSQL InsertReturningStep<R> where(String sql)
WHERE
clause to the query.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
DSL.condition(String)
,
SQL
@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) @PlainSQL InsertReturningStep<R> where(String sql, Object... bindings)
WHERE
clause to the query.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) @PlainSQL InsertReturningStep<R> where(String sql, QueryPart... parts)
WHERE
clause to the query.
NOTE: When inserting plain SQL into jOOQ objects, you must guarantee syntax integrity. You may also create the possibility of malicious SQL injection. Be sure to properly use bind variables and/or escape literals when concatenated into SQL clauses!
@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> whereExists(Select<?> select)
WHERE EXISTS
clause to the query.@Support(value={AURORA_POSTGRES,CUBRID,ORACLE,POSTGRES_9_5,SQLSERVER}) InsertReturningStep<R> whereNotExists(Select<?> select)
WHERE NOT EXISTS
clause to the query.Copyright © 2019. All rights reserved.