Menu

CassPrepared

struct CassPrepared

A statement that has been prepared cluster-side (It has been pre-parsed and cached).

A prepared statement is read-only and it is thread-safe to concurrently bind new statements.

Public Functions

void cass_prepared_free(const CassPrepared *prepared)

Frees a prepared instance.

Parameters
  • prepared:

CassStatement *cass_prepared_bind(const CassPrepared *prepared)

Creates a bound statement from a pre-prepared statement.

Return

Returns a bound statement that must be freed.

See

cass_statement_free()

Parameters
  • prepared:

CassError cass_prepared_parameter_name(const CassPrepared *prepared, size_t index, const char **name, size_t *name_length)

Gets the name of a parameter at the specified index.

Return

CASS_OK if successful, otherwise an error occurred.

Parameters
  • prepared:

  • index:

  • name:

  • name_length:

const CassDataType *cass_prepared_parameter_data_type(const CassPrepared *prepared, size_t index)

Gets the data type of a parameter at the specified index.

Return

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

Parameters
  • prepared:

  • index:

const CassDataType *cass_prepared_parameter_data_type_by_name(const CassPrepared *prepared, const char *name)

Gets the data type of a parameter for the specified name.

Return

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

Parameters
  • prepared:

  • name:

const CassDataType *cass_prepared_parameter_data_type_by_name_n(const CassPrepared *prepared, const char *name, size_t name_length)

Same as cass_prepared_parameter_data_type_by_name(), but with lengths for string parameters.

Return

Returns a reference to the data type of the parameter. Do not free this reference as it is bound to the lifetime of the prepared.

See

cass_prepared_parameter_data_type_by_name()

Parameters
  • prepared:

  • name:

  • name_length: