Menu

CassDataType

struct CassDataType

A data type used to describe a value, collection or user defined type.

Public Functions

CassDataType *cass_data_type_new(CassValueType type)

Creates a new data type with value type.

Return

Returns a data type that must be freed.

See

cass_data_type_free()

Parameters
  • type:

CassDataType *cass_data_type_new_from_existing(const CassDataType *data_type)

Creates a new data type from an existing data type.

Return

Returns a data type that must be freed.

See

cass_data_type_free()

Parameters
  • data_type:

CassDataType *cass_data_type_new_tuple(size_t item_count)

Creates a new tuple data type.

Requires Apache Cassandra: 2.1+

Return

Returns a data type that must be freed.

See

cass_data_type_free()

Parameters
  • item_count: The number of items in the tuple

CassDataType *cass_data_type_new_udt(size_t field_count)

Creates a new UDT (user defined type) data type.

Requires Apache Cassandra: 2.1+

Return

Returns a data type that must be freed.

See

cass_data_type_free()

Parameters
  • field_count: The number of fields in the UDT

void cass_data_type_free(CassDataType *data_type)

Frees a data type instance.

Parameters
  • data_type:

CassError cass_data_type_set_type_name_n(CassDataType *data_type, const char *type_name, size_t type_name_length)

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

Return

Returns a data type that must be freed.

Parameters
  • data_type:

  • type_name:

  • type_name_length:

CassError cass_data_type_set_keyspace_n(CassDataType *data_type, const char *keyspace, size_t keyspace_length)

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

Requires Apache Cassandra: 2.1+

Return

Returns a data type that must be freed.

Parameters
  • data_type:

  • keyspace:

  • keyspace_length:

CassError cass_data_type_set_class_name_n(CassDataType *data_type, const char *class_name, size_t class_name_length)

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

Return

Returns a data type that must be freed.

Parameters
  • data_type:

  • class_name:

  • class_name_length:

const CassDataType *cass_data_type_sub_data_type_by_name_n(const CassDataType *data_type, const char *name, size_t name_length)

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

Requires Apache Cassandra: 2.1+

Return

Returns a reference to a child data type. Do not free this reference as it is bound to the lifetime of the parent data type. NULL is returned if the name doesn’t exist.

Parameters
  • data_type:

  • name:

  • name_length: