BoundStatement Class |
Once a BoundStatement has values for all the variables of the PreparedStatement it has been created from, it can executed (through Execute(IStatement)).
The values of a BoundStatement can be set by either index or name. When setting them by name, names follow the case insensitivity rules explained in ColumnDefinitions. Note-worthily, if multiple bind variables correspond to the same column (as would be the case if you prepare SELECT * FROM t WHERE x > ? AND x < ?), you will have to set values by indexes (or the PreparedStatement.Bind(object[]) method) as the methods to set by name only allows to set the first prepared occurrence of the column.
Namespace: Cassandra
public class BoundStatement : Statement
The BoundStatement type exposes the following members.
Name | Description | |
---|---|---|
BoundStatement |
Initializes a new instance of the Cassandra.BoundStatement class
| |
BoundStatement(PreparedStatement) |
Creates a new BoundStatement from the provided prepared
statement.
|
Name | Description | |
---|---|---|
SetRoutingKey |
Set the routing key for this query. This method allows to manually
provide a routing key for this BoundStatement. It is thus optional since the routing
key is only an hint for token aware load balancing policy but is never
mandatory.
|
Name | Description | |
---|---|---|
PreparedStatement |
Gets the prepared statement on which this BoundStatement is based.
| |
RoutingKey |
Gets the routing key for this bound query. (Overrides StatementRoutingKey.)This method will return a non-null value if:
Note that if the routing key has been set through PreparedStatement.SetRoutingKey, that value takes precedence even if the partition key is part of the bound variables. |