public interface InsertSetStep<R extends Record>
Insert
's alternative DSL API.
Example:
DSLContext create = DSL.using(configuration);
create.insertInto(table)
.set(field1, value1)
.set(field2, value2)
.newRecord()
.set(field1, value3)
.set(field2, value4)
.onDuplicateKeyUpdate()
.set(field1, value1)
.set(field2, value2)
.execute();
Modifier and Type | Method and Description |
---|---|
InsertReturningStep<R> |
defaultValues()
Add an empty record with default values.
|
Insert<R> |
select(Select<?> select)
Use a
SELECT statement as the source of values for the
INSERT statement. |
<T> InsertSetMoreStep<R> |
set(Field<T> field,
Field<T> value)
Set a value for a field in the
INSERT statement. |
<T> InsertSetMoreStep<R> |
set(Field<T> field,
Select<? extends Record1<T>> value)
Set a value for a field in the
INSERT statement. |
<T> InsertSetMoreStep<R> |
set(Field<T> field,
T value)
Set a value for a field in the
INSERT statement. |
InsertSetMoreStep<R> |
set(java.util.Map<? extends Field<?>,?> map)
Set values in the
INSERT statement. |
InsertSetMoreStep<R> |
set(Record record)
Set values in the
INSERT statement. |
InsertValuesStepN<R> |
values(java.util.Collection<?> values)
Add values to the insert statement with implicit field names.
|
InsertValuesStepN<R> |
values(Field<?>... values)
Add values to the insert statement with implicit field names.
|
InsertValuesStepN<R> |
values(java.lang.Object... values)
Add values to the insert statement with implicit field names.
|
@Support <T> InsertSetMoreStep<R> set(Field<T> field, T value)
INSERT
statement.@Support <T> InsertSetMoreStep<R> set(Field<T> field, Field<T> value)
INSERT
statement.@Support <T> InsertSetMoreStep<R> set(Field<T> field, Select<? extends Record1<T>> value)
INSERT
statement.@Support InsertSetMoreStep<R> set(java.util.Map<? extends Field<?>,?> map)
INSERT
statement.
Values can either be of type <T>
or
Field<T>
. jOOQ will attempt to convert values to their
corresponding field's type.
@Support InsertSetMoreStep<R> set(Record record)
INSERT
statement.
This is the same as calling set(Map)
with the argument record
treated as a Map
.
set(Map)
@Support InsertValuesStepN<R> values(java.lang.Object... values)
@Support InsertValuesStepN<R> values(Field<?>... values)
@Support InsertValuesStepN<R> values(java.util.Collection<?> values)
@Support(value={ASE,CUBRID,DB2,DERBY,FIREBIRD,H2,HSQLDB,INGRES,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,SYBASE}) InsertReturningStep<R> defaultValues()
@Support Insert<R> select(Select<?> select)
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 DSLContext.insertInto(Table, Field...)
or
DSLContext.insertInto(Table, Collection)
instead, to
define a field set for insertion.
Copyright © 2014. All Rights Reserved.