SimpleStatement Constructor (IDictionaryString, Object, String) |
Creates a new instance of
SimpleStatement using a dictionary of parameters and a query with
named parameters.
Namespace: DseAssembly: Dse (in Dse.dll) Version: 2.2.0
Syntax public SimpleStatement(
IDictionary<string, Object> valuesDictionary,
string query
)
Parameters
- valuesDictionary
- Type: System.Collections.GenericIDictionaryString, Object
A dictionary containing the query parameters values using the parameter name as keys.
- query
- Type: SystemString
The cql query string.
Remarks
This constructor is valid for dynamically-sized named parameters, consider using anonymous types for
fixed-size named parameters.
Examples const string query = "INSERT INTO users (id, name, email) VALUES (:id, :name, :email)";
var parameters = new Dictionary<string, object>
{
{ "id", id },
{ "name", name },
{ "email", email },
};
var statement = new SimpleStatement(parameters, query);
See Also