BatchStatement Methods |
The BatchStatement type exposes the following members.
Name | Description | |
---|---|---|
Add |
Adds a new statement to this batch.
Note that statement can be any Statement. It is allowed to mix SimpleStatement and BoundStatement in the same BatchStatement in particular.
Please note that the options of the added Statement (all those defined directly by the Statement class: consistency level, fetch size, tracing, ...) will be ignored for the purpose of the execution of the Batch. Instead, the options used are the one of this BatchStatement object.
| |
SetBatchType |
Sets the BatchType | |
SetKeyspace |
Sets the keyspace this batch operates on. The keyspace should only be set when the statements in this
batch apply to a different keyspace to the logged keyspace of the ISession.
| |
SetRoutingKey |
Set the routing key for this query. This method allows to manually provide a routing key for this query. It is thus optional since the routing key is only an hint for token aware load balancing policy but is never mandatory. If the partition key for the query is composite, use the #setRoutingKey(ByteBuffer...) method instead to build the routing key. | |
SetRoutingValues |
Sets the partition key values in order to route the query to the correct replicas.
For simple partition keys, set the partition key value. For composite partition keys, set the multiple the partition key values in correct order. |