A single primitive value or a collection of values.

Functions

CassIterator *

cass_iterator_from_collection

( value )

Creates a new iterator for the specified collection. This can be used to iterate over values in a collection.

Parameters:
Name Type Details
in value
Returns:
Type Details
CassIterator *

A new iterator that must be freed. NULL returned if the value is not a collection.

See Also:
CassIterator *

cass_iterator_from_map

( value )

Creates a new iterator for the specified map. This can be used to iterate over key/value pairs in a map.

Parameters:
Name Type Details
in value
Returns:
Type Details
CassIterator *

A new iterator that must be freed. NULL returned if the value is not a map.

See Also:
CassIterator *

cass_iterator_from_tuple

( value )

Creates a new iterator for the specified tuple. This can be used to iterate over values in a tuple.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in value
Returns:
Type Details
CassIterator *

A new iterator that must be freed. NULL returned if the value is not a tuple.

See Also:
CassIterator *

cass_iterator_fields_from_user_type

( value )

Creates a new iterator for the specified user defined type. This can be used to iterate over fields in a user defined type.

Requires Cassandra: 2.1+

Parameters:
Name Type Details
in value
Returns:
Type Details
CassIterator *

A new iterator that must be freed. NULL returned if the value is not a user defined type.

See Also:
const CassDataType *

cass_value_data_type

( value )

Gets the data type of a value.

Parameters:
Name Type Details
in value
Returns:
Type Details
const CassDataType *

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

CassError

cass_value_get_int8

( value, output )

Gets an int8 for the specified value.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_int16

( value, output )

Gets an int16 for the specified value.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_int32

( value, output )

Gets an int32 for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_uint32

( value, output )

Gets an uint32 for the specified value.

Requires Cassandra: 2.2+

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_int64

( value, output )

Gets an int64 for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_float

( value, output )

Gets a float for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_double

( value, output )

Gets a double for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_bool

( value, output )

Gets a bool for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_uuid

( value, output )

Gets a UUID for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_inet

( value, output )

Gets an INET for the specified value.

Parameters:
Name Type Details
in value
out output
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_string

( value, output, output_size )

Gets a string for the specified value.

Parameters:
Name Type Details
in value
out output
out output_size
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_bytes

( value, output, output_size )

Gets the bytes of the specified value.

Parameters:
Name Type Details
in value
out output
out output_size
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_decimal

( value, varint, varint_size, scale )

Gets a decimal for the specified value.

Parameters:
Name Type Details
in value
out varint
out varint_size
out scale
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassError

cass_value_get_duration

( value, months, days, nanos )

Gets a duration for the specified value.

Requires Cassandra: 3.10+

Parameters:
Name Type Details
in value
out months
out days
out nanos
Returns:
Type Details
CassError

CASS_OK if successful, otherwise error occurred

CassValueType

cass_value_type

( value )

Gets the type of the specified value.

Parameters:
Name Type Details
in value
Returns:
Type Details
CassValueType

The type of the specified value.

cass_bool_t

cass_value_is_null

( value )

Returns true if a specified value is null.

Parameters:
Name Type Details
in value
Returns:
Type Details
cass_bool_t

true if the value is null, otherwise false.

cass_bool_t

cass_value_is_collection

( value )

Returns true if a specified value is a collection.

Parameters:
Name Type Details
in value
Returns:
Type Details
cass_bool_t

true if the value is a collection, otherwise false.

cass_bool_t

cass_value_is_duration

( value )

Returns true if a specified value is a duration.

Parameters:
Name Type Details
in value
Returns:
Type Details
cass_bool_t

true if the value is a duration, otherwise false.

size_t

cass_value_item_count

( collection )

Get the number of items in a collection. Works for all collection types.

Parameters:
Name Type Details
in collection
Returns:
Type Details
size_t

Count of items in a collection. 0 if not a collection.

CassValueType

cass_value_primary_sub_type

( collection )

Get the primary sub-type for a collection. This returns the sub-type for a list or set and the key type for a map.

Parameters:
Name Type Details
in collection
Returns:
Type Details
CassValueType

The type of the primary sub-type. CASS_VALUE_TYPE_UNKNOWN returned if not a collection.

CassValueType

cass_value_secondary_sub_type

( collection )

Get the secondary sub-type for a collection. This returns the value type for a map.

Parameters:
Name Type Details
in collection
Returns:
Type Details
CassValueType

The type of the primary sub-type. CASS_VALUE_TYPE_UNKNOWN returned if not a collection or not a map.