A tuple of values.

Requires Cassandra: 2.1+

Functions

CassTuple *

cass_tuple_new

( size_t item_count )

Creates a new tuple.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in item_count size_t

The number of items in the tuple.

Returns:
Type Details
CassTuple *

Returns a tuple that must be freed.

See Also:
CassTuple *

cass_tuple_new_from_data_type

( const CassDataType * data_type )

Creates a new tuple from an existing data type.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in data_type const CassDataType *
Returns:
Type Details
CassTuple *

Returns a tuple that must be freed.

See Also:
void

cass_tuple_free

( CassTuple * tuple )

Frees a tuple instance.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
CassError

cass_tuple_set_null

( CassTuple * tuple, size_t index )

Sets an null in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int8

( CassTuple * tuple, size_t index, cass_int8_t value )

Sets a “tinyint” in a tuple at the specified index.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_int8_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int16

( CassTuple * tuple, size_t index, cass_int16_t value )

Sets an “smallint” in a tuple at the specified index.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_int16_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int32

( CassTuple * tuple, size_t index, cass_int32_t value )

Sets an “int” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_uint32

( CassTuple * tuple, size_t index, cass_uint32_t value )

Sets a “date” in a tuple at the specified index.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_uint32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int64

( CassTuple * tuple, size_t index, cass_int64_t value )

Sets a “bigint”, “counter”, “timestamp” or “time” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_int64_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_float

( CassTuple * tuple, size_t index, cass_float_t value )

Sets a “float” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_float_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_double

( CassTuple * tuple, size_t index, cass_double_t value )

Sets a “double” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_double_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_bool

( CassTuple * tuple, size_t index, cass_bool_t value )

Sets a “boolean” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value cass_bool_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_string

( CassTuple * tuple, size_t index, const char * value )

Sets an “ascii”, “text” or “varchar” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const char *

The value is copied into the tuple 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_tuple_set_string_n

( CassTuple * tuple, size_t index, const char * value, size_t value_length )

Same as CassTuple::cass_tuple_set_string, but with lengths for string parameters.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const char *
in value_length size_t
Returns:
Type Details
CassError

same as CassTuple::cass_tuple_set_string

See Also:
CassError

cass_tuple_set_bytes

( CassTuple * tuple, size_t index, const cass_byte_t * value, size_t value_size )

Sets a “blob”, “varint” or “custom” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const cass_byte_t *

The value is copied into the tuple 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_tuple_set_custom

( CassTuple * tuple, size_t index, const char * class_name, const cass_byte_t * value, size_t value_size )

Sets a “custom” in a tuple at the specified index.

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in class_name const char *
in value const cass_byte_t *

The value is copied into the tuple 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_tuple_set_custom_n

( CassTuple * tuple, size_t index, const char * class_name, size_t class_name_length, const cass_byte_t * value, size_t value_size )

Same as CassTuple::cass_tuple_set_custom, but with lengths for string parameters.

Parameters:
Name Type Details
in tuple CassTuple *
in index 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 CassTuple::cass_tuple_set_custom

See Also:
CassError

cass_tuple_set_uuid

( CassTuple * tuple, size_t index, CassUuid value )

Sets a “uuid” or “timeuuid” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value CassUuid
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_inet

( CassTuple * tuple, size_t index, CassInet value )

Sets an “inet” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value CassInet
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_decimal

( CassTuple * tuple, size_t index, const cass_byte_t * varint, size_t varint_size, cass_int32_t scale )

Sets a “decimal” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in varint const cass_byte_t *

The value is copied into the tuple 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_tuple_set_duration

( CassTuple * tuple, size_t index, cass_int32_t months, cass_int32_t days, cass_int32_t nanos )

Sets a “duration” in a tuple at the specified index.

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in months cass_int32_t
in days cass_int32_t
in nanos cass_int32_t
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_collection

( CassTuple * tuple, size_t index, const CassCollection * value )

Sets a “list”, “map” or “set” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const CassCollection *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_tuple

( CassTuple * tuple, size_t index, const CassTuple * value )

Sets a “tuple” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const CassTuple *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_user_type

( CassTuple * tuple, size_t index, const CassUserType * value )

Sets a “udt” in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple CassTuple *
in index size_t
in value const CassUserType *
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.