BatchStatement Class |
Namespace: Dse
public class BatchStatement : Statement
The BatchStatement type exposes the following members.
Name | Description | |
---|---|---|
BatchStatement | Initializes a new instance of the BatchStatement class |
Name | Description | |
---|---|---|
BatchType |
Gets the batch type
| |
IsEmpty |
Determines if the batch does not contain any query
| |
Keyspace | (Overrides StatementKeyspace.) | |
RoutingKey |
Gets the routing key for the query.
(Overrides StatementRoutingKey.)Routing key can be provided using the SetRoutingValues(Object) method. |
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. |