Struct cassandra_cpp::Statement [] [src]

pub struct Statement(_);

A statement object is an executable query. It represents either a regular (adhoc) statement or a prepared statement. It maintains the queries' parameter values along with query options (consistency level, paging state, etc.)

Note: Parameters for regular queries are not supported by the binary protocol version 1.

Methods

impl Statement
[src]

[src]

Creates a new query statement.

[src]

Adds a key index specifier to this a statement. When using token-aware routing, this can be used to tell the driver which parameters within a non-prepared, parameterized statement are part of the partition key.

Use consecutive calls for composite partition keys.

This is not necessary for prepared statements, as the key parameters are determined in the metadata processed in the prepare phase.

[src]

Sets the statement's keyspace for use with token-aware routing.

This is not necessary for prepared statements, as the keyspace is determined in the metadata processed in the prepare phase.

[src]

Sets the statement's consistency level.

Default: CASS_CONSISTENCY_LOCAL_ONE

[src]

Sets the statement's serial consistency level.

Default: Not set

[src]

Sets the statement's page size.

Default: -1 (Disabled)

[src]

Sets the statement's paging state. This can be used to get the next page of data in a multi-page query.

[src]

Sets the statement's paging state. This can be used to get the next page of data in a multi-page query.

Warning: The paging state should not be exposed to or come from untrusted environments. The paging state could be spoofed and potentially used to gain access to other data.

[src]

Sets the statement's timestamp.

[src]

Sets the statement's timeout for waiting for a response from a node. Some(Duration::milliseconds(0)) sets no timeout, and None disables it (to use the cluster-level request timeout).

[src]

Sets the statement's retry policy.

[src]

Sets the statement's custom payload.

[src]

Binds null to a query or bound statement at the specified index.

[src]

Binds a null to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "tinyint" to a query or bound statement at the specified index.

[src]

Binds a "tinyint" to all the values with the specified name.

[src]

Binds an "smallint" to a query or bound statement at the specified index.

[src]

Binds a "smallint" to all the values with the specified name.

[src]

Binds an "int" to a query or bound statement at the specified index.

[src]

Binds an "int" to all the values with the specified name.

[src]

Binds a "date" to a query or bound statement at the specified index.

[src]

Binds a "date" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "bigint", "counter", "timestamp" or "time" to a query or bound statement at the specified index.

[src]

Binds a "bigint", "counter", "timestamp" or "time" to all values with the specified name.

[src]

Binds a "float" to a query or bound statement at the specified index.

[src]

Binds a "float" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "double" to a query or bound statement at the specified index.

[src]

Binds a "double" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "boolean" to a query or bound statement at the specified index.

[src]

Binds a "boolean" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds an "ascii", "text" or "varchar" to a query or bound statement at the specified index.

[src]

Binds an "ascii", "text" or "varchar" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "blob", "varint" or "custom" to a query or bound statement at the specified index.

[src]

Binds a "blob", "varint" or "custom" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds a "uuid" or "timeuuid" to a query or bound statement at the specified index.

[src]

Binds a "uuid" or "timeuuid" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Binds an "inet" to a query or bound statement at the specified index.

[src]

Binds an "inet" to all the values with the specified name.

[src]

Bind a "map" to a query or bound statement at the specified index.

[src]

Bind a "map" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Bind a "set" to a query or bound statement at the specified index.

[src]

Bind a "set" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Bind a "list" to a query or bound statement at the specified index.

[src]

Bind a "list" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Bind a "tuple" to a query or bound statement at the specified index.

[src]

Bind a "tuple" to all the values with the specified name.

This can only be used with statements created by cass_prepared_bind().

[src]

Bind a user defined type to a query or bound statement at the specified index.

[src]

Bind a user defined type to a query or bound statement with the specified name.

Trait Implementations

impl Debug for Statement
[src]

[src]

Formats the value using the given formatter. Read more

impl Send for Statement
[src]

impl Drop for Statement
[src]

[src]

Frees a statement instance. Statements can be immediately freed after being prepared, executed or added to a batch.

impl BindRustType<bool> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<f32> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<f64> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<i32> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<i64> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl<'a> BindRustType<&'a str> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<Set> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<Uuid> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<Map> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

impl BindRustType<Vec<u8>> for Statement
[src]

[src]

binds a rust type to C* by index

[src]

binds a rust type to C* by name

Auto Trait Implementations

impl !Sync for Statement