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.

Functions

CassStatement *

cass_statement_new

( const char * query, size_t parameter_count )

Creates a new query statement.

Parameters:
Name Type Details
in query const char *

The query is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in parameter_count size_t

The number of bound parameters.

Returns:
Type Details
CassStatement *

Returns a statement that must be freed.

See Also:
CassStatement *

cass_statement_new_n

( const char * query, size_t query_length, size_t parameter_count )

Same as CassStatement::cass_statement_new, but with lengths for string parameters.

Parameters:
Name Type Details
in query const char *
in query_length size_t
in parameter_count size_t
Returns:
Type Details
CassStatement *

same as CassStatement::cass_statement_new

See Also:
CassError

cass_statement_reset_parameters

( CassStatement * statement, size_t count )

Clear and/or resize the statement’s parameters.

Parameters:
Name Type Details
in statement CassStatement *
in count size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

void

cass_statement_free

( CassStatement * statement )

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

Parameters:
Name Type Details
in statement CassStatement *
CassError

cass_statement_add_key_index

( CassStatement * statement, size_t index )

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.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_keyspace

( CassStatement * statement, const char * keyspace )

Sets the statement’s keyspace. This is used for token-aware routing and when using protocol v5 or greater it also overrides the session’s current keyspace for the statement.

This is not necessary and will not work for bound statements, as the keyspace is determined by the prepared statement metadata.

Parameters:
Name Type Details
in statement CassStatement *
in keyspace const char *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_keyspace_n

( CassStatement * statement, const char * keyspace, size_t keyspace_length )

Same as CassStatement::cass_statement_set_keyspace, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in keyspace const char *
in keyspace_length size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_set_keyspace

See Also:
CassError

cass_statement_set_consistency

( CassStatement * statement, CassConsistency consistency )

Sets the statement’s consistency level.

Default: CASS_CONSISTENCY_LOCAL_ONE

Parameters:
Name Type Details
in statement CassStatement *
in consistency CassConsistency
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_serial_consistency

( CassStatement * statement, CassConsistency serial_consistency )

Sets the statement’s serial consistency level.

Requires Cassandra: 2.0+

Default: Not set

Parameters:
Name Type Details
in statement CassStatement *
in serial_consistency CassConsistency
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_paging_size

( CassStatement * statement, int page_size )

Sets the statement’s page size.

Requires Cassandra: 2.0+

Default: -1 (Disabled)

Parameters:
Name Type Details
in statement CassStatement *
in page_size int
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_paging_state

( CassStatement * statement, const CassResult * result )

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

Requires Cassandra: 2.0+

Parameters:
Name Type Details
in statement CassStatement *
in result const CassResult *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_paging_state_token

( CassStatement * statement, const char * paging_state, size_t paging_state_size )

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

Requires Cassandra: 2.0+

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.

Parameters:
Name Type Details
in statement CassStatement *
in paging_state const char *
in paging_state_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

See Also:
CassError

cass_statement_set_timestamp

( CassStatement * statement, cass_int64_t timestamp )

Sets the statement’s timestamp.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in timestamp cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_request_timeout

( CassStatement * statement, cass_uint64_t timeout_ms )

Sets the statement’s timeout for waiting for a response from a node.

Default: Disabled (use the cluster-level request timeout)

Parameters:
Name Type Details
in statement CassStatement *
in timeout_ms cass_uint64_t

Request timeout in milliseconds. Use 0 for no timeout or CASS_UINT64_MAX to disable (to use the cluster-level request timeout).

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

See Also:
CassError

cass_statement_set_is_idempotent

( CassStatement * statement, cass_bool_t is_idempotent )

Sets whether the statement is idempotent. Idempotent statements are able to be automatically retried after timeouts/errors and can be speculatively executed.

Parameters:
Name Type Details
in statement CassStatement *
in is_idempotent cass_bool_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

See Also:
CassError

cass_statement_set_retry_policy

( CassStatement * statement, CassRetryPolicy * retry_policy )

Sets the statement’s retry policy.

Parameters:
Name Type Details
in statement CassStatement *
in retry_policy CassRetryPolicy *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_set_custom_payload

( CassStatement * statement, const CassCustomPayload * payload )

Sets the statement’s custom payload.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in payload const CassCustomPayload *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_null

( CassStatement * statement, size_t index )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_null_by_name

( CassStatement * statement, const char * name )

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

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_null_by_name_n

( CassStatement * statement, const char * name, size_t name_length )

Same as CassStatement::cass_statement_bind_null_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_null_by_name

See Also:
CassError

cass_statement_bind_int8

( CassStatement * statement, size_t index, cass_int8_t value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_int8_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int8_by_name

( CassStatement * statement, const char * name, cass_int8_t value )

Binds a “tinyint” to all the values with the specified name.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_int8_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int8_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_int8_t value )

Same as CassStatement::cass_statement_bind_int8_by_name, but with lengths for string parameters.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_int8_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_int8_by_name

See Also:
CassError

cass_statement_bind_int16

( CassStatement * statement, size_t index, cass_int16_t value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_int16_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int16_by_name

( CassStatement * statement, const char * name, cass_int16_t value )

Binds an “smallint” to all the values with the specified name.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_int16_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int16_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_int16_t value )

Same as CassStatement::cass_statement_bind_int16_by_name, but with lengths for string parameters.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_int16_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_int16_by_name

See Also:
CassError

cass_statement_bind_int32

( CassStatement * statement, size_t index, cass_int32_t value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int32_by_name

( CassStatement * statement, const char * name, cass_int32_t value )

Binds an “int” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int32_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_int32_t value )

Same as CassStatement::cass_statement_bind_int32_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_int32_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_int32_by_name

See Also:
CassError

cass_statement_bind_uint32

( CassStatement * statement, size_t index, cass_uint32_t value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_uint32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_uint32_by_name

( CassStatement * statement, const char * name, cass_uint32_t value )

Binds a “date” to all the values with the specified name.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_uint32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_uint32_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_uint32_t value )

Same as CassStatement::cass_statement_bind_uint32_by_name, but with lengths for string parameters.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_uint32_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_uint32_by_name

See Also:
CassError

cass_statement_bind_int64

( CassStatement * statement, size_t index, cass_int64_t value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int64_by_name

( CassStatement * statement, const char * name, cass_int64_t value )

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

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_int64_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_int64_t value )

Same as CassStatement::cass_statement_bind_int64_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_int64_t
Returns:
Type Details
CassError

same as cass_statement_bind_int64_by_name(0

See Also:
CassError

cass_statement_bind_float

( CassStatement * statement, size_t index, cass_float_t value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_float_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_float_by_name

( CassStatement * statement, const char * name, cass_float_t value )

Binds a “float” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_float_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_float_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_float_t value )

Same as CassStatement::cass_statement_bind_float_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_float_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_float_by_name

See Also:
CassError

cass_statement_bind_double

( CassStatement * statement, size_t index, cass_double_t value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_double_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_double_by_name

( CassStatement * statement, const char * name, cass_double_t value )

Binds a “double” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_double_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_double_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_double_t value )

Same as CassStatement::cass_statement_bind_double_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_double_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_double_by_name

See Also:
CassError

cass_statement_bind_bool

( CassStatement * statement, size_t index, cass_bool_t value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value cass_bool_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_bool_by_name

( CassStatement * statement, const char * name, cass_bool_t value )

Binds a “boolean” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value cass_bool_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_bool_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_bool_t value )

Same as CassStatement::cass_statement_bind_bool_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value cass_bool_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_bool_by_name

See Also:
CassError

cass_statement_bind_string

( CassStatement * statement, size_t index, const char * value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value const char *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_string_n

( CassStatement * statement, size_t index, const char * value, size_t value_length )

Same as CassStatement::cass_statement_bind_string, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value const char *
in value_length size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_string

See Also:
CassError

cass_statement_bind_string_by_name

( CassStatement * statement, const char * name, const char * value )

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

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value const char *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_string_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const char * value, size_t value_length )

Same as CassStatement::cass_statement_bind_string_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value const char *
in value_length size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_string_by_name

See Also:
CassError

cass_statement_bind_bytes

( CassStatement * statement, size_t index, const cass_byte_t * value, size_t value_size )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in value_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_bytes_by_name

( CassStatement * statement, const char * name, const cass_byte_t * value, size_t value_size )

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

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in value_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_bytes_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const cass_byte_t * value, size_t value_size )

Same as CassStatement::cass_statement_bind_bytes_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value const cass_byte_t *
in value_size size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_bytes_by_name

See Also:
CassError

cass_statement_bind_custom

( CassStatement * statement, size_t index, const char * class_name, const cass_byte_t * value, size_t value_size )

Binds a “custom” to a query or bound statement at the specified index.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in class_name const char *
in value const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in value_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_custom_n

( CassStatement * statement, size_t index, const char * class_name, size_t class_name_length, const cass_byte_t * value, size_t value_size )

Same as CassStatement::cass_statement_bind_custom, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in class_name const char *
in class_name_length size_t
in value const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in value_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_custom_by_name

( CassStatement * statement, const char * name, const char * class_name, const cass_byte_t * value, size_t value_size )

Binds a “custom” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in class_name const char *
in value const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in value_size size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_custom_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const char * class_name, size_t class_name_length, const cass_byte_t * value, size_t value_size )

Same as CassStatement::cass_statement_bind_custom_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in class_name const char *
in class_name_length size_t
in value const cass_byte_t *
in value_size size_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_custom_by_name

See Also:
CassError

cass_statement_bind_uuid

( CassStatement * statement, size_t index, CassUuid value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value CassUuid
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_uuid_by_name

( CassStatement * statement, const char * name, CassUuid value )

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

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value CassUuid
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_uuid_by_name_n

( CassStatement * statement, const char * name, size_t name_length, CassUuid value )

Same as CassStatement::cass_statement_bind_uuid_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value CassUuid
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_uuid_by_name

See Also:
CassError

cass_statement_bind_inet

( CassStatement * statement, size_t index, CassInet value )

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

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in value CassInet
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_inet_by_name

( CassStatement * statement, const char * name, CassInet value )

Binds an “inet” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in value CassInet
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_inet_by_name_n

( CassStatement * statement, const char * name, size_t name_length, CassInet value )

Same as CassStatement::cass_statement_bind_inet_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in value CassInet
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_inet_by_name

See Also:
CassError

cass_statement_bind_decimal

( CassStatement * statement, size_t index, const cass_byte_t * varint, size_t varint_size, cass_int32_t scale )

Bind a “decimal” to a query or bound statement at the specified index.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in varint const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in varint_size size_t
in scale cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_decimal_by_name

( CassStatement * statement, const char * name, const cass_byte_t * varint, size_t varint_size, cass_int32_t scale )

Binds a “decimal” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in varint const cass_byte_t *

The value is copied into the statement object; the memory pointed to by this parameter can be freed after this call.

in varint_size size_t
in scale cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_decimal_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const cass_byte_t * varint, size_t varint_size, cass_int32_t scale )

Same as CassStatement::cass_statement_bind_decimal_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in varint const cass_byte_t *
in varint_size size_t
in scale cass_int32_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_decimal_by_name

See Also:
CassError

cass_statement_bind_duration

( CassStatement * statement, size_t index, cass_int32_t months, cass_int32_t days, cass_int64_t nanos )

Binds a “duration” to a query or bound statement at the specified index.

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in months cass_int32_t
in days cass_int32_t
in nanos cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_duration_by_name

( CassStatement * statement, const char * name, cass_int32_t months, cass_int32_t days, cass_int64_t nanos )

Binds a “duration” to all the values with the specified name.

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in months cass_int32_t
in days cass_int32_t
in nanos cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_duration_by_name_n

( CassStatement * statement, const char * name, size_t name_length, cass_int32_t months, cass_int32_t days, cass_int64_t nanos )

Same as CassStatement::cass_statement_bind_duration_by_name, but with lengths for string parameters.

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in months cass_int32_t
in days cass_int32_t
in nanos cass_int64_t
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_duration_by_name

See Also:
CassError

cass_statement_bind_collection

( CassStatement * statement, size_t index, const CassCollection * collection )

Bind a “list”, “map” or “set” to a query or bound statement at the specified index.

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in collection const CassCollection *

The collection can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_collection_by_name

( CassStatement * statement, const char * name, const CassCollection * collection )

Bind a “list”, “map” or “set” to all the values with the specified name.

This can only be used with statements created by CassPrepared::cass_prepared_bind when using Cassandra 2.0 or earlier.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in collection const CassCollection *

The collection can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_collection_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const CassCollection * collection )

Same as CassStatement::cass_statement_bind_collection_by_name, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in collection const CassCollection *
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_collection_by_name

See Also:
CassError

cass_statement_bind_tuple

( CassStatement * statement, size_t index, const CassTuple * tuple )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in tuple const CassTuple *

The tuple can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_tuple_by_name

( CassStatement * statement, const char * name, const CassTuple * tuple )

Bind a “tuple” to all the values with the specified name.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in tuple const CassTuple *

The tuple can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_tuple_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const CassTuple * tuple )

Same as CassStatement::cass_statement_bind_tuple_by_name, but with lengths for string parameters.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in tuple const CassTuple *
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_tuple_by_name

See Also:
CassError

cass_statement_bind_user_type

( CassStatement * statement, size_t index, const CassUserType * user_type )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in index size_t
in user_type const CassUserType *

The user type can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_user_type_by_name

( CassStatement * statement, const char * name, const CassUserType * user_type )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in user_type const CassUserType *

The user type can be freed after this call.

Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_statement_bind_user_type_by_name_n

( CassStatement * statement, const char * name, size_t name_length, const CassUserType * user_type )

Same as CassStatement::cass_statement_bind_user_type_by_name, but with lengths for string parameters.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
in user_type const CassUserType *
Returns:
Type Details
CassError

same as CassStatement::cass_statement_bind_user_type_by_name

See Also:
CassError

cass_statement_set_execution_profile

( CassStatement * statement, const char * name )

Sets the execution profile to execute the statement with.

Note: NULL or empty string will clear execution profile from statement

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

See Also:
CassError

cass_statement_set_execution_profile_n

( CassStatement * statement, const char * name, size_t name_length )

Same as CassStatement::cass_statement_set_execution_profile, but with lengths for string parameters.

Parameters:
Name Type Details
in statement CassStatement *
in name const char *
in name_length size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

See Also: