org.jooq
Interface InsertSetStep<R extends Record>

All Known Subinterfaces:
InsertSetMoreStep<R>

public interface InsertSetStep<R extends Record>

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

Example:

 Factory create = new Factory();

 create.insertInto(table)
       .set(field1, value1)
       .set(field2, value2)
       .newRecord()
       .set(field1, value3)
       .set(field2, value4)
       .onDuplicateKeyUpdate()
       .set(field1, value1)
       .set(field2, value2)
       .execute();
 

Author:
Lukas Eder

Method Summary
 Insert<R> select(Select<?> select)
          Use a SELECT statement as the source of values for the INSERT statement This variant of the INSERT ..
<T> InsertSetMoreStep<R>
set(Field<T> field, Field<T> value)
          Set a value for a field in the UPDATE statement
<T> InsertSetMoreStep<R>
set(Field<T> field, T value)
          Set a value for a field in the UPDATE statement
 InsertSetMoreStep<R> set(Map<? extends Field<?>,?> map)
          Set a value for a field in the UPDATE statement Please assure that key/value pairs have matching <T> types.
 InsertValuesStep<R> values(Collection<?> values)
          Add values to the insert statement with implicit field names
 InsertValuesStep<R> values(Field<?>... values)
          Add values to the insert statement with implicit field names
 InsertValuesStep<R> values(Object... values)
          Add values to the insert statement with implicit field names
 

Method Detail

set

<T> InsertSetMoreStep<R> set(Field<T> field,
                             T value)
Set a value for a field in the UPDATE statement


set

<T> InsertSetMoreStep<R> set(Field<T> field,
                             Field<T> value)
Set a value for a field in the UPDATE statement


set

InsertSetMoreStep<R> set(Map<? extends Field<?>,?> map)
Set a value for a field in the UPDATE statement

Please assure that key/value pairs have matching <T> types. Values can either be of type <T> or Field<T>


values

InsertValuesStep<R> values(Object... values)
Add values to the insert statement with implicit field names


values

InsertValuesStep<R> values(Field<?>... values)
Add values to the insert statement with implicit field names


values

InsertValuesStep<R> values(Collection<?> values)
Add values to the insert statement with implicit field names


select

Insert<R> select(Select<?> select)
Use a SELECT statement as the source of values for the INSERT statement

This variant of the INSERT .. SELECT statement does not allow for specifying a subset of the fields inserted into. It will insert into all fields of the table specified in the INTO clause. Use FactoryOperations.insertInto(Table, Field...) or FactoryOperations.insertInto(Table, Collection) instead, to define a field set for insertion.



Copyright © 2012. All Rights Reserved.