Deprecated
as a consequence of ConditionProvider being deprecated. See corresponding docs for further information.
INSERT statement (model API).
This type is the model API representation of a Insert statement,
which can be mutated after creation. The advantage of this API compared to
the DSL API is a more simple approach to writing dynamic SQL.
Instances can be created using DSLContext#insertQuery(Table) and
overloads.
| Modifier and Type | Method and Description |
|---|---|
| public void | addConditions(Condition
The condition condition)Redeclares org.
Deprecated
as a consequence of
Adds a new condition to the query, connecting it to existing conditions
with Condition being deprecated.
Operator#AND.
|
| public void | addConditions(Condition...
The condition conditions)Redeclares org.
Deprecated
as a consequence of
Adds new conditions to the query, connecting them to existing conditions
with Condition being deprecated.
Operator#AND.
|
| public void | addConditions(Collection<? extends Condition>
The condition conditions)Redeclares org. Operator#AND.
|
| public void | addConditions(Operator operator, Condition
The condition condition)Redeclares org.
Deprecated
as a consequence of
Adds a new condition to the query, connecting it to existing
conditions with the provided operator.
Condition being deprecated.
|
| public void | addConditions(Operator operator, Condition...
The condition conditions)Redeclares org.
Deprecated
as a consequence of
Adds new conditions to the query, connecting them to existing
conditions with the provided operator.
Condition being deprecated.
|
| public void | addConditions(Operator operator, Collection<? extends Condition>
The condition conditions)Redeclares org. |
| public void | addRecord(R
The record to add to this insert statement. record)Short for calling |
| public <T> void | addValueForUpdate(Field<T> field, T value)
Deprecated
as a consequence of
Add a value to the Field being deprecated.
ON DUPLICATE KEY UPDATE clause of this
INSERT statement, where this is supported.
|
| public <T> void | addValueForUpdate(Field<T> field, Field<T> value)
Deprecated
as a consequence of
Add a value to the Field being deprecated.
ON DUPLICATE KEY UPDATE clause of this
INSERT statement, where this is supported.
|
| public void | addValuesForUpdate(Map<?, ?> map)
Add multiple values to the |
| public R | getReturnedRecord()
Redeclares org. setReturning() methods.
|
| public @NotNull Result | getReturnedRecords()
Redeclares org. setReturning() methods.
|
| public void | newRecord()
Adds a new Record to the insert statement for multi-record inserts
Calling this method will cause subsequent calls to
|
| public void | onConflict(Field<?>... fields)
Deprecated
as a consequence of
Whether a Field being deprecated.
ON CONFLICT clause should be added to
this INSERT statement.
|
| public void | onConflict(Collection<? extends Field<?>> fields)
Whether a |
| public void | onConflictOnConstraint(Name constraint)
Whether use a |
| public void | onConflictOnConstraint(Constraint constraint)
Deprecated
as a consequence of
Whether use a Constraint being deprecated.
ON CONFLICT or
ON CONFLICT ON CONSTRAINT clause in this INSERT
statement.
|
| public void | onConflictOnConstraint(UniqueKey<R> constraint)
Whether use a |
| public void | onConflictWhere(Condition
The condition condition)
Deprecated
as a consequence of
Adds a new condition the Condition being deprecated.
onConflict(Field. clause.
|
| public void | onDuplicateKeyIgnore(boolean flag)
Whether an |
| public void | onDuplicateKeyUpdate(boolean flag)
Whether a |
| public void | |
| public void | setReturning()
Redeclares org. INSERT or UPDATE statement to return all fields in
R.
|
| public void | setReturning(Identity<R, ?>
The table's identity identity)Redeclares org. INSERT or UPDATE statement to return the generated
identity value.
|
| public void | setReturning(SelectFieldOrAsterisk...
Fields to be returned fields)Redeclares org. INSERT or UPDATE statement to return a list of fields in
R.
|
| public void | setReturning(Collection<? extends SelectFieldOrAsterisk>
Fields to be returned fields)Redeclares org. INSERT or UPDATE statement to return a list of fields in
R.
|
| public void | |
| public void | setSelect(Collection<? extends Field<?>> fields, Select<?> select)
Use a |
| addConditions | back to summary |
|---|---|
| public void addConditions(Condition condition) Redeclares org. Deprecated as a consequence of Adds a new condition to the query, connecting it to existing conditions
with
This is for use with | |
| addConditions | back to summary |
|---|---|
| public void addConditions(Condition... conditions) Redeclares org. Deprecated as a consequence of Adds new conditions to the query, connecting them to existing conditions
with
This is for use with | |
| addConditions | back to summary |
|---|---|
| public void addConditions(Collection<? extends Condition> conditions) Redeclares org. Adds new conditions to the query, connecting them to existing
conditions with
This is for use with | |
| addConditions | back to summary |
|---|---|
| public void addConditions(Operator operator, Condition condition) Redeclares org. Deprecated as a consequence of Adds a new condition to the query, connecting it to existing conditions with the provided operator.
This is for use with | |
| addConditions | back to summary |
|---|---|
| public void addConditions(Operator operator, Condition... conditions) Redeclares org. Deprecated as a consequence of Adds new conditions to the query, connecting them to existing conditions with the provided operator.
This is for use with | |
| addConditions | back to summary |
|---|---|
| public void addConditions(Operator operator, Collection<? extends Condition> conditions) Redeclares org. Adds new conditions to the query, connecting them to existing conditions with the provided operator.
This is for use with | |
| addRecord | back to summary |
|---|---|
| public void addRecord(R record) Short for calling
| |
| addValueForUpdate | back to summary |
|---|---|
| public <T> void addValueForUpdate(Field<T> field, T value)
Deprecated as a consequence of Add a value to the | |
| addValueForUpdate | back to summary |
|---|---|
| public <T> void addValueForUpdate(Field<T> field, Field<T> value)
Deprecated as a consequence of Add a value to the | |
| addValuesForUpdate | back to summary |
|---|---|
| public void addValuesForUpdate(Map<?, ?> map) Add multiple values to the
Please assure that key/value pairs have matching | |
| getReturnedRecord | back to summary |
|---|---|
| public R getReturnedRecord() Redeclares org. Doc from org. The record holding returned values as specified by any of the
If the insert statement returns several records, this is the same as
calling This implemented differently for every dialect:
This feature works with
| |
| getReturnedRecords | back to summary |
|---|---|
| public @NotNull Result Redeclares org. Doc from org. The records holding returned values as specified by any of the
This implemented differently for every dialect:
[#5070] Due to an early API design flaw, this method historically returns
the type
This feature works with
| |
| newRecord | back to summary |
|---|---|
| public void newRecord() Adds a new Record to the insert statement for multi-record inserts
Calling this method will cause subsequent calls to
If this call is not followed by If this call is done on a fresh insert statement (without any values yet), then this call has no effect either.
| |
| onConflict | back to summary |
|---|---|
| public void onConflict(Field<?>... fields)
Deprecated as a consequence of Whether a
When setting this flag to
| |
| onConflict | back to summary |
|---|---|
| public void onConflict(Collection<? extends Field<?>> fields) Whether a
When setting this flag to
| |
| onConflictOnConstraint | back to summary |
|---|---|
| public void onConflictOnConstraint(Name constraint) Whether use a | |
| onConflictOnConstraint | back to summary |
|---|---|
| public void onConflictOnConstraint(Constraint constraint)
Deprecated as a consequence of Whether use a | |
| onConflictOnConstraint | back to summary |
|---|---|
| public void onConflictOnConstraint(UniqueKey<R> constraint) Whether use a
| |
| onConflictWhere | back to summary |
|---|---|
| public void onConflictWhere(Condition condition)
Deprecated as a consequence of Adds a new condition the
This is for use with
| |
| onDuplicateKeyIgnore | back to summary | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| public void onDuplicateKeyIgnore(boolean flag) Whether an This clause is not actually supported in this form by any database, but can be emulated as such:
The
| |||||||||||
| onDuplicateKeyUpdate | back to summary |
|---|---|
| public void onDuplicateKeyUpdate(boolean flag) Whether a
When setting this flag to
The | |
| setDefaultValues | back to summary |
|---|---|
| public void setDefaultValues() Set an empty record with the | |
| setReturning | back to summary |
|---|---|
| public void setReturning() Redeclares org. Doc from org. Configure the
This feature works with | |
| setReturning | back to summary |
|---|---|
| public void setReturning(Identity<R, ?> identity) Redeclares org. Doc from org. Configure the
This feature works with | |
| setReturning | back to summary |
|---|---|
| public void setReturning(SelectFieldOrAsterisk... fields) Redeclares org. Doc from org. Configure the
This feature works with
| |
| setReturning | back to summary |
|---|---|
| public void setReturning(Collection<? extends SelectFieldOrAsterisk> fields) Redeclares org. Doc from org. Configure the
This feature works with
| |
| setSelect | back to summary |
|---|---|
| public void setSelect(Field<?>[] fields, Select<?> select)
Deprecated as a consequence of Use a
| |
| setSelect | back to summary |
|---|---|
| public void setSelect(Collection<? extends Field<?>> fields, Select<?> select) Use a
| |