Interface ICqlBatch
Represents a batch of CQL statements. Use the write methods (Insert, Update, Delete, etc.) to add statements to the batch.
Assembly: Cassandra.dll
Syntax
public interface ICqlBatch : ICqlWriteClient
Properties
BatchType
The type of batch to use.
Declaration
BatchType BatchType { get; }
Property Value
Options
The execution options to use.
Declaration
CqlQueryOptions Options { get; }
Property Value
Statements
The statements in the batch.
Declaration
IEnumerable<Cql> Statements { get; }
Property Value
Methods
ConvertCqlArgument<TValue, TDatabase>(TValue)
Allows you to convert an argument/bind variable value being used in a CQL statement using the same converters that are being used by the client
internally, including any user-defined conversions if you configured them. Will convert a value of Type TValue
to a value of
Type TDatabase
or throw an InvalidOperationException if no converter is available.
Declaration
TDatabase ConvertCqlArgument<TValue, TDatabase>(TValue value)
Parameters
Type |
Name |
Description |
TValue |
value |
The value to convert.
|
Returns
Type |
Description |
TDatabase |
The converted value.
|
Type Parameters
Name |
Description |
TValue |
The original Type of the value.
|
TDatabase |
The Type expected by Cassandra to convert to.
|
InsertIfNotExists<T>(T, CqlQueryOptions)
Inserts the specified POCO in Cassandra if not exists.
Declaration
void InsertIfNotExists<T>(T poco, CqlQueryOptions queryOptions = null)
Parameters
Type Parameters
InsertIfNotExists<T>(T, bool, CqlQueryOptions)
Inserts the specified POCO in Cassandra if not exists.
Declaration
void InsertIfNotExists<T>(T poco, bool insertNulls, CqlQueryOptions queryOptions = null)
Parameters
Type Parameters
InsertIfNotExists<T>(T, bool, int?, CqlQueryOptions)
Inserts the specified POCO in Cassandra if not exists.
Declaration
void InsertIfNotExists<T>(T poco, bool insertNulls, int? ttl, CqlQueryOptions queryOptions = null)
Parameters
Type Parameters
WithOptions(Action<CqlQueryOptions>)
Configures any individual option for this instance.
Declaration
ICqlBatch WithOptions(Action<CqlQueryOptions> action)
Parameters
Returns