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.
Namespace: CassandraAssembly: Cassandra (in Cassandra.dll) Version: 3.2.0
Syntax public BatchStatement Add(
Statement statement
)
Parameters
- statement
- Type: CassandraStatement
Statement to add to the batch
Return Value
Type:
BatchStatementThe Batch statement
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | Thrown when trying to add more than short.MaxValue Statements |
See Also