[#1504] Document behaviour of fetch() and fetchOne() in case jOOQ cannot
fetch actual records
This commit is contained in:
parent
cad539b372
commit
cd1e228444
@ -232,6 +232,10 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
|
||||
* must assure transactional integrity between the two statements.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @return The returned value as specified by any of the
|
||||
* {@link #setReturning()} methods. This may return
|
||||
* <code>null</code> in case jOOQ could not retrieve any generated
|
||||
* keys from the JDBC driver.
|
||||
* @see #getReturnedRecords()
|
||||
*/
|
||||
@Support
|
||||
@ -257,8 +261,15 @@ public interface InsertQuery<R extends Record> extends StoreQuery<R>, Insert<R>
|
||||
* other fields are requested, a second statement is issued. Client code
|
||||
* must assure transactional integrity between the two statements.</li>
|
||||
* </ul>
|
||||
* <p>
|
||||
* This currently only works well for DB2, HSQLDB, MySQL, and Postgres
|
||||
*
|
||||
* @return The returned values as specified by any of the
|
||||
* {@link #setReturning()} methods. Note:
|
||||
* <ul>
|
||||
* <li>Not all databases / JDBC drivers support returning several
|
||||
* values on multi-row inserts!</li><li>This may return an empty
|
||||
* <code>Result</code> in case jOOQ could not retrieve any generated
|
||||
* keys from the JDBC driver.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@Support
|
||||
Result<R> getReturnedRecords();
|
||||
|
||||
@ -76,7 +76,16 @@ public interface InsertResultStep<R extends Record> extends Insert<R> {
|
||||
* <p>
|
||||
* This currently only works well for DB2, HSQLDB, MySQL, and Postgres
|
||||
*
|
||||
* @return The returned values as specified by the
|
||||
* {@link InsertReturningStep}. Note:
|
||||
* <ul>
|
||||
* <li>Not all databases / JDBC drivers support returning several
|
||||
* values on multi-row inserts!</li><li>This may return an empty
|
||||
* <code>Result</code> in case jOOQ could not retrieve any generated
|
||||
* keys from the JDBC driver.</li>
|
||||
* </ul>
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @see InsertQuery#getReturnedRecords()
|
||||
*/
|
||||
@Support
|
||||
Result<R> fetch() throws DataAccessException;
|
||||
@ -85,7 +94,12 @@ public interface InsertResultStep<R extends Record> extends Insert<R> {
|
||||
* The record holding returned values as specified by the
|
||||
* {@link InsertReturningStep}
|
||||
*
|
||||
* @return The returned value as specified by the
|
||||
* {@link InsertReturningStep}. This may return <code>null</code> in
|
||||
* case jOOQ could not retrieve any generated keys from the JDBC
|
||||
* driver.
|
||||
* @throws DataAccessException if something went wrong executing the query
|
||||
* @see InsertQuery#getReturnedRecord()
|
||||
*/
|
||||
@Support
|
||||
R fetchOne() throws DataAccessException;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user