org.jooq
Interface InsertResultStep<R extends Record>

All Superinterfaces:
Adapter, Attachable, Insert<R>, Query, QueryPart, Serializable

public interface InsertResultStep<R extends Record>
extends Insert<R>

This type is used for the Insert's DSL API.

Example:

 Factory create = new Factory();

 TableRecord record =
 create.insertInto(table, field1, field2)
       .values(value1, value2)
       .returning(field1)
       .fetchOne();
 

This implemented differently for every dialect:

Author:
Lukas Eder

Method Summary
 Result<R> fetch()
          The result holding returned values as specified by the InsertReturningStep This currently only works well for DB2, HSQLDB, MySQL, and Postgres
 R fetchOne()
          The record holding returned values as specified by the InsertReturningStep
 
Methods inherited from interface org.jooq.Query
bind, bind, execute, getBindValues, getParam, getParams, getSQL, getSQL
 
Methods inherited from interface org.jooq.Attachable
attach
 
Methods inherited from interface org.jooq.Adapter
internalAPI
 

Method Detail

fetch

Result<R> fetch()
                               throws DataAccessException
The result holding returned values as specified by the InsertReturningStep

This currently only works well for DB2, HSQLDB, MySQL, and Postgres

Throws:
DataAccessException - if something went wrong executing the query

fetchOne

R fetchOne()
                          throws DataAccessException
The record holding returned values as specified by the InsertReturningStep

Throws:
DataAccessException - if something went wrong executing the query


Copyright © 2012. All Rights Reserved.