file cassandra.h
C/C++ driver for Apache Cassandra. Uses the Cassandra Query Language versions 3 over the Cassandra Binary Protocol (versions 1, 2, or 3).
Macros
CASS_VERSION_MAJOR
=2
CASS_VERSION_MINOR
=7
CASS_VERSION_PATCH
=1
CASS_VERSION_SUFFIX
=""
CASS_UINT64_MAX
=18446744073709551615ULL
CASS_INET_V4_LENGTH
=4
The size of an IPv4 address
CASS_INET_V6_LENGTH
=16
The size of an IPv6 address
CASS_INET_STRING_LENGTH
=46
The size of an inet string including a null terminator.
CASS_UUID_STRING_LENGTH
=37
The size of a hexadecimal UUID string including a null terminator.
CASS_CONSISTENCY_MAPPING
=XX(CASS_CONSISTENCY_UNKNOWN, "UNKNOWN") \
XX(CASS_CONSISTENCY_ANY, "ANY") \
XX(CASS_CONSISTENCY_ONE, "ONE") \
XX(CASS_CONSISTENCY_TWO, "TWO") \
XX(CASS_CONSISTENCY_THREE, "THREE") \
XX(CASS_CONSISTENCY_QUORUM, "QUORUM") \
XX(CASS_CONSISTENCY_ALL, "ALL") \
XX(CASS_CONSISTENCY_LOCAL_QUORUM, "LOCAL_QUORUM") \
XX(CASS_CONSISTENCY_EACH_QUORUM, "EACH_QUORUM") \
XX(CASS_CONSISTENCY_SERIAL, "SERIAL") \
XX(CASS_CONSISTENCY_LOCAL_SERIAL, "LOCAL_SERIAL") \
XX(CASS_CONSISTENCY_LOCAL_ONE, "LOCAL_ONE")
CASS_WRITE_TYPE_MAPPING
=XX(CASS_WRITE_TYPE_SIMPLE, "SIMPLE") \
XX(CASS_WRITE_TYPE_BATCH, "BATCH") \
XX(CASS_WRITE_TYPE_UNLOGGED_BATCH, "UNLOGGED_BATCH") \
XX(CASS_WRITE_TYPE_COUNTER, "COUNTER") \
XX(CASS_WRITE_TYPE_BATCH_LOG, "BATCH_LOG") \
XX(CASS_WRITE_TYPE_CAS, "CAS") \
XX(CASS_WRITE_TYPE_VIEW, "VIEW") \
XX(CASS_WRITE_TYPE_CDC, "CDC")
CASS_VALUE_TYPE_MAPPING
=XX(CASS_VALUE_TYPE_CUSTOM, 0x0000, "", "") \
XX(CASS_VALUE_TYPE_ASCII, 0x0001, "ascii", "org.apache.cassandra.db.marshal.AsciiType") \
XX(CASS_VALUE_TYPE_BIGINT, 0x0002, "bigint", "org.apache.cassandra.db.marshal.LongType") \
XX(CASS_VALUE_TYPE_BLOB, 0x0003, "blob", "org.apache.cassandra.db.marshal.BytesType") \
XX(CASS_VALUE_TYPE_BOOLEAN, 0x0004, "boolean", "org.apache.cassandra.db.marshal.BooleanType") \
XX(CASS_VALUE_TYPE_COUNTER, 0x0005, "counter", "org.apache.cassandra.db.marshal.CounterColumnType") \
XX(CASS_VALUE_TYPE_DECIMAL, 0x0006, "decimal", "org.apache.cassandra.db.marshal.DecimalType") \
XX(CASS_VALUE_TYPE_DOUBLE, 0x0007, "double", "org.apache.cassandra.db.marshal.DoubleType") \
XX(CASS_VALUE_TYPE_FLOAT, 0x0008, "float", "org.apache.cassandra.db.marshal.FloatType") \
XX(CASS_VALUE_TYPE_INT, 0x0009, "int", "org.apache.cassandra.db.marshal.Int32Type") \
XX(CASS_VALUE_TYPE_TEXT, 0x000A, "text", "org.apache.cassandra.db.marshal.UTF8Type") \
XX(CASS_VALUE_TYPE_TIMESTAMP, 0x000B, "timestamp", "org.apache.cassandra.db.marshal.TimestampType") \
XX(CASS_VALUE_TYPE_UUID, 0x000C, "uuid", "org.apache.cassandra.db.marshal.UUIDType") \
XX(CASS_VALUE_TYPE_VARCHAR, 0x000D, "varchar", "") \
XX(CASS_VALUE_TYPE_VARINT, 0x000E, "varint", "org.apache.cassandra.db.marshal.IntegerType") \
XX(CASS_VALUE_TYPE_TIMEUUID, 0x000F, "timeuuid", "org.apache.cassandra.db.marshal.TimeUUIDType") \
XX(CASS_VALUE_TYPE_INET, 0x0010, "inet", "org.apache.cassandra.db.marshal.InetAddressType") \
XX(CASS_VALUE_TYPE_DATE, 0x0011, "date", "org.apache.cassandra.db.marshal.SimpleDateType") \
XX(CASS_VALUE_TYPE_TIME, 0x0012, "time", "org.apache.cassandra.db.marshal.TimeType") \
XX(CASS_VALUE_TYPE_SMALL_INT, 0x0013, "smallint", "org.apache.cassandra.db.marshal.ShortType") \
XX(CASS_VALUE_TYPE_TINY_INT, 0x0014, "tinyint", "org.apache.cassandra.db.marshal.ByteType") \
XX(CASS_VALUE_TYPE_DURATION, 0x0015, "duration", "org.apache.cassandra.db.marshal.DurationType") \
XX(CASS_VALUE_TYPE_LIST, 0x0020, "list", "org.apache.cassandra.db.marshal.ListType") \
XX(CASS_VALUE_TYPE_MAP, 0x0021, "map", "org.apache.cassandra.db.marshal.MapType") \
XX(CASS_VALUE_TYPE_SET, 0x0022, "set", "org.apache.cassandra.db.marshal.SetType") \
XX(CASS_VALUE_TYPE_UDT, 0x0030, "", "") \
XX(CASS_VALUE_TYPE_TUPLE, 0x0031, "tuple", "org.apache.cassandra.db.marshal.TupleType")
CASS_LOG_LEVEL_MAPPING
=XX(CASS_LOG_DISABLED, "") \
XX(CASS_LOG_CRITICAL, "CRITICAL") \
XX(CASS_LOG_ERROR, "ERROR") \
XX(CASS_LOG_WARN, "WARN") \
XX(CASS_LOG_INFO, "INFO") \
XX(CASS_LOG_DEBUG, "DEBUG") \
XX(CASS_LOG_TRACE, "TRACE")
CASS_ERROR_MAPPING
=
CASS_LOG_MAX_MESSAGE_SIZE
=1024
Maximum size of a log message
Types
cass_float_t
typedef float cass_float_t
cass_double_t
typedef double cass_double_t
cass_int8_t
typedef int8_t cass_int8_t
cass_uint8_t
typedef uint8_t cass_uint8_t
cass_int16_t
typedef int16_t cass_int16_t
cass_uint16_t
typedef uint16_t cass_uint16_t
cass_int32_t
typedef int32_t cass_int32_t
cass_uint32_t
typedef uint32_t cass_uint32_t
cass_int64_t
typedef int64_t cass_int64_t
cass_uint64_t
typedef uint64_t cass_uint64_t
cass_byte_t
typedef cass_uint8_t cass_byte_t
cass_duration_t
typedef cass_uint64_t cass_duration_t
CassCluster
typedef struct CassCluster_ CassCluster
CassSession
typedef struct CassSession_ CassSession
CassStatement
typedef struct CassStatement_ CassStatement
CassBatch
typedef struct CassBatch_ CassBatch
CassFuture
typedef struct CassFuture_ CassFuture
CassPrepared
typedef struct CassPrepared_ CassPrepared
CassResult
typedef struct CassResult_ CassResult
CassErrorResult
typedef struct CassErrorResult_ CassErrorResult
CassIterator
typedef struct CassIterator_ CassIterator
CassRow
typedef struct CassRow_ CassRow
CassValue
typedef struct CassValue_ CassValue
CassDataType
typedef struct CassDataType_ CassDataType
CassFunctionMeta
typedef struct CassFunctionMeta_ CassFunctionMeta
CassAggregateMeta
typedef struct CassAggregateMeta_ CassAggregateMeta
CassCollection
typedef struct CassCollection_ CassCollection
CassTuple
typedef struct CassTuple_ CassTuple
CassUserType
typedef struct CassUserType_ CassUserType
CassSsl
typedef struct CassSsl_ CassSsl
CassSchemaMeta
typedef struct CassSchemaMeta_ CassSchemaMeta
CassKeyspaceMeta
typedef struct CassKeyspaceMeta_ CassKeyspaceMeta
CassTableMeta
typedef struct CassTableMeta_ CassTableMeta
CassMaterializedViewMeta
typedef struct CassMaterializedViewMeta_ CassMaterializedViewMeta
CassColumnMeta
typedef struct CassColumnMeta_ CassColumnMeta
CassIndexMeta
typedef struct CassIndexMeta_ CassIndexMeta
CassUuidGen
typedef struct CassUuidGen_ CassUuidGen
CassTimestampGen
typedef struct CassTimestampGen_ CassTimestampGen
CassRetryPolicy
typedef struct CassRetryPolicy_ CassRetryPolicy
CassCustomPayload
typedef struct CassCustomPayload_ CassCustomPayload
CassFutureCallback
typedef void(* CassFutureCallback) (CassFuture *future, void *data)
A callback that’s notified when the future is set.
CassLogCallback
typedef void(* CassLogCallback) (const CassLogMessage *message, void *data)
A callback that’s used to handle logging.
CassMallocFunction
typedef void*(* CassMallocFunction) (size_t size)
A custom malloc function. This function should allocate “size” bytes and return a pointer to that memory
CassReallocFunction
typedef void*(* CassReallocFunction) (void *ptr, size_t size)
A custom realloc function. This function attempts to change the size of the memory pointed to by “ptr”. If the memory cannot be resized then new memory should be allocated and contain the contents of the original memory at “ptr”.
CassFreeFunction
typedef void(* CassFreeFunction) (void *ptr)
A custom free function. This function deallocates the memory pointed to by “ptr” that was previously allocated by a “CassMallocFunction” or “CassReallocFunction” function.
CassAuthenticator
typedef struct CassAuthenticator_ CassAuthenticator
CassAuthenticatorInitialCallback
typedef void(* CassAuthenticatorInitialCallback) (CassAuthenticator *auth, void *data)
A callback used to initiate an authentication exchange.
Use CassAuthenticator::cass_authenticator_set_response
to set the response token.
Use CassAuthenticator::cass_authenticator_set_error
if an error occured during initialization.
CassAuthenticatorChallengeCallback
typedef void(* CassAuthenticatorChallengeCallback) (CassAuthenticator *auth, void *data, const char *token, size_t token_size)
A callback used when an authentication challenge initiated by the server.
Use CassAuthenticator::cass_authenticator_set_response
to set the response token.
Use CassAuthenticator::cass_authenticator_set_error
if an error occured during the challenge.
CassAuthenticatorSuccessCallback
typedef void(* CassAuthenticatorSuccessCallback) (CassAuthenticator *auth, void *data, const char *token, size_t token_size)
A callback used to indicate the success of the authentication exchange.
Use CassAuthenticator::cass_authenticator_set_error
if an error occured while evaluating the success token.
CassAuthenticatorCleanupCallback
typedef void(* CassAuthenticatorCleanupCallback) (CassAuthenticator *auth, void *data)
A callback used to cleanup resources that were acquired during the process of the authentication exchange. This is called after the termination of the exchange regardless of the outcome.
CassAuthenticatorDataCleanupCallback
typedef void(* CassAuthenticatorDataCleanupCallback) (void *data)
A callback used to cleanup resources.
Enums
cass_bool_t
-
cass_false
= 0 -
cass_true
= 1
CassConsistency
-
CASS_CONSISTENCY_UNKNOWN
= 0xFFFF -
CASS_CONSISTENCY_ANY
= 0x0000 -
CASS_CONSISTENCY_ONE
= 0x0001 -
CASS_CONSISTENCY_TWO
= 0x0002 -
CASS_CONSISTENCY_THREE
= 0x0003 -
CASS_CONSISTENCY_QUORUM
= 0x0004 -
CASS_CONSISTENCY_ALL
= 0x0005 -
CASS_CONSISTENCY_LOCAL_QUORUM
= 0x0006 -
CASS_CONSISTENCY_EACH_QUORUM
= 0x0007 -
CASS_CONSISTENCY_SERIAL
= 0x0008 -
CASS_CONSISTENCY_LOCAL_SERIAL
= 0x0009 -
CASS_CONSISTENCY_LOCAL_ONE
= 0x000A
CassWriteType
CASS_WRITE_TYPE_UNKNOWN
CASS_WRITE_TYPE_SIMPLE
CASS_WRITE_TYPE_BATCH
CASS_WRITE_TYPE_UNLOGGED_BATCH
CASS_WRITE_TYPE_COUNTER
CASS_WRITE_TYPE_BATCH_LOG
CASS_WRITE_TYPE_CAS
CASS_WRITE_TYPE_VIEW
CASS_WRITE_TYPE_CDC
CassColumnType
CASS_COLUMN_TYPE_REGULAR
CASS_COLUMN_TYPE_PARTITION_KEY
CASS_COLUMN_TYPE_CLUSTERING_KEY
CASS_COLUMN_TYPE_STATIC
CASS_COLUMN_TYPE_COMPACT_VALUE
CassIndexType
CASS_INDEX_TYPE_UNKNOWN
CASS_INDEX_TYPE_KEYS
CASS_INDEX_TYPE_CUSTOM
CASS_INDEX_TYPE_COMPOSITES
CassValueType
-
CASS_VALUE_TYPE_UNKNOWN
= 0xFFFF -
CASS_VALUE_TYPE_CUSTOM
= 0x0000 -
CASS_VALUE_TYPE_ASCII
= 0x0001 -
CASS_VALUE_TYPE_BIGINT
= 0x0002 -
CASS_VALUE_TYPE_BLOB
= 0x0003 -
CASS_VALUE_TYPE_BOOLEAN
= 0x0004 -
CASS_VALUE_TYPE_COUNTER
= 0x0005 -
CASS_VALUE_TYPE_DECIMAL
= 0x0006 -
CASS_VALUE_TYPE_DOUBLE
= 0x0007 -
CASS_VALUE_TYPE_FLOAT
= 0x0008 -
CASS_VALUE_TYPE_INT
= 0x0009 -
CASS_VALUE_TYPE_TEXT
= 0x000A -
CASS_VALUE_TYPE_TIMESTAMP
= 0x000B -
CASS_VALUE_TYPE_UUID
= 0x000C -
CASS_VALUE_TYPE_VARCHAR
= 0x000D -
CASS_VALUE_TYPE_VARINT
= 0x000E -
CASS_VALUE_TYPE_TIMEUUID
= 0x000F -
CASS_VALUE_TYPE_INET
= 0x0010 -
CASS_VALUE_TYPE_DATE
= 0x0011 -
CASS_VALUE_TYPE_TIME
= 0x0012 -
CASS_VALUE_TYPE_SMALL_INT
= 0x0013 -
CASS_VALUE_TYPE_TINY_INT
= 0x0014 -
CASS_VALUE_TYPE_DURATION
= 0x0015 -
CASS_VALUE_TYPE_LIST
= 0x0020 -
CASS_VALUE_TYPE_MAP
= 0x0021 -
CASS_VALUE_TYPE_SET
= 0x0022 -
CASS_VALUE_TYPE_UDT
= 0x0030 -
CASS_VALUE_TYPE_TUPLE
= 0x0031
CassClusteringOrder
CASS_CLUSTERING_ORDER_NONE
CASS_CLUSTERING_ORDER_ASC
CASS_CLUSTERING_ORDER_DESC
CassCollectionType
-
CASS_COLLECTION_TYPE_LIST
= CASS_VALUE_TYPE_LIST -
CASS_COLLECTION_TYPE_MAP
= CASS_VALUE_TYPE_MAP -
CASS_COLLECTION_TYPE_SET
= CASS_VALUE_TYPE_SET
CassBatchType
-
CASS_BATCH_TYPE_LOGGED
= 0x00 -
CASS_BATCH_TYPE_UNLOGGED
= 0x01 -
CASS_BATCH_TYPE_COUNTER
= 0x02
CassIteratorType
CASS_ITERATOR_TYPE_RESULT
CASS_ITERATOR_TYPE_ROW
CASS_ITERATOR_TYPE_COLLECTION
CASS_ITERATOR_TYPE_MAP
CASS_ITERATOR_TYPE_TUPLE
CASS_ITERATOR_TYPE_USER_TYPE_FIELD
CASS_ITERATOR_TYPE_META_FIELD
CASS_ITERATOR_TYPE_KEYSPACE_META
CASS_ITERATOR_TYPE_TABLE_META
CASS_ITERATOR_TYPE_TYPE_META
CASS_ITERATOR_TYPE_FUNCTION_META
CASS_ITERATOR_TYPE_AGGREGATE_META
CASS_ITERATOR_TYPE_COLUMN_META
CASS_ITERATOR_TYPE_INDEX_META
CASS_ITERATOR_TYPE_MATERIALIZED_VIEW_META
CassLogLevel
CASS_LOG_DISABLED
CASS_LOG_CRITICAL
CASS_LOG_ERROR
CASS_LOG_WARN
CASS_LOG_INFO
CASS_LOG_DEBUG
CASS_LOG_TRACE
CassSslVerifyFlags
-
CASS_SSL_VERIFY_NONE
= 0x00 -
CASS_SSL_VERIFY_PEER_CERT
= 0x01 -
CASS_SSL_VERIFY_PEER_IDENTITY
= 0x02 -
CASS_SSL_VERIFY_PEER_IDENTITY_DNS
= 0x04
CassProtocolVersion
-
CASS_PROTOCOL_VERSION_V1
= 0x01 -
CASS_PROTOCOL_VERSION_V2
= 0x02 -
CASS_PROTOCOL_VERSION_V3
= 0x03 -
CASS_PROTOCOL_VERSION_V4
= 0x04 -
CASS_PROTOCOL_VERSION_DSEV1
= 0x41
CassErrorSource
CASS_ERROR_SOURCE_NONE
CASS_ERROR_SOURCE_LIB
CASS_ERROR_SOURCE_SERVER
CASS_ERROR_SOURCE_SSL
CASS_ERROR_SOURCE_COMPRESSION
CassError
-
CASS_OK
= 0 -
CASS_ERROR_LIB_BAD_PARAMS
= (( CASS_ERROR_SOURCE_LIB << 24) | 1 ) -
CASS_ERROR_LIB_NO_STREAMS
= (( CASS_ERROR_SOURCE_LIB << 24) | 2 ) -
CASS_ERROR_LIB_UNABLE_TO_INIT
= (( CASS_ERROR_SOURCE_LIB << 24) | 3 ) -
CASS_ERROR_LIB_MESSAGE_ENCODE
= (( CASS_ERROR_SOURCE_LIB << 24) | 4 ) -
CASS_ERROR_LIB_HOST_RESOLUTION
= (( CASS_ERROR_SOURCE_LIB << 24) | 5 ) -
CASS_ERROR_LIB_UNEXPECTED_RESPONSE
= (( CASS_ERROR_SOURCE_LIB << 24) | 6 ) -
CASS_ERROR_LIB_REQUEST_QUEUE_FULL
= (( CASS_ERROR_SOURCE_LIB << 24) | 7 ) -
CASS_ERROR_LIB_NO_AVAILABLE_IO_THREAD
= (( CASS_ERROR_SOURCE_LIB << 24) | 8 ) -
CASS_ERROR_LIB_WRITE_ERROR
= (( CASS_ERROR_SOURCE_LIB << 24) | 9 ) -
CASS_ERROR_LIB_NO_HOSTS_AVAILABLE
= (( CASS_ERROR_SOURCE_LIB << 24) | 10 ) -
CASS_ERROR_LIB_INDEX_OUT_OF_BOUNDS
= (( CASS_ERROR_SOURCE_LIB << 24) | 11 ) -
CASS_ERROR_LIB_INVALID_ITEM_COUNT
= (( CASS_ERROR_SOURCE_LIB << 24) | 12 ) -
CASS_ERROR_LIB_INVALID_VALUE_TYPE
= (( CASS_ERROR_SOURCE_LIB << 24) | 13 ) -
CASS_ERROR_LIB_REQUEST_TIMED_OUT
= (( CASS_ERROR_SOURCE_LIB << 24) | 14 ) -
CASS_ERROR_LIB_UNABLE_TO_SET_KEYSPACE
= (( CASS_ERROR_SOURCE_LIB << 24) | 15 ) -
CASS_ERROR_LIB_CALLBACK_ALREADY_SET
= (( CASS_ERROR_SOURCE_LIB << 24) | 16 ) -
CASS_ERROR_LIB_INVALID_STATEMENT_TYPE
= (( CASS_ERROR_SOURCE_LIB << 24) | 17 ) -
CASS_ERROR_LIB_NAME_DOES_NOT_EXIST
= (( CASS_ERROR_SOURCE_LIB << 24) | 18 ) -
CASS_ERROR_LIB_UNABLE_TO_DETERMINE_PROTOCOL
= (( CASS_ERROR_SOURCE_LIB << 24) | 19 ) -
CASS_ERROR_LIB_NULL_VALUE
= (( CASS_ERROR_SOURCE_LIB << 24) | 20 ) -
CASS_ERROR_LIB_NOT_IMPLEMENTED
= (( CASS_ERROR_SOURCE_LIB << 24) | 21 ) -
CASS_ERROR_LIB_UNABLE_TO_CONNECT
= (( CASS_ERROR_SOURCE_LIB << 24) | 22 ) -
CASS_ERROR_LIB_UNABLE_TO_CLOSE
= (( CASS_ERROR_SOURCE_LIB << 24) | 23 ) -
CASS_ERROR_LIB_NO_PAGING_STATE
= (( CASS_ERROR_SOURCE_LIB << 24) | 24 ) -
CASS_ERROR_LIB_PARAMETER_UNSET
= (( CASS_ERROR_SOURCE_LIB << 24) | 25 ) -
CASS_ERROR_LIB_INVALID_ERROR_RESULT_TYPE
= (( CASS_ERROR_SOURCE_LIB << 24) | 26 ) -
CASS_ERROR_LIB_INVALID_FUTURE_TYPE
= (( CASS_ERROR_SOURCE_LIB << 24) | 27 ) -
CASS_ERROR_LIB_INTERNAL_ERROR
= (( CASS_ERROR_SOURCE_LIB << 24) | 28 ) -
CASS_ERROR_LIB_INVALID_CUSTOM_TYPE
= (( CASS_ERROR_SOURCE_LIB << 24) | 29 ) -
CASS_ERROR_LIB_INVALID_DATA
= (( CASS_ERROR_SOURCE_LIB << 24) | 30 ) -
CASS_ERROR_LIB_NOT_ENOUGH_DATA
= (( CASS_ERROR_SOURCE_LIB << 24) | 31 ) -
CASS_ERROR_LIB_INVALID_STATE
= (( CASS_ERROR_SOURCE_LIB << 24) | 32 ) -
CASS_ERROR_LIB_NO_CUSTOM_PAYLOAD
= (( CASS_ERROR_SOURCE_LIB << 24) | 33 ) -
CASS_ERROR_SERVER_SERVER_ERROR
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x0000 ) -
CASS_ERROR_SERVER_PROTOCOL_ERROR
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x000A ) -
CASS_ERROR_SERVER_BAD_CREDENTIALS
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x0100 ) -
CASS_ERROR_SERVER_UNAVAILABLE
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1000 ) -
CASS_ERROR_SERVER_OVERLOADED
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1001 ) -
CASS_ERROR_SERVER_IS_BOOTSTRAPPING
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1002 ) -
CASS_ERROR_SERVER_TRUNCATE_ERROR
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1003 ) -
CASS_ERROR_SERVER_WRITE_TIMEOUT
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1100 ) -
CASS_ERROR_SERVER_READ_TIMEOUT
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1200 ) -
CASS_ERROR_SERVER_READ_FAILURE
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1300 ) -
CASS_ERROR_SERVER_FUNCTION_FAILURE
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1400 ) -
CASS_ERROR_SERVER_WRITE_FAILURE
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x1500 ) -
CASS_ERROR_SERVER_SYNTAX_ERROR
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2000 ) -
CASS_ERROR_SERVER_UNAUTHORIZED
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2100 ) -
CASS_ERROR_SERVER_INVALID_QUERY
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2200 ) -
CASS_ERROR_SERVER_CONFIG_ERROR
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2300 ) -
CASS_ERROR_SERVER_ALREADY_EXISTS
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2400 ) -
CASS_ERROR_SERVER_UNPREPARED
= (( CASS_ERROR_SOURCE_SERVER << 24) | 0x2500 ) -
CASS_ERROR_SSL_INVALID_CERT
= (( CASS_ERROR_SOURCE_SSL << 24) | 1 ) -
CASS_ERROR_SSL_INVALID_PRIVATE_KEY
= (( CASS_ERROR_SOURCE_SSL << 24) | 2 ) -
CASS_ERROR_SSL_NO_PEER_CERT
= (( CASS_ERROR_SOURCE_SSL << 24) | 3 ) -
CASS_ERROR_SSL_INVALID_PEER_CERT
= (( CASS_ERROR_SOURCE_SSL << 24) | 4 ) -
CASS_ERROR_SSL_IDENTITY_MISMATCH
= (( CASS_ERROR_SOURCE_SSL << 24) | 5 ) -
CASS_ERROR_SSL_PROTOCOL_ERROR
= (( CASS_ERROR_SOURCE_SSL << 24) | 6 )
Functions
Gets the value type of the specified data type.
Gets whether a data type is frozen.
Requires Cassandra: 2.1+
CassError
cass_data_type_type_name
(const CassDataType *
data_type, const char **
type_name, size_t *
type_name_length )
Gets the type name of a UDT data type.
Note: Only valid for UDT data types.
Sets the type name of a UDT data type.
Note: Only valid for UDT data types.
CassError
cass_data_type_keyspace
(const CassDataType *
data_type, const char **
keyspace, size_t *
keyspace_length )
Gets the type name of a UDT data type.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
Sets the keyspace of a UDT data type.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
CassError
cass_data_type_class_name
(const CassDataType *
data_type, const char **
class_name, size_t *
class_name_length )
Gets the class name of a custom data type.
Note: Only valid for custom data types.
Sets the class name of a custom data type.
Note: Only valid for custom data types.
Gets the sub-data type count of a UDT (user defined type), tuple or collection.
Note: Only valid for UDT, tuple and collection data types.
Deprecated:
Gets the sub-data type count of a UDT (user defined type), tuple or collection.
Note: Only valid for UDT, tuple and collection data types.
Note: Only valid for UDT, tuple and collection data types.
const CassDataType *
cass_data_type_sub_data_type_by_name
(const CassDataType *
data_type, const char *
name )
Gets the sub-data type of a UDT (user defined type) at the specified index.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
CassError
cass_data_type_sub_type_name
(const CassDataType *
data_type, size_t
index, const char **
name, size_t *
name_length )
Gets the sub-type name of a UDT (user defined type) at the specified index.
Requires Cassandra: 2.1+
Note: Only valid for UDT data types.
CassError
cass_data_type_add_sub_type
(CassDataType *
data_type, const CassDataType *
sub_data_type )
Adds a sub-data type to a tuple or collection.
Note: Only valid for tuple and collection data types.
CassError
cass_data_type_add_sub_type_by_name
(CassDataType *
data_type, const char *
name, const CassDataType *
sub_data_type )
Adds a sub-data type to a UDT (user defined type).
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
CassError
cass_data_type_add_sub_type_by_name_n
(CassDataType *
data_type, const char *
name, size_t
name_length, const CassDataType *
sub_data_type )
Same as cass_data_type_add_sub_type_by_name
, but with lengths for string parameters.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
CassError
cass_data_type_add_sub_value_type
(CassDataType *
data_type, CassValueType
sub_value_type )
Adds a sub-data type to a tuple or collection using a value type.
Note: Only valid for tuple and collection data types.
CassError
cass_data_type_add_sub_value_type_by_name
(CassDataType *
data_type, const char *
name, CassValueType
sub_value_type )
Adds a sub-data type to a UDT (user defined type) using a value type.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
CassError
cass_data_type_add_sub_value_type_by_name_n
(CassDataType *
data_type, const char *
name, size_t
name_length, CassValueType
sub_value_type )
Same as cass_data_type_add_sub_value_type_by_name
, but with lengths for string parameters.
Note: Only valid for UDT data types.
Requires Cassandra: 2.1+
Gets the data type of a collection.
Gets the data type of a tuple.
Requires Cassandra: 2.1+
Gets the data type of a user defined type.
Requires Cassandra: 2.1+
CassTimestampGen *
cass_timestamp_gen_monotonic_new_with_settings
(cass_int64_t
warning_threshold_us, cass_int64_t
warning_interval_ms )
Same as CassTimestampGen::cass_timestamp_gen_monotonic_new
, but with settings for controlling warnings about clock skew.
Gets the string for a consistency.
Gets the string for a write type.
Gets a description for an error code.
void
cass_log_cleanup
( )Explicitly wait for the log to flush and deallocate resources. This MUST be the last call using the library. It is an error to call any cass_*() functions after this call.
Deprecated:
This is no longer useful and does nothing. Expect this to be removed in a few releases.
Sets the log level.
Note: This needs to be done before any call that might log, such as any of the cass_cluster_*() or cass_ssl_*() functions.
Default: CASS_LOG_WARN
Sets a callback for handling logging events.
Note: This needs to be done before any call that might log, such as any of the cass_cluster_*() or cass_ssl_*() functions.
Default: An internal callback that prints to stderr
void
cass_log_set_queue_size
(size_t
queue_size )
Sets the log queue size.
Note: This needs to be done before any call that might log, such as any of the cass_cluster_*() or cass_ssl_*() functions.
Default: 2048
Deprecated:
This is no longer useful and does nothing. Expect this to be removed in a few releases.
Gets the string for a log level.
Converts a unix timestamp (in seconds) to the Cassandra “date” type. The “date” type represents the number of days since the Epoch (1970-01-01) with the Epoch centered at the value 231.
Requires Cassandra: 2.2+
Converts a unix timestamp (in seconds) to the Cassandra “time” type. The “time” type represents the number of nanoseconds since midnight (range 0 to 86399999999999).
Requires Cassandra: 2.2+
Combines the Cassandra “date” and “time” types to Epoch time in seconds.
Requires Cassandra: 2.2+
void
cass_alloc_set_functions
(CassMallocFunction
malloc_func, CassReallocFunction
realloc_func, CassFreeFunction
free_func )
Set custom allocation functions.
Note: This is not thread-safe. The allocation functions must be set before any other library function is called.
Default: The C runtime’s malloc(), realloc() and free()
Important: The C runtime’s malloc(), realloc() and free() will be used by libuv when using versions 1.5 or earlier.