Click or drag to resize

BatchStatement Class

A statement that groups a number of BoundStatement and / or SimpleStatement so they get executed as a batch.
Inheritance Hierarchy
SystemObject
  DseStatement
    DseBatchStatement

Namespace:  Dse
Assembly:  Dse (in Dse.dll) Version: 2.9.0
Syntax
C#
public class BatchStatement : Statement

The BatchStatement type exposes the following members.

Constructors
  NameDescription
Public methodBatchStatement
Initializes a new instance of the BatchStatement class
Top
Properties
Methods
  NameDescription
Public methodAdd
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.
Public methodSetBatchType
Sets the BatchType
Public methodSetKeyspace
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.
Public methodSetRoutingKey
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.

Public methodSetRoutingValues
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.

Top
See Also

Reference