public class Insert extends BuiltStatement
Modifier and Type | Class and Description |
---|---|
static class |
Insert.Options
The options of an INSERT statement.
|
idempotent, NULL_PAYLOAD_VALUE
Modifier and Type | Method and Description |
---|---|
Insert |
ifNotExists()
Sets the 'IF NOT EXISTS' option for this INSERT statement.
|
Insert.Options |
using()
Returns the options for this INSERT statement.
|
Insert.Options |
using(Using using)
Adds a new options for this INSERT statement.
|
Insert |
value(String name,
Object value)
Adds a column/value pair to the values inserted by this INSERT statement.
|
Insert |
values(List<String> names,
List<Object> values)
Adds multiple column/value pairs to the values inserted by this INSERT statement.
|
Insert |
values(String[] names,
Object[] values)
Adds multiple column/value pairs to the values inserted by this INSERT statement.
|
escapeId, getKeyspace, getNamedValues, getObject, getObject, getQueryString, getRoutingKey, getValues, hasValues, isIdempotent, setForceNoValues, toString, usesNamedValues
getQueryString, hasValues
disableTracing, enableTracing, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getOutgoingPayload, getReadTimeoutMillis, getRetryPolicy, getSerialConsistencyLevel, isBatchIdempotent, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setIdempotent, setOutgoingPayload, setPagingState, setPagingState, setPagingStateUnsafe, setReadTimeoutMillis, setRetryPolicy, setSerialConsistencyLevel
public Insert value(String name, Object value)
name
- the name of the column to insert/update.value
- the value to insert/update for name
.public Insert values(String[] names, Object[] values)
names
- a list of column names to insert/update.values
- a list of values to insert/update. The i
th
value in values
will be inserted for the i
th column
in names
.IllegalArgumentException
- if names.length != values.length
.public Insert values(List<String> names, List<Object> values)
names
- a list of column names to insert/update.values
- a list of values to insert/update. The i
th
value in values
will be inserted for the i
th column
in names
.IllegalArgumentException
- if names.size() != values.size()
.public Insert.Options using(Using using)
using
- the option to add.public Insert.Options using()
Insert.Options.and(Using)
to add options.public Insert ifNotExists()
Statement.isIdempotent()
for more information.