R
- The record type of the table being modifiedpublic interface StoreQuery<R extends Record> extends Query
Modifier and Type | Method and Description |
---|---|
<T> void |
addValue(Field<T> field,
Field<T> value)
Add a value to the store statement
|
<T> void |
addValue(Field<T> field,
T value)
Add a value to the store statement
|
void |
addValues(java.util.Map<? extends Field<?>,?> map)
Add multiple values to the store statement.
|
R |
getReturnedRecord()
The record holding returned values as specified by any of the
setReturning() methods. |
Result<R> |
getReturnedRecords()
The records holding returned values as specified by any of the
setReturning() methods. |
void |
setRecord(R record)
Add values to the store statement
|
void |
setReturning()
Configure the
INSERT or UPDATE statement to return all fields in
R . |
void |
setReturning(java.util.Collection<? extends Field<?>> fields)
Configure the
INSERT or UPDATE statement to return a list of fields in
R . |
void |
setReturning(Field<?>... fields)
Configure the
INSERT or UPDATE statement to return a list of fields in
R . |
void |
setReturning(Identity<R,? extends java.lang.Number> identity)
Configure the
INSERT or UPDATE statement to return the generated
identity value. |
bind, bind, cancel, close, execute, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable, keepStatement, queryTimeout
attach, detach
@Support void setRecord(R record)
record
- The record holding values that are stored by the query@Support <T> void addValue(Field<T> field, T value)
field
- The fieldvalue
- The value@Support <T> void addValue(Field<T> field, Field<T> value)
field
- The fieldvalue
- The value. If value is null
, this results in
calling addValue(Field, Object)
with null as a value.@Support void addValues(java.util.Map<? extends Field<?>,?> map)
Values can either be of type <T>
or
Field<T>
. jOOQ will attempt to convert values to their
corresponding field's type.
@Support void setReturning()
INSERT
or UPDATE
statement to return all fields in
R
.getReturnedRecords()
@Support void setReturning(Identity<R,? extends java.lang.Number> identity)
INSERT
or UPDATE
statement to return the generated
identity value.identity
- The table's identitygetReturnedRecords()
@Support void setReturning(Field<?>... fields)
INSERT
or UPDATE
statement to return a list of fields in
R
.fields
- Fields to be returnedgetReturnedRecords()
@Support void setReturning(java.util.Collection<? extends Field<?>> fields)
INSERT
or UPDATE
statement to return a list of fields in
R
.fields
- Fields to be returnedgetReturnedRecords()
@Support R getReturnedRecord()
setReturning()
methods.
If the insert statement returns several records, this is the same as
calling getReturnedRecords().get(0)
This implemented differently for every dialect:
INSERT .. RETURNING
and UPDATE .. RETURNING
clauses@@identity
or last_inserted_rowid()
values.
Those values are fetched in a separate SELECT
statement. If
other fields are requested, a second statement is issued. Client code
must assure transactional integrity between the two statements.setReturning()
methods. This may return
null
in case jOOQ could not retrieve any generated
keys from the JDBC driver.getReturnedRecords()
@Support Result<R> getReturnedRecords()
setReturning()
methods.
This implemented differently for every dialect:
INSERT .. RETURNING
and UPDATE .. RETURNING
clauses@@identity
or last_inserted_rowid()
values.
Those values are fetched in a separate SELECT
statement. If
other fields are requested, a second statement is issued. Client code
must assure transactional integrity between the two statements.setReturning()
methods. Note:
Result
in case jOOQ could not retrieve any generated
keys from the JDBC driver.Copyright © 2015. All Rights Reserved.