A collection of values.

Functions

CassCollection *

cass_collection_new

( type, item_count )

Creates a new collection.

Parameters:
Name Type Details
in type
in item_count

The approximate number of items in the collection.

Returns:
Type Details
CassCollection *

Returns a collection that must be freed.

See Also:
CassCollection *

cass_collection_new_from_data_type

( data_type, item_count )

Creates a new collection from an existing data type.

Parameters:
Name Type Details
in data_type
in item_count

The approximate number of items in the collection.

Returns:
Type Details
CassCollection *

Returns a collection that must be freed.

See Also:
void

cass_collection_free

( collection )

Frees a collection instance.

Parameters:
Name Type Details
in collection
CassError

cass_collection_append_int32

( collection, value )

Appends an “int” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_int64

( collection, value )

Appends a “bigint”, “counter” or “timestamp” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_float

( collection, value )

Appends a “float” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_double

( collection, value )

Appends a “double” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_bool

( collection, value )

Appends a “boolean” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_string

( collection, value )

Appends an “ascii”, “text” or “varchar” to the collection.

Parameters:
Name Type Details
in collection
in value

The value is copied into the collection 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_collection_append_string_n

( collection, value, value_length )

Same as CassCollection::cass_collection_append_string, but with lengths for string parameters.

Parameters:
Name Type Details
in collection
in value
in value_length
Returns:
Type Details
CassError

same as CassCollection::cass_collection_append_string

See Also:
CassError

cass_collection_append_bytes

( collection, value, value_size )

Appends a “blob”, “varint” or “custom” to the collection.

Parameters:
Name Type Details
in collection
in value

The value is copied into the collection 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_collection_append_uuid

( collection, value )

Appends a “uuid” or “timeuuid” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_inet

( collection, value )

Appends an “inet” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_decimal

( collection, varint, varint_size, scale )

Appends a “decimal” to the collection.

Parameters:
Name Type Details
in collection
in varint

The value is copied into the collection 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_collection_append_collection

( collection, value )

Appends a “list”, “map” or “set” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_tuple

( collection, value )

Appends a “tuple” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.

CassError

cass_collection_append_user_type

( collection, value )

Appends a “udt” to the collection.

Parameters:
Name Type Details
in collection
in value
Returns:
Type Details
CassError

CASS_OK if successful, otherwise an error occurred.