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(Map<?,?> map)
Add multiple values to the store statement.
|
Result<?> |
getResult()
The records holding returned values as specified by any of the
setReturning() methods. |
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(Collection<? extends SelectFieldOrAsterisk> fields)
Configure the
INSERT or UPDATE statement to return a list of fields in
R . |
void |
setReturning(Identity<R,?> identity)
Configure the
INSERT or UPDATE statement to return the generated
identity value. |
void |
setReturning(SelectFieldOrAsterisk... fields)
Configure the
INSERT or UPDATE statement to return a list of fields in
R . |
bind, bind, cancel, close, execute, executeAsync, executeAsync, getBindValues, getParam, getParams, getSQL, getSQL, getSQL, isExecutable, keepStatement, queryTimeout
attach, configuration, 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 setReturning()
INSERT
or UPDATE
statement to return all fields in
R
.getReturnedRecords()
@Support void setReturning(Identity<R,?> identity)
INSERT
or UPDATE
statement to return the generated
identity value.identity
- The table's identitygetReturnedRecords()
@Support void setReturning(SelectFieldOrAsterisk... fields)
INSERT
or UPDATE
statement to return a list of fields in
R
.fields
- Fields to be returnedgetReturnedRecords()
@Support void setReturning(Collection<? extends SelectFieldOrAsterisk> 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.
[#5070] Due to an early API design flaw, this method historically returns
the type R
, not a more generic type Record
.
This means that only actual columns in R
can be returned.
For a more generic set of column expressions, use getResult()
instead.
setReturning()
methods. Note:
Result
in case jOOQ
could not retrieve any generated keys from the JDBC driver.@Support Result<?> getResult()
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 © 2019. All rights reserved.