A tuple of values.

Requires Cassandra: 2.1+

Functions

CassTuple *

cass_tuple_new

( item_count )

Creates a new tuple.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in item_count

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

( data_type )

Creates a new tuple from an existing data type.

Requires Cassandra: 2.1+

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

Returns a tuple that must be freed.

See Also:
void

cass_tuple_free

( tuple )

Frees a tuple instance.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
CassError

cass_tuple_set_null

( tuple, index )

Sets an null in a tuple at the specified index.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int8

( tuple, index, value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int16

( tuple, index, value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int32

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_uint32

( tuple, index, value )

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

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_int64

( tuple, index, 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
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_float

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_double

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_bool

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_string

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value

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

( tuple, index, value, 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
in index
in value
in value_length
Returns:
Type Details
CassError

same as CassTuple::cass_tuple_set_string

See Also:
CassError

cass_tuple_set_bytes

( tuple, index, value, 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
in index
in value

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

in value_size
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_custom

( tuple, index, class_name, value, value_size )

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

Parameters:
Name Type Details
in tuple
in index
in class_name
in value

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

in value_size
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_custom_n

( tuple, index, class_name, class_name_length, value, value_size )

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

Parameters:
Name Type Details
in tuple
in index
in class_name
in class_name_length
in value
in value_size
Returns:
Type Details
CassError

same as CassTuple::cass_tuple_set_custom

See Also:
CassError

cass_tuple_set_uuid

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_inet

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_decimal

( tuple, index, varint, varint_size, scale )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in varint

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

in varint_size
in scale
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_duration

( tuple, index, months, days, nanos )

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

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in tuple
in index
in months
in days
in nanos
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_collection

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_tuple

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_tuple_set_user_type

( tuple, index, value )

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

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in tuple
in index
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.