struct CassBatch
A group of statements that are executed as a single batch.
Note: Batches are not supported by the binary protocol version 1.
Requires Cassandra: 2.0+
Functions
Sets the name of the user to execute the batch as.
Same as CassBatch::cass_batch_set_execute_as
, but with lengths for string parameters.
Creates a new batch statement with batch type.
Requires Cassandra: 2.0+
Frees a batch instance. Batches can be immediately freed after being executed.
Requires Cassandra: 2.0+
Sets the batch’s keyspace. When using protocol v5 or greater it overrides the session’s keyspace for the batch.
Note: If not set explicitly then the batch will inherit the keyspace of the first child statement with a non-empty keyspace.
CassError
cass_batch_set_keyspace_n
(CassBatch *
batch, const char *
keyspace, size_t
keyspace_length )
Same as CassBatch::cass_batch_set_keyspace
, but with lengths for string parameters.
Sets the batch’s consistency level
Requires Cassandra: 2.0+
CassError
cass_batch_set_serial_consistency
(CassBatch *
batch, CassConsistency
serial_consistency )
Sets the batch’s serial consistency level.
Requires Cassandra: 2.0+
Default: Not set
Sets the batch’s timestamp.
Requires Cassandra: 2.1+
Sets the batch’s timeout for waiting for a response from a node.
Default: Disabled (use the cluster-level request timeout)
Sets whether the statements in a batch are idempotent. Idempotent batches are able to be automatically retried after timeouts/errors and can be speculatively executed.
Sets the batch’s retry policy.
Requires Cassandra: 2.0+
Sets the batch’s custom payload.
Requires Cassandra: 2.2+
Adds a statement to a batch.
Requires Cassandra: 2.0+
Sets the execution profile to execute the batch with.
Note: NULL or empty string will clear execution profile from batch
CassError
cass_batch_set_execution_profile_n
(CassBatch *
batch, const char *
name, size_t
name_length )
Same as CassBatch::cass_batch_set_execution_profile
, but with lengths for string parameters.