public class Insert extends BuiltStatement
| Modifier and Type | Class and Description |
|---|---|
static class |
Insert.Options
The options of an INSERT statement.
|
idempotent| 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, getObject, getQueryString, getRoutingKey, getValues, hasValues, isIdempotent, setForceNoValues, toStringgetValues, getValuesdisableTracing, enableTracing, getConsistencyLevel, getDefaultTimestamp, getFetchSize, getRetryPolicy, getSerialConsistencyLevel, isTracing, setConsistencyLevel, setDefaultTimestamp, setFetchSize, setIdempotent, setPagingState, setPagingStateUnsafe, setRetryPolicy, setSerialConsistencyLevelpublic 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 ith
value in values will be inserted for the ith 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 ith
value in values will be inserted for the ith 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.