Click or drag to resize
SimpleStatement Constructor (String, Object)
Creates a new instance of SimpleStatement with the provided CQL query and values provided.

Namespace: Cassandra
Assembly: Cassandra (in Cassandra.dll) Version: 3.4.0
Syntax
C#
public SimpleStatement(
	string query,
	params Object[] values
)

Parameters

query
Type: SystemString
The cql query string.
values
Type: SystemObject
Parameter values required for the execution of query.
Examples
Using positional parameters:
const string query = "INSERT INTO users (id, name, email) VALUES (?, ?, ?)";
var statement = new SimpleStatement(query, id, name, email);
Using named parameters (using anonymous objects):
const string query = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";
var statement = new SimpleStatement(query, new { id, name, email } );
See Also