pub const _STDINT_H: u32 = 1;
pub const _FEATURES_H: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const __GLIBC_USE_ISOC2X: u32 = 0;
pub const __USE_ISOC11: u32 = 1;
pub const __USE_ISOC99: u32 = 1;
pub const __USE_ISOC95: u32 = 1;
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const __USE_POSIX: u32 = 1;
pub const __USE_POSIX2: u32 = 1;
pub const __USE_POSIX199309: u32 = 1;
pub const __USE_POSIX199506: u32 = 1;
pub const __USE_XOPEN2K: u32 = 1;
pub const __USE_XOPEN2K8: u32 = 1;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __WORDSIZE: u32 = 64;
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
pub const __SYSCALL_WORDSIZE: u32 = 64;
pub const __TIMESIZE: u32 = 64;
pub const __USE_MISC: u32 = 1;
pub const __USE_ATFILE: u32 = 1;
pub const __USE_FORTIFY_LEVEL: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
pub const _STDC_PREDEF_H: u32 = 1;
pub const __STDC_IEC_559__: u32 = 1;
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
pub const __STDC_ISO_10646__: u32 = 201706;
pub const __GNU_LIBRARY__: u32 = 6;
pub const __GLIBC__: u32 = 2;
pub const __GLIBC_MINOR__: u32 = 34;
pub const _SYS_CDEFS_H: u32 = 1;
pub const __glibc_c99_flexarr_available: u32 = 1;
pub const __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI: u32 = 0;
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
pub const _BITS_TYPES_H: u32 = 1;
pub const _BITS_TYPESIZES_H: u32 = 1;
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
pub const __KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64: u32 = 1;
pub const __FD_SETSIZE: u32 = 1024;
pub const _BITS_TIME64_H: u32 = 1;
pub const _BITS_WCHAR_H: u32 = 1;
pub const _BITS_STDINT_INTN_H: u32 = 1;
pub const _BITS_STDINT_UINTN_H: u32 = 1;
pub const INT8_MIN: i32 = -128;
pub const INT16_MIN: i32 = -32768;
pub const INT32_MIN: i32 = -2147483648;
pub const INT8_MAX: u32 = 127;
pub const INT16_MAX: u32 = 32767;
pub const INT32_MAX: u32 = 2147483647;
pub const UINT8_MAX: u32 = 255;
pub const UINT16_MAX: u32 = 65535;
pub const UINT32_MAX: u32 = 4294967295;
pub const INT_LEAST8_MIN: i32 = -128;
pub const INT_LEAST16_MIN: i32 = -32768;
pub const INT_LEAST32_MIN: i32 = -2147483648;
pub const INT_LEAST8_MAX: u32 = 127;
pub const INT_LEAST16_MAX: u32 = 32767;
pub const INT_LEAST32_MAX: u32 = 2147483647;
pub const UINT_LEAST8_MAX: u32 = 255;
pub const UINT_LEAST16_MAX: u32 = 65535;
pub const UINT_LEAST32_MAX: u32 = 4294967295;
pub const INT_FAST8_MIN: i32 = -128;
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
pub const INT_FAST8_MAX: u32 = 127;
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
pub const UINT_FAST8_MAX: u32 = 255;
pub const UINT_FAST16_MAX: i32 = -1;
pub const UINT_FAST32_MAX: i32 = -1;
pub const INTPTR_MIN: i64 = -9223372036854775808;
pub const INTPTR_MAX: u64 = 9223372036854775807;
pub const UINTPTR_MAX: i32 = -1;
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
pub const SIZE_MAX: i32 = -1;
pub const WINT_MIN: u32 = 0;
pub const WINT_MAX: u32 = 4294967295;
pub const CASS_VERSION_MAJOR: u32 = 2;
pub const CASS_VERSION_MINOR: u32 = 16;
pub const CASS_VERSION_PATCH: u32 = 0;
pub const CASS_VERSION_SUFFIX: &[u8; 1usize] = b"\0";
pub const CASS_UINT64_MAX: i32 = -1;
pub const CASS_INET_V4_LENGTH: u32 = 4;
pub const CASS_INET_V6_LENGTH: u32 = 16;
pub const CASS_INET_STRING_LENGTH: u32 = 46;
pub const CASS_UUID_STRING_LENGTH: u32 = 37;
pub const CASS_LOG_MAX_MESSAGE_SIZE: u32 = 1024;
pub type wchar_t = ::std::os::raw::c_int;
pub type __u_char = ::std::os::raw::c_uchar;
pub type __u_short = ::std::os::raw::c_ushort;
pub type __u_int = ::std::os::raw::c_uint;
pub type __u_long = ::std::os::raw::c_ulong;
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
pub type __uint16_t = ::std::os::raw::c_ushort;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __int_least8_t = __int8_t;
pub type __uint_least8_t = __uint8_t;
pub type __int_least16_t = __int16_t;
pub type __uint_least16_t = __uint16_t;
pub type __int_least32_t = __int32_t;
pub type __uint_least32_t = __uint32_t;
pub type __int_least64_t = __int64_t;
pub type __uint_least64_t = __uint64_t;
pub type __quad_t = ::std::os::raw::c_long;
pub type __u_quad_t = ::std::os::raw::c_ulong;
pub type __intmax_t = ::std::os::raw::c_long;
pub type __uintmax_t = ::std::os::raw::c_ulong;
pub type __dev_t = ::std::os::raw::c_ulong;
pub type __uid_t = ::std::os::raw::c_uint;
pub type __gid_t = ::std::os::raw::c_uint;
pub type __ino_t = ::std::os::raw::c_ulong;
pub type __ino64_t = ::std::os::raw::c_ulong;
pub type __mode_t = ::std::os::raw::c_uint;
pub type __nlink_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
pub type __pid_t = ::std::os::raw::c_int;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __fsid_t {
pub __val: [::std::os::raw::c_int; 2usize],
}
pub type __clock_t = ::std::os::raw::c_long;
pub type __rlim_t = ::std::os::raw::c_ulong;
pub type __rlim64_t = ::std::os::raw::c_ulong;
pub type __id_t = ::std::os::raw::c_uint;
pub type __time_t = ::std::os::raw::c_long;
pub type __useconds_t = ::std::os::raw::c_uint;
pub type __suseconds_t = ::std::os::raw::c_long;
pub type __suseconds64_t = ::std::os::raw::c_long;
pub type __daddr_t = ::std::os::raw::c_int;
pub type __key_t = ::std::os::raw::c_int;
pub type __clockid_t = ::std::os::raw::c_int;
pub type __timer_t = *mut ::std::os::raw::c_void;
pub type __blksize_t = ::std::os::raw::c_long;
pub type __blkcnt_t = ::std::os::raw::c_long;
pub type __blkcnt64_t = ::std::os::raw::c_long;
pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
pub type __fsword_t = ::std::os::raw::c_long;
pub type __ssize_t = ::std::os::raw::c_long;
pub type __syscall_slong_t = ::std::os::raw::c_long;
pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
pub type __loff_t = __off64_t;
pub type __caddr_t = *mut ::std::os::raw::c_char;
pub type __intptr_t = ::std::os::raw::c_long;
pub type __socklen_t = ::std::os::raw::c_uint;
pub type __sig_atomic_t = ::std::os::raw::c_int;
pub type int_least8_t = __int_least8_t;
pub type int_least16_t = __int_least16_t;
pub type int_least32_t = __int_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least8_t = __uint_least8_t;
pub type uint_least16_t = __uint_least16_t;
pub type uint_least32_t = __uint_least32_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::std::os::raw::c_schar;
pub type int_fast16_t = ::std::os::raw::c_long;
pub type int_fast32_t = ::std::os::raw::c_long;
pub type int_fast64_t = ::std::os::raw::c_long;
pub type uint_fast8_t = ::std::os::raw::c_uchar;
pub type uint_fast16_t = ::std::os::raw::c_ulong;
pub type uint_fast32_t = ::std::os::raw::c_ulong;
pub type uint_fast64_t = ::std::os::raw::c_ulong;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum cass_bool_t {
cass_false = 0,
cass_true = 1,
}
pub type cass_float_t = f32;
pub type cass_double_t = f64;
pub type cass_int8_t = i8;
pub type cass_uint8_t = u8;
pub type cass_int16_t = i16;
pub type cass_uint16_t = u16;
pub type cass_int32_t = i32;
pub type cass_uint32_t = u32;
pub type cass_int64_t = i64;
pub type cass_uint64_t = u64;
pub type cass_byte_t = cass_uint8_t;
pub type cass_duration_t = cass_uint64_t;
#[doc = " IP address for either IPv4 or IPv6."]
#[doc = ""]
#[doc = " @struct CassInet"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassInet_ {
#[doc = " Big-endian, binary representation of a IPv4 or IPv6 address"]
pub address: [cass_uint8_t; 16usize],
#[doc = " Number of address bytes. 4 bytes for IPv4 and 16 bytes for IPv6."]
pub address_length: cass_uint8_t,
}
#[doc = " IP address for either IPv4 or IPv6."]
#[doc = ""]
#[doc = " @struct CassInet"]
pub type CassInet = CassInet_;
#[doc = " Version 1 (time-based) or version 4 (random) UUID."]
#[doc = ""]
#[doc = " @struct CassUuid"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassUuid_ {
#[doc = " Represents the time and version part of a UUID. The most significant"]
#[doc = " 4 bits represent the version and the bottom 60 bits representing the"]
#[doc = " time part. For version 1 the time part represents the number of"]
#[doc = " 100 nanosecond periods since 00:00:00 UTC, January 1, 1970 (the Epoch)."]
#[doc = " For version 4 the time part is randomly generated."]
pub time_and_version: cass_uint64_t,
#[doc = " Represents the clock sequence and the node part of a UUID. The most"]
#[doc = " significant 16 bits represent the clock sequence (except for the most"]
#[doc = " significant bit which is always set) and the bottom 48 bits represent"]
#[doc = " the node part. For version 1 (time-based) the clock sequence part is randomly"]
#[doc = " generated and the node part can be explicitly set, otherwise, it's generated"]
#[doc = " from node unique information. For version 4 both the clock sequence and the node"]
#[doc = " parts are randomly generated."]
pub clock_seq_and_node: cass_uint64_t,
}
#[doc = " Version 1 (time-based) or version 4 (random) UUID."]
#[doc = ""]
#[doc = " @struct CassUuid"]
pub type CassUuid = CassUuid_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassCluster_ {
_unused: [u8; 0],
}
#[doc = " A cluster object describes the configuration of the Cassandra cluster and is used"]
#[doc = " to construct a session instance. Unlike other DataStax drivers the cluster object"]
#[doc = " does not maintain the control connection."]
#[doc = ""]
#[doc = " @struct CassCluster"]
pub type CassCluster = CassCluster_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassSession_ {
_unused: [u8; 0],
}
#[doc = " A session object is used to execute queries and maintains cluster state through"]
#[doc = " the control connection. The control connection is used to auto-discover nodes and"]
#[doc = " monitor cluster changes (topology and schema). Each session also maintains multiple"]
#[doc = " pools of connections to cluster nodes which are used to query the cluster."]
#[doc = ""]
#[doc = " Instances of the session object are thread-safe to execute queries."]
#[doc = ""]
#[doc = " @struct CassSession"]
pub type CassSession = CassSession_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassStatement_ {
_unused: [u8; 0],
}
#[doc = " A statement object is an executable query. It represents either a regular"]
#[doc = " (adhoc) statement or a prepared statement. It maintains the queries' parameter"]
#[doc = " values along with query options (consistency level, paging state, etc.)"]
#[doc = ""]
#[doc = " <b>Note:</b> Parameters for regular queries are not supported by the binary protocol"]
#[doc = " version 1."]
#[doc = ""]
#[doc = " @struct CassStatement"]
pub type CassStatement = CassStatement_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassBatch_ {
_unused: [u8; 0],
}
#[doc = " A group of statements that are executed as a single batch."]
#[doc = ""]
#[doc = " <b>Note:</b> Batches are not supported by the binary protocol version 1."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @struct CassBatch"]
pub type CassBatch = CassBatch_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassFuture_ {
_unused: [u8; 0],
}
#[doc = " The future result of an operation."]
#[doc = ""]
#[doc = " It can represent a result if the operation completed successfully or an"]
#[doc = " error if the operation failed. It can be waited on, polled or a callback"]
#[doc = " can be attached."]
#[doc = ""]
#[doc = " @struct CassFuture"]
pub type CassFuture = CassFuture_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassPrepared_ {
_unused: [u8; 0],
}
#[doc = " A statement that has been prepared cluster-side (It has been pre-parsed"]
#[doc = " and cached)."]
#[doc = ""]
#[doc = " A prepared statement is read-only and it is thread-safe to concurrently"]
#[doc = " bind new statements."]
#[doc = ""]
#[doc = " @struct CassPrepared"]
pub type CassPrepared = CassPrepared_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassResult_ {
_unused: [u8; 0],
}
#[doc = " The result of a query."]
#[doc = ""]
#[doc = " A result object is read-only and is thread-safe to read or iterate over"]
#[doc = " concurrently."]
#[doc = ""]
#[doc = " @struct CassResult"]
pub type CassResult = CassResult_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassErrorResult_ {
_unused: [u8; 0],
}
#[doc = " A error result of a request"]
#[doc = ""]
#[doc = " @struct CassErrorResult"]
pub type CassErrorResult = CassErrorResult_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassNode_ {
_unused: [u8; 0],
}
#[doc = " An object that represents a cluster node."]
#[doc = ""]
#[doc = " @struct CassNode"]
pub type CassNode = CassNode_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassIterator_ {
_unused: [u8; 0],
}
#[doc = " An object used to iterate over a group of rows, columns or collection values."]
#[doc = ""]
#[doc = " @struct CassIterator"]
pub type CassIterator = CassIterator_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassRow_ {
_unused: [u8; 0],
}
#[doc = " A collection of column values."]
#[doc = ""]
#[doc = " @struct CassRow"]
pub type CassRow = CassRow_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassValue_ {
_unused: [u8; 0],
}
#[doc = " A single primitive value or a collection of values."]
#[doc = ""]
#[doc = " @struct CassValue"]
pub type CassValue = CassValue_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassDataType_ {
_unused: [u8; 0],
}
#[doc = " A data type used to describe a value, collection or"]
#[doc = " user defined type."]
#[doc = ""]
#[doc = " @struct CassDataType"]
pub type CassDataType = CassDataType_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassFunctionMeta_ {
_unused: [u8; 0],
}
#[doc = " @struct CassFunctionMeta"]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
pub type CassFunctionMeta = CassFunctionMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassAggregateMeta_ {
_unused: [u8; 0],
}
#[doc = " @struct CassAggregateMeta"]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
pub type CassAggregateMeta = CassAggregateMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassCollection_ {
_unused: [u8; 0],
}
#[doc = " A collection of values."]
#[doc = ""]
#[doc = " @struct CassCollection"]
pub type CassCollection = CassCollection_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassTuple_ {
_unused: [u8; 0],
}
#[doc = " A tuple of values."]
#[doc = ""]
#[doc = " @struct CassTuple"]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
pub type CassTuple = CassTuple_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassUserType_ {
_unused: [u8; 0],
}
#[doc = " A user defined type."]
#[doc = ""]
#[doc = " @struct CassUserType"]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
pub type CassUserType = CassUserType_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassSsl_ {
_unused: [u8; 0],
}
#[doc = " Describes the SSL configuration of a cluster."]
#[doc = ""]
#[doc = " @struct CassSsl"]
pub type CassSsl = CassSsl_;
#[doc = " Describes the version of the connected Cassandra cluster."]
#[doc = ""]
#[doc = " @struct CassVersion"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassVersion_ {
pub major_version: ::std::os::raw::c_int,
pub minor_version: ::std::os::raw::c_int,
pub patch_version: ::std::os::raw::c_int,
}
#[doc = " Describes the version of the connected Cassandra cluster."]
#[doc = ""]
#[doc = " @struct CassVersion"]
pub type CassVersion = CassVersion_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassSchemaMeta_ {
_unused: [u8; 0],
}
#[doc = " A snapshot of the schema's metadata."]
#[doc = ""]
#[doc = " @struct CassSchemaMeta"]
pub type CassSchemaMeta = CassSchemaMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassKeyspaceMeta_ {
_unused: [u8; 0],
}
#[doc = " Keyspace metadata"]
#[doc = ""]
#[doc = " @struct CassKeyspaceMeta"]
pub type CassKeyspaceMeta = CassKeyspaceMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassTableMeta_ {
_unused: [u8; 0],
}
#[doc = " Table metadata"]
#[doc = ""]
#[doc = " @struct CassTableMeta"]
pub type CassTableMeta = CassTableMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassMaterializedViewMeta_ {
_unused: [u8; 0],
}
#[doc = " MaterializedView metadata"]
#[doc = ""]
#[doc = " @struct CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
pub type CassMaterializedViewMeta = CassMaterializedViewMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassColumnMeta_ {
_unused: [u8; 0],
}
#[doc = " Column metadata"]
#[doc = ""]
#[doc = " @struct CassColumnMeta"]
pub type CassColumnMeta = CassColumnMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassIndexMeta_ {
_unused: [u8; 0],
}
#[doc = " Index metadata"]
#[doc = ""]
#[doc = " @struct CassIndexMeta"]
pub type CassIndexMeta = CassIndexMeta_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassUuidGen_ {
_unused: [u8; 0],
}
#[doc = " A UUID generator object."]
#[doc = ""]
#[doc = " Instances of the UUID generator object are thread-safe to generate UUIDs."]
#[doc = ""]
#[doc = " @struct CassUuidGen"]
pub type CassUuidGen = CassUuidGen_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassTimestampGen_ {
_unused: [u8; 0],
}
#[doc = " Policies that defined the behavior of a request when a server-side"]
#[doc = " read/write timeout or unavailable error occurs."]
#[doc = ""]
#[doc = " Generators of client-side, microsecond-precision timestamps."]
#[doc = ""]
#[doc = " @struct CassTimestampGen"]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
pub type CassTimestampGen = CassTimestampGen_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassRetryPolicy_ {
_unused: [u8; 0],
}
#[doc = " @struct CassRetryPolicy"]
pub type CassRetryPolicy = CassRetryPolicy_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassCustomPayload_ {
_unused: [u8; 0],
}
#[doc = " @struct CassCustomPayload"]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
pub type CassCustomPayload = CassCustomPayload_;
#[doc = " A snapshot of the session's performance/diagnostic metrics."]
#[doc = ""]
#[doc = " @struct CassMetrics"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassMetrics_ {
#[doc = "< Performance request metrics"]
pub requests: CassMetrics___bindgen_ty_1,
#[doc = "< Diagnostic metrics"]
pub stats: CassMetrics___bindgen_ty_2,
#[doc = "< Error metrics"]
pub errors: CassMetrics___bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassMetrics___bindgen_ty_1 {
#[doc = "< Minimum in microseconds"]
pub min: cass_uint64_t,
#[doc = "< Maximum in microseconds"]
pub max: cass_uint64_t,
#[doc = "< Mean in microseconds"]
pub mean: cass_uint64_t,
#[doc = "< Standard deviation in microseconds"]
pub stddev: cass_uint64_t,
#[doc = "< Median in microseconds"]
pub median: cass_uint64_t,
#[doc = "< 75th percentile in microseconds"]
pub percentile_75th: cass_uint64_t,
#[doc = "< 95th percentile in microseconds"]
pub percentile_95th: cass_uint64_t,
#[doc = "< 98th percentile in microseconds"]
pub percentile_98th: cass_uint64_t,
#[doc = "< 99the percentile in microseconds"]
pub percentile_99th: cass_uint64_t,
#[doc = "< 99.9th percentile in microseconds"]
pub percentile_999th: cass_uint64_t,
#[doc = "< Mean rate in requests per second"]
pub mean_rate: cass_double_t,
#[doc = "< 1 minute rate in requests per second"]
pub one_minute_rate: cass_double_t,
#[doc = "< 5 minute rate in requests per second"]
pub five_minute_rate: cass_double_t,
#[doc = "< 15 minute rate in requests per second"]
pub fifteen_minute_rate: cass_double_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassMetrics___bindgen_ty_2 {
#[doc = "< The total number of connections"]
pub total_connections: cass_uint64_t,
#[doc = "< Deprecated"]
pub available_connections: cass_uint64_t,
#[doc = "< Deprecated"]
pub exceeded_pending_requests_water_mark: cass_uint64_t,
#[doc = "< Deprecated"]
pub exceeded_write_bytes_water_mark: cass_uint64_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassMetrics___bindgen_ty_3 {
#[doc = "< Occurrences of a connection timeout"]
pub connection_timeouts: cass_uint64_t,
#[doc = "< Deprecated"]
pub pending_request_timeouts: cass_uint64_t,
#[doc = "< Occurrences of requests that timed out waiting for a request to finish"]
pub request_timeouts: cass_uint64_t,
}
#[doc = " A snapshot of the session's performance/diagnostic metrics."]
#[doc = ""]
#[doc = " @struct CassMetrics"]
pub type CassMetrics = CassMetrics_;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassSpeculativeExecutionMetrics_ {
#[doc = "< Minimum in microseconds"]
pub min: cass_uint64_t,
#[doc = "< Maximum in microseconds"]
pub max: cass_uint64_t,
#[doc = "< Mean in microseconds"]
pub mean: cass_uint64_t,
#[doc = "< Standard deviation in microseconds"]
pub stddev: cass_uint64_t,
#[doc = "< Median in microseconds"]
pub median: cass_uint64_t,
#[doc = "< 75th percentile in microseconds"]
pub percentile_75th: cass_uint64_t,
#[doc = "< 95th percentile in microseconds"]
pub percentile_95th: cass_uint64_t,
#[doc = "< 98th percentile in microseconds"]
pub percentile_98th: cass_uint64_t,
#[doc = "< 99the percentile in microseconds"]
pub percentile_99th: cass_uint64_t,
#[doc = "< 99.9th percentile in microseconds"]
pub percentile_999th: cass_uint64_t,
#[doc = "< The number of aborted speculative retries"]
pub count: cass_uint64_t,
#[doc = "< Fraction of requests that are aborted speculative retries"]
pub percentage: cass_double_t,
}
pub type CassSpeculativeExecutionMetrics = CassSpeculativeExecutionMetrics_;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassConsistency_ {
CASS_CONSISTENCY_UNKNOWN = 65535,
CASS_CONSISTENCY_ANY = 0,
CASS_CONSISTENCY_ONE = 1,
CASS_CONSISTENCY_TWO = 2,
CASS_CONSISTENCY_THREE = 3,
CASS_CONSISTENCY_QUORUM = 4,
CASS_CONSISTENCY_ALL = 5,
CASS_CONSISTENCY_LOCAL_QUORUM = 6,
CASS_CONSISTENCY_EACH_QUORUM = 7,
CASS_CONSISTENCY_SERIAL = 8,
CASS_CONSISTENCY_LOCAL_SERIAL = 9,
CASS_CONSISTENCY_LOCAL_ONE = 10,
}
pub use self::CassConsistency_ as CassConsistency;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassWriteType_ {
CASS_WRITE_TYPE_UNKNOWN = 0,
CASS_WRITE_TYPE_SIMPLE = 1,
CASS_WRITE_TYPE_BATCH = 2,
CASS_WRITE_TYPE_UNLOGGED_BATCH = 3,
CASS_WRITE_TYPE_COUNTER = 4,
CASS_WRITE_TYPE_BATCH_LOG = 5,
CASS_WRITE_TYPE_CAS = 6,
CASS_WRITE_TYPE_VIEW = 7,
CASS_WRITE_TYPE_CDC = 8,
}
pub use self::CassWriteType_ as CassWriteType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassColumnType_ {
CASS_COLUMN_TYPE_REGULAR = 0,
CASS_COLUMN_TYPE_PARTITION_KEY = 1,
CASS_COLUMN_TYPE_CLUSTERING_KEY = 2,
CASS_COLUMN_TYPE_STATIC = 3,
CASS_COLUMN_TYPE_COMPACT_VALUE = 4,
}
pub use self::CassColumnType_ as CassColumnType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassIndexType_ {
CASS_INDEX_TYPE_UNKNOWN = 0,
CASS_INDEX_TYPE_KEYS = 1,
CASS_INDEX_TYPE_CUSTOM = 2,
CASS_INDEX_TYPE_COMPOSITES = 3,
}
pub use self::CassIndexType_ as CassIndexType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassValueType_ {
CASS_VALUE_TYPE_UNKNOWN = 65535,
CASS_VALUE_TYPE_CUSTOM = 0,
CASS_VALUE_TYPE_ASCII = 1,
CASS_VALUE_TYPE_BIGINT = 2,
CASS_VALUE_TYPE_BLOB = 3,
CASS_VALUE_TYPE_BOOLEAN = 4,
CASS_VALUE_TYPE_COUNTER = 5,
CASS_VALUE_TYPE_DECIMAL = 6,
CASS_VALUE_TYPE_DOUBLE = 7,
CASS_VALUE_TYPE_FLOAT = 8,
CASS_VALUE_TYPE_INT = 9,
CASS_VALUE_TYPE_TEXT = 10,
CASS_VALUE_TYPE_TIMESTAMP = 11,
CASS_VALUE_TYPE_UUID = 12,
CASS_VALUE_TYPE_VARCHAR = 13,
CASS_VALUE_TYPE_VARINT = 14,
CASS_VALUE_TYPE_TIMEUUID = 15,
CASS_VALUE_TYPE_INET = 16,
CASS_VALUE_TYPE_DATE = 17,
CASS_VALUE_TYPE_TIME = 18,
CASS_VALUE_TYPE_SMALL_INT = 19,
CASS_VALUE_TYPE_TINY_INT = 20,
CASS_VALUE_TYPE_DURATION = 21,
CASS_VALUE_TYPE_LIST = 32,
CASS_VALUE_TYPE_MAP = 33,
CASS_VALUE_TYPE_SET = 34,
CASS_VALUE_TYPE_UDT = 48,
CASS_VALUE_TYPE_TUPLE = 49,
CASS_VALUE_TYPE_LAST_ENTRY = 50,
}
pub use self::CassValueType_ as CassValueType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassClusteringOrder_ {
CASS_CLUSTERING_ORDER_NONE = 0,
CASS_CLUSTERING_ORDER_ASC = 1,
CASS_CLUSTERING_ORDER_DESC = 2,
}
pub use self::CassClusteringOrder_ as CassClusteringOrder;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassCollectionType_ {
CASS_COLLECTION_TYPE_LIST = 32,
CASS_COLLECTION_TYPE_MAP = 33,
CASS_COLLECTION_TYPE_SET = 34,
}
pub use self::CassCollectionType_ as CassCollectionType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassBatchType_ {
CASS_BATCH_TYPE_LOGGED = 0,
CASS_BATCH_TYPE_UNLOGGED = 1,
CASS_BATCH_TYPE_COUNTER = 2,
}
pub use self::CassBatchType_ as CassBatchType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassIteratorType_ {
CASS_ITERATOR_TYPE_RESULT = 0,
CASS_ITERATOR_TYPE_ROW = 1,
CASS_ITERATOR_TYPE_COLLECTION = 2,
CASS_ITERATOR_TYPE_MAP = 3,
CASS_ITERATOR_TYPE_TUPLE = 4,
CASS_ITERATOR_TYPE_USER_TYPE_FIELD = 5,
CASS_ITERATOR_TYPE_META_FIELD = 6,
CASS_ITERATOR_TYPE_KEYSPACE_META = 7,
CASS_ITERATOR_TYPE_TABLE_META = 8,
CASS_ITERATOR_TYPE_TYPE_META = 9,
CASS_ITERATOR_TYPE_FUNCTION_META = 10,
CASS_ITERATOR_TYPE_AGGREGATE_META = 11,
CASS_ITERATOR_TYPE_COLUMN_META = 12,
CASS_ITERATOR_TYPE_INDEX_META = 13,
CASS_ITERATOR_TYPE_MATERIALIZED_VIEW_META = 14,
}
pub use self::CassIteratorType_ as CassIteratorType;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassLogLevel_ {
CASS_LOG_DISABLED = 0,
CASS_LOG_CRITICAL = 1,
CASS_LOG_ERROR = 2,
CASS_LOG_WARN = 3,
CASS_LOG_INFO = 4,
CASS_LOG_DEBUG = 5,
CASS_LOG_TRACE = 6,
CASS_LOG_LAST_ENTRY = 7,
}
pub use self::CassLogLevel_ as CassLogLevel;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassSslVerifyFlags_ {
CASS_SSL_VERIFY_NONE = 0,
CASS_SSL_VERIFY_PEER_CERT = 1,
CASS_SSL_VERIFY_PEER_IDENTITY = 2,
CASS_SSL_VERIFY_PEER_IDENTITY_DNS = 4,
}
pub use self::CassSslVerifyFlags_ as CassSslVerifyFlags;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassProtocolVersion_ {
#[doc = "< Deprecated"]
CASS_PROTOCOL_VERSION_V1 = 1,
#[doc = "< Deprecated"]
CASS_PROTOCOL_VERSION_V2 = 2,
CASS_PROTOCOL_VERSION_V3 = 3,
CASS_PROTOCOL_VERSION_V4 = 4,
CASS_PROTOCOL_VERSION_V5 = 5,
#[doc = "< Only supported when using the DSE"]
#[doc = "driver with DataStax Enterprise"]
CASS_PROTOCOL_VERSION_DSEV1 = 65,
#[doc = "< Only supported when using the DSE"]
#[doc = "driver with DataStax Enterprise"]
CASS_PROTOCOL_VERSION_DSEV2 = 66,
}
pub use self::CassProtocolVersion_ as CassProtocolVersion;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassErrorSource_ {
CASS_ERROR_SOURCE_NONE = 0,
CASS_ERROR_SOURCE_LIB = 1,
CASS_ERROR_SOURCE_SERVER = 2,
CASS_ERROR_SOURCE_SSL = 3,
CASS_ERROR_SOURCE_COMPRESSION = 4,
}
pub use self::CassErrorSource_ as CassErrorSource;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassError_ {
CASS_OK = 0,
CASS_ERROR_LIB_BAD_PARAMS = 16777217,
CASS_ERROR_LIB_NO_STREAMS = 16777218,
CASS_ERROR_LIB_UNABLE_TO_INIT = 16777219,
CASS_ERROR_LIB_MESSAGE_ENCODE = 16777220,
CASS_ERROR_LIB_HOST_RESOLUTION = 16777221,
CASS_ERROR_LIB_UNEXPECTED_RESPONSE = 16777222,
CASS_ERROR_LIB_REQUEST_QUEUE_FULL = 16777223,
CASS_ERROR_LIB_NO_AVAILABLE_IO_THREAD = 16777224,
CASS_ERROR_LIB_WRITE_ERROR = 16777225,
CASS_ERROR_LIB_NO_HOSTS_AVAILABLE = 16777226,
CASS_ERROR_LIB_INDEX_OUT_OF_BOUNDS = 16777227,
CASS_ERROR_LIB_INVALID_ITEM_COUNT = 16777228,
CASS_ERROR_LIB_INVALID_VALUE_TYPE = 16777229,
CASS_ERROR_LIB_REQUEST_TIMED_OUT = 16777230,
CASS_ERROR_LIB_UNABLE_TO_SET_KEYSPACE = 16777231,
CASS_ERROR_LIB_CALLBACK_ALREADY_SET = 16777232,
CASS_ERROR_LIB_INVALID_STATEMENT_TYPE = 16777233,
CASS_ERROR_LIB_NAME_DOES_NOT_EXIST = 16777234,
CASS_ERROR_LIB_UNABLE_TO_DETERMINE_PROTOCOL = 16777235,
CASS_ERROR_LIB_NULL_VALUE = 16777236,
CASS_ERROR_LIB_NOT_IMPLEMENTED = 16777237,
CASS_ERROR_LIB_UNABLE_TO_CONNECT = 16777238,
CASS_ERROR_LIB_UNABLE_TO_CLOSE = 16777239,
CASS_ERROR_LIB_NO_PAGING_STATE = 16777240,
CASS_ERROR_LIB_PARAMETER_UNSET = 16777241,
CASS_ERROR_LIB_INVALID_ERROR_RESULT_TYPE = 16777242,
CASS_ERROR_LIB_INVALID_FUTURE_TYPE = 16777243,
CASS_ERROR_LIB_INTERNAL_ERROR = 16777244,
CASS_ERROR_LIB_INVALID_CUSTOM_TYPE = 16777245,
CASS_ERROR_LIB_INVALID_DATA = 16777246,
CASS_ERROR_LIB_NOT_ENOUGH_DATA = 16777247,
CASS_ERROR_LIB_INVALID_STATE = 16777248,
CASS_ERROR_LIB_NO_CUSTOM_PAYLOAD = 16777249,
CASS_ERROR_LIB_EXECUTION_PROFILE_INVALID = 16777250,
CASS_ERROR_LIB_NO_TRACING_ID = 16777251,
CASS_ERROR_SERVER_SERVER_ERROR = 33554432,
CASS_ERROR_SERVER_PROTOCOL_ERROR = 33554442,
CASS_ERROR_SERVER_BAD_CREDENTIALS = 33554688,
CASS_ERROR_SERVER_UNAVAILABLE = 33558528,
CASS_ERROR_SERVER_OVERLOADED = 33558529,
CASS_ERROR_SERVER_IS_BOOTSTRAPPING = 33558530,
CASS_ERROR_SERVER_TRUNCATE_ERROR = 33558531,
CASS_ERROR_SERVER_WRITE_TIMEOUT = 33558784,
CASS_ERROR_SERVER_READ_TIMEOUT = 33559040,
CASS_ERROR_SERVER_READ_FAILURE = 33559296,
CASS_ERROR_SERVER_FUNCTION_FAILURE = 33559552,
CASS_ERROR_SERVER_WRITE_FAILURE = 33559808,
CASS_ERROR_SERVER_SYNTAX_ERROR = 33562624,
CASS_ERROR_SERVER_UNAUTHORIZED = 33562880,
CASS_ERROR_SERVER_INVALID_QUERY = 33563136,
CASS_ERROR_SERVER_CONFIG_ERROR = 33563392,
CASS_ERROR_SERVER_ALREADY_EXISTS = 33563648,
CASS_ERROR_SERVER_UNPREPARED = 33563904,
CASS_ERROR_SSL_INVALID_CERT = 50331649,
CASS_ERROR_SSL_INVALID_PRIVATE_KEY = 50331650,
CASS_ERROR_SSL_NO_PEER_CERT = 50331651,
CASS_ERROR_SSL_INVALID_PEER_CERT = 50331652,
CASS_ERROR_SSL_IDENTITY_MISMATCH = 50331653,
CASS_ERROR_SSL_PROTOCOL_ERROR = 50331654,
CASS_ERROR_SSL_CLOSED = 50331655,
CASS_ERROR_LAST_ENTRY = 50331656,
}
pub use self::CassError_ as CassError;
#[doc = " A callback that's notified when the future is set."]
#[doc = ""]
#[doc = " @param[in] message"]
#[doc = " @param[in] data user defined data provided when the callback"]
#[doc = " was registered."]
#[doc = ""]
#[doc = " @see cass_future_set_callback()"]
pub type CassFutureCallback = ::std::option::Option<
unsafe extern "C" fn(future: *mut CassFuture, data: *mut ::std::os::raw::c_void),
>;
#[doc = " A log message."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassLogMessage_ {
#[doc = " The millisecond timestamp (since the Epoch) when the message was logged"]
pub time_ms: cass_uint64_t,
#[doc = "< The severity of the log message"]
pub severity: CassLogLevel,
#[doc = "< The file where the message was logged"]
pub file: *const ::std::os::raw::c_char,
#[doc = "< The line in the file where the message was logged"]
pub line: ::std::os::raw::c_int,
#[doc = "< The function where the message was logged"]
pub function: *const ::std::os::raw::c_char,
#[doc = "< The message"]
pub message: [::std::os::raw::c_char; 1024usize],
}
#[doc = " A log message."]
pub type CassLogMessage = CassLogMessage_;
#[doc = " A callback that's used to handle logging."]
#[doc = ""]
#[doc = " @param[in] message"]
#[doc = " @param[in] data user defined data provided when the callback"]
#[doc = " was registered."]
#[doc = ""]
#[doc = " @see cass_log_set_callback()"]
pub type CassLogCallback = ::std::option::Option<
unsafe extern "C" fn(message: *const CassLogMessage, data: *mut ::std::os::raw::c_void),
>;
#[doc = " A custom malloc function. This function should allocate \"size\" bytes and"]
#[doc = " return a pointer to that memory"]
#[doc = ""]
#[doc = " @param[in] size The size of the memory to allocate"]
#[doc = ""]
#[doc = " @see CassFreeFunction"]
#[doc = " @see cass_alloc_set_functions()"]
pub type CassMallocFunction =
::std::option::Option<unsafe extern "C" fn(size: usize) -> *mut ::std::os::raw::c_void>;
#[doc = " A custom realloc function. This function attempts to change the size of the"]
#[doc = " memory pointed to by \"ptr\". If the memory cannot be resized then new memory"]
#[doc = " should be allocated and contain the contents of the original memory at \"ptr\"."]
#[doc = ""]
#[doc = " @param[in] ptr A pointer to the original memory. If NULL it should behave the"]
#[doc = " same as \"CassMallocFunction\""]
#[doc = " @param[in] size The size of the memory to allocate/resize."]
#[doc = ""]
#[doc = " @see CassMallocFunction"]
#[doc = " @see CassFreeFunction"]
#[doc = " @see cass_alloc_set_functions()"]
pub type CassReallocFunction = ::std::option::Option<
unsafe extern "C" fn(
ptr: *mut ::std::os::raw::c_void,
size: usize,
) -> *mut ::std::os::raw::c_void,
>;
#[doc = " A custom free function. This function deallocates the memory pointed to by"]
#[doc = " \"ptr\" that was previously allocated by a \"CassMallocFunction\" or"]
#[doc = " \"CassReallocFunction\" function."]
#[doc = ""]
#[doc = " @param[in] ptr A pointer to memory that should be deallocated. If NULL then"]
#[doc = " this will perform no operation."]
#[doc = ""]
#[doc = " @see CassMallocFunction"]
#[doc = " @see CassReallocFunction"]
#[doc = " @see cass_alloc_set_functions()"]
pub type CassFreeFunction =
::std::option::Option<unsafe extern "C" fn(ptr: *mut ::std::os::raw::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassAuthenticator_ {
_unused: [u8; 0],
}
#[doc = " An authenticator."]
#[doc = ""]
#[doc = " @struct CassAuthenticator"]
pub type CassAuthenticator = CassAuthenticator_;
#[doc = " A callback used to initiate an authentication exchange."]
#[doc = ""]
#[doc = " Use cass_authenticator_set_response() to set the response token."]
#[doc = ""]
#[doc = " Use cass_authenticator_set_error() if an error occurred during"]
#[doc = " initialization."]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] data"]
pub type CassAuthenticatorInitialCallback = ::std::option::Option<
unsafe extern "C" fn(auth: *mut CassAuthenticator, data: *mut ::std::os::raw::c_void),
>;
#[doc = " A callback used when an authentication challenge initiated"]
#[doc = " by the server."]
#[doc = ""]
#[doc = " Use cass_authenticator_set_response() to set the response token."]
#[doc = ""]
#[doc = " Use cass_authenticator_set_error() if an error occurred during the"]
#[doc = " challenge."]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] data"]
#[doc = " @param[in] token"]
#[doc = " @param[in] token_size"]
pub type CassAuthenticatorChallengeCallback = ::std::option::Option<
unsafe extern "C" fn(
auth: *mut CassAuthenticator,
data: *mut ::std::os::raw::c_void,
token: *const ::std::os::raw::c_char,
token_size: usize,
),
>;
#[doc = " A callback used to indicate the success of the authentication"]
#[doc = " exchange."]
#[doc = ""]
#[doc = " Use cass_authenticator_set_error() if an error occurred while evaluating"]
#[doc = " the success token."]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] data"]
#[doc = " @param[in] token"]
#[doc = " @param[in] token_size"]
pub type CassAuthenticatorSuccessCallback = ::std::option::Option<
unsafe extern "C" fn(
auth: *mut CassAuthenticator,
data: *mut ::std::os::raw::c_void,
token: *const ::std::os::raw::c_char,
token_size: usize,
),
>;
#[doc = " A callback used to cleanup resources that were acquired during"]
#[doc = " the process of the authentication exchange. This is called after"]
#[doc = " the termination of the exchange regardless of the outcome."]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] data"]
pub type CassAuthenticatorCleanupCallback = ::std::option::Option<
unsafe extern "C" fn(auth: *mut CassAuthenticator, data: *mut ::std::os::raw::c_void),
>;
#[doc = " A callback used to cleanup resources."]
#[doc = ""]
#[doc = " @param[in] data"]
pub type CassAuthenticatorDataCleanupCallback =
::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>;
#[doc = " Authenticator callbacks"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassAuthenticatorCallbacks_ {
pub initial_callback: CassAuthenticatorInitialCallback,
pub challenge_callback: CassAuthenticatorChallengeCallback,
pub success_callback: CassAuthenticatorSuccessCallback,
pub cleanup_callback: CassAuthenticatorCleanupCallback,
}
#[doc = " Authenticator callbacks"]
pub type CassAuthenticatorCallbacks = CassAuthenticatorCallbacks_;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum CassHostListenerEvent_ {
CASS_HOST_LISTENER_EVENT_UP = 0,
CASS_HOST_LISTENER_EVENT_DOWN = 1,
CASS_HOST_LISTENER_EVENT_ADD = 2,
CASS_HOST_LISTENER_EVENT_REMOVE = 3,
}
pub use self::CassHostListenerEvent_ as CassHostListenerEvent;
#[doc = " A callback used to indicate the host state for a node in the cluster."]
#[doc = ""]
#[doc = " @param[in] event"]
#[doc = " @param[in] address"]
#[doc = " @param[in] data"]
#[doc = " @see cass_cluster_set_host_listener_callback()"]
pub type CassHostListenerCallback = ::std::option::Option<
unsafe extern "C" fn(
event: CassHostListenerEvent,
address: CassInet,
data: *mut ::std::os::raw::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CassExecProfile_ {
_unused: [u8; 0],
}
#[doc = " An execution profile object provides a mechanism to group together a set of"]
#[doc = " configuration options and reuse them across different statement executions."]
#[doc = " This feature is useful when dealing with different query workloads."]
#[doc = ""]
#[doc = " @struct CassExecProfile"]
pub type CassExecProfile = CassExecProfile_;
extern "C" {
#[doc = " Creates a new execution profile."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @return Returns a execution profile that must be freed."]
#[doc = ""]
#[doc = " @see cass_execution_profile_free()"]
pub fn cass_execution_profile_new() -> *mut CassExecProfile;
}
extern "C" {
#[doc = " Frees a execution profile instance."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
pub fn cass_execution_profile_free(profile: *mut CassExecProfile);
}
extern "C" {
#[doc = " Sets the timeout waiting for a response from a node."]
#[doc = ""]
#[doc = " <b>Default:</b> Disabled (uses the cluster request timeout)"]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] timeout_ms Request timeout in milliseconds. Use 0 for no timeout"]
#[doc = " or CASS_UINT64_MAX to disable."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_statement_set_request_timeout()"]
pub fn cass_execution_profile_set_request_timeout(
profile: *mut CassExecProfile,
timeout_ms: cass_uint64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the consistency level."]
#[doc = ""]
#[doc = " <b>Default:</b> Disabled (uses the default consistency)"]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_statement_set_consistency()"]
pub fn cass_execution_profile_set_consistency(
profile: *mut CassExecProfile,
consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the serial consistency level."]
#[doc = ""]
#[doc = " <b>Default:</b> Disabled (uses the default serial consistency)"]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] serial_consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_statement_set_serial_consistency()"]
pub fn cass_execution_profile_set_serial_consistency(
profile: *mut CassExecProfile,
serial_consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile to use round-robin load balancing."]
#[doc = ""]
#[doc = " The driver discovers all nodes in a cluster and cycles through"]
#[doc = " them per request. All are considered 'local'."]
#[doc = ""]
#[doc = " <b>Note:</b> Profile-based load balancing policy is disabled by default;"]
#[doc = " cluster load balancing policy is used when profile does not contain a policy."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_load_balance_round_robin()"]
pub fn cass_execution_profile_set_load_balance_round_robin(
profile: *mut CassExecProfile,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile to use DC-aware load balancing."]
#[doc = " For each query, all live nodes in a primary 'local' DC are tried first,"]
#[doc = " followed by any node from other DCs."]
#[doc = ""]
#[doc = " <b>Note:</b> Profile-based load balancing policy is disabled by default;"]
#[doc = " cluster load balancing policy is used when profile does not contain a policy."]
#[doc = ""]
#[doc = " @deprecated The remote DC settings for DC-aware are not suitable for most"]
#[doc = " scenarios that require DC failover. There is also unhandled gap between"]
#[doc = " replication factor number of nodes failing and the full cluster failing. Only"]
#[doc = " the remote DC settings are being deprecated."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] local_dc The primary data center to try first"]
#[doc = " @param[in] used_hosts_per_remote_dc The number of hosts used in each remote"]
#[doc = " DC if no hosts are available in the local dc (<b>deprecated</b>)"]
#[doc = " @param[in] allow_remote_dcs_for_local_cl Allows remote hosts to be used if no"]
#[doc = " local dc hosts are available and the consistency level is LOCAL_ONE or"]
#[doc = " LOCAL_QUORUM (<b>deprecated</b>)"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_load_balance_dc_aware()"]
pub fn cass_execution_profile_set_load_balance_dc_aware(
profile: *mut CassExecProfile,
local_dc: *const ::std::os::raw::c_char,
used_hosts_per_remote_dc: ::std::os::raw::c_uint,
allow_remote_dcs_for_local_cl: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_load_balance_dc_aware(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @deprecated The remote DC settings for DC-aware are not suitable for most"]
#[doc = " scenarios that require DC failover. There is also unhandled gap between"]
#[doc = " replication factor number of nodes failing and the full cluster failing. Only"]
#[doc = " the remote DC settings are being deprecated."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] local_dc"]
#[doc = " @param[in] local_dc_length"]
#[doc = " @param[in] used_hosts_per_remote_dc (<b>deprecated</b>)"]
#[doc = " @param[in] allow_remote_dcs_for_local_cl (<b>deprecated</b>)"]
#[doc = " @return same as cass_execution_profile_set_load_balance_dc_aware()"]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_load_balance_dc_aware()"]
#[doc = " @see cass_cluster_set_load_balance_dc_aware_n()"]
pub fn cass_execution_profile_set_load_balance_dc_aware_n(
profile: *mut CassExecProfile,
local_dc: *const ::std::os::raw::c_char,
local_dc_length: usize,
used_hosts_per_remote_dc: ::std::os::raw::c_uint,
allow_remote_dcs_for_local_cl: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile to use token-aware request routing or not."]
#[doc = ""]
#[doc = " <b>Important:</b> Token-aware routing depends on keyspace metadata."]
#[doc = " For this reason enabling token-aware routing will also enable retrieving"]
#[doc = " and updating keyspace schema metadata."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " This routing policy composes the base routing policy, routing"]
#[doc = " requests first to replicas on nodes considered 'local' by"]
#[doc = " the base load balancing policy."]
#[doc = ""]
#[doc = " <b>Note:</b> Execution profiles use the cluster-level load balancing policy"]
#[doc = " unless enabled. This setting is not applicable unless a load balancing policy"]
#[doc = " is enabled on the execution profile."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_token_aware_routing()"]
pub fn cass_execution_profile_set_token_aware_routing(
profile: *mut CassExecProfile,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile's token-aware routing to randomly shuffle"]
#[doc = " replicas. This can reduce the effectiveness of server-side caching, but it"]
#[doc = " can better distribute load over replicas for a given partition key."]
#[doc = ""]
#[doc = " <b>Note:</b> Token-aware routing must be enabled and a load balancing policy"]
#[doc = " must be enabled on the execution profile for the setting to be applicable."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_token_aware_routing_shuffle_replicas()"]
pub fn cass_execution_profile_set_token_aware_routing_shuffle_replicas(
profile: *mut CassExecProfile,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile to use latency-aware request routing or not."]
#[doc = ""]
#[doc = " <b>Note:</b> Execution profiles use the cluster-level load balancing policy"]
#[doc = " unless enabled. This setting is not applicable unless a load balancing policy"]
#[doc = " is enabled on the execution profile."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false (disabled)."]
#[doc = ""]
#[doc = " This routing policy is a top-level routing policy. It uses the"]
#[doc = " base routing policy to determine locality (dc-aware) and/or"]
#[doc = " placement (token-aware) before considering the latency."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_latency_aware_routing()"]
pub fn cass_execution_profile_set_latency_aware_routing(
profile: *mut CassExecProfile,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Configures the execution profile's settings for latency-aware request"]
#[doc = " routing."]
#[doc = ""]
#[doc = " <b>Note:</b> Execution profiles use the cluster-level load balancing policy"]
#[doc = " unless enabled. This setting is not applicable unless a load balancing policy"]
#[doc = " is enabled on the execution profile."]
#[doc = ""]
#[doc = " <b>Defaults:</b>"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>exclusion_threshold: 2.0</li>"]
#[doc = " <li>scale_ms: 100 milliseconds</li>"]
#[doc = " <li>retry_period_ms: 10,000 milliseconds (10 seconds)</li>"]
#[doc = " <li>update_rate_ms: 100 milliseconds</li>"]
#[doc = " <li>min_measured: 50</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] exclusion_threshold Controls how much worse the latency must be"]
#[doc = " compared to the average latency of the best performing node before it"]
#[doc = " penalized."]
#[doc = " @param[in] scale_ms Controls the weight given to older latencies when"]
#[doc = " calculating the average latency of a node. A bigger scale will give more"]
#[doc = " weight to older latency measurements."]
#[doc = " @param[in] retry_period_ms The amount of time a node is penalized by the"]
#[doc = " policy before being given a second chance when the current average latency"]
#[doc = " exceeds the calculated threshold"]
#[doc = " (exclusion_threshold * best_average_latency)."]
#[doc = " @param[in] update_rate_ms The rate at which the best average latency is"]
#[doc = " recomputed."]
#[doc = " @param[in] min_measured The minimum number of measurements per-host required"]
#[doc = " to be considered by the policy."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_latency_aware_routing_settings()"]
pub fn cass_execution_profile_set_latency_aware_routing_settings(
profile: *mut CassExecProfile,
exclusion_threshold: cass_double_t,
scale_ms: cass_uint64_t,
retry_period_ms: cass_uint64_t,
update_rate_ms: cass_uint64_t,
min_measured: cass_uint64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets/Appends whitelist hosts for the execution profile. The first call sets"]
#[doc = " the whitelist hosts and any subsequent calls appends additional hosts."]
#[doc = " Passing an empty string will clear and disable the whitelist. White space is"]
#[doc = " striped from the hosts."]
#[doc = ""]
#[doc = " This policy filters requests to all other policies, only allowing requests"]
#[doc = " to the hosts contained in the whitelist. Any host not in the whitelist will"]
#[doc = " be ignored and a connection will not be established. This policy is useful"]
#[doc = " for ensuring that the driver will only connect to a predefined set of hosts."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" \"127.0.0.1,127.0.0.2\""]
#[doc = ""]
#[doc = " <b>Note:</b> Execution profiles use the cluster-level load balancing policy"]
#[doc = " unless enabled. This setting is not applicable unless a load balancing policy"]
#[doc = " is enabled on the execution profile."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] hosts A comma delimited list of addresses. An empty string will"]
#[doc = " clear the whitelist hosts. The string is copied into the cluster"]
#[doc = " configuration; the memory pointed to by this parameter can be freed after"]
#[doc = " this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_whitelist_filtering()"]
pub fn cass_execution_profile_set_whitelist_filtering(
profile: *mut CassExecProfile,
hosts: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_whitelist_filtering(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] hosts"]
#[doc = " @param[in] hosts_length"]
#[doc = " @return same as cass_execution_profile_set_whitelist_filtering()"]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_whitelist_filtering()"]
#[doc = " @see cass_cluster_set_whitelist_filtering()"]
pub fn cass_execution_profile_set_whitelist_filtering_n(
profile: *mut CassExecProfile,
hosts: *const ::std::os::raw::c_char,
hosts_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets/Appends blacklist hosts for the execution profile. The first call sets"]
#[doc = " the blacklist hosts and any subsequent calls appends additional hosts."]
#[doc = " Passing an empty string will clear and disable the blacklist. White space is"]
#[doc = " striped from the hosts."]
#[doc = ""]
#[doc = " This policy filters requests to all other policies, only allowing requests"]
#[doc = " to the hosts not contained in the blacklist. Any host in the blacklist will"]
#[doc = " be ignored and a connection will not be established. This policy is useful"]
#[doc = " for ensuring that the driver will not connect to a predefined set of hosts."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" \"127.0.0.1,127.0.0.2\""]
#[doc = ""]
#[doc = " <b>Note:</b> Execution profiles use the cluster-level load balancing policy"]
#[doc = " unless enabled. This setting is not applicable unless a load balancing policy"]
#[doc = " is enabled on the execution profile."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] hosts A comma delimited list of addresses. An empty string will"]
#[doc = " clear the blacklist hosts. The string is copied into the cluster"]
#[doc = " configuration; the memory pointed to by this parameter can be freed after"]
#[doc = " this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_blacklist_filtering()"]
pub fn cass_execution_profile_set_blacklist_filtering(
profile: *mut CassExecProfile,
hosts: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_blacklist_filtering(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] hosts"]
#[doc = " @param[in] hosts_length"]
#[doc = " @return same as cass_execution_profile_set_blacklist_filtering_hosts()"]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_blacklist_filtering()"]
#[doc = " @see cass_cluster_set_blacklist_filtering()"]
pub fn cass_execution_profile_set_blacklist_filtering_n(
profile: *mut CassExecProfile,
hosts: *const ::std::os::raw::c_char,
hosts_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_whitelist_filtering(), but whitelist all"]
#[doc = " hosts of a dc."]
#[doc = ""]
#[doc = " Examples: \"dc1\", \"dc1,dc2\""]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] dcs A comma delimited list of dcs. An empty string will clear the"]
#[doc = " whitelist dcs. The string is copied into the cluster configuration; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_whitelist_dc_filtering()"]
pub fn cass_execution_profile_set_whitelist_dc_filtering(
profile: *mut CassExecProfile,
dcs: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_whitelist_dc_filtering(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] dcs"]
#[doc = " @param[in] dcs_length"]
#[doc = " @return same as cass_execution_profile_set_whitelist_dc_filtering()"]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_whitelist_dc_filtering()"]
#[doc = " @see cass_cluster_set_whitelist_dc_filtering()"]
pub fn cass_execution_profile_set_whitelist_dc_filtering_n(
profile: *mut CassExecProfile,
dcs: *const ::std::os::raw::c_char,
dcs_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_blacklist_filtering(), but blacklist all"]
#[doc = " hosts of a dc."]
#[doc = ""]
#[doc = " Examples: \"dc1\", \"dc1,dc2\""]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] dcs A comma delimited list of dcs. An empty string will clear the"]
#[doc = " blacklist dcs. The string is copied into the cluster configuration; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_blacklist_filtering()"]
#[doc = " @see cass_cluster_set_blacklist_dc_filtering()"]
pub fn cass_execution_profile_set_blacklist_dc_filtering(
profile: *mut CassExecProfile,
dcs: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_execution_profile_set_blacklist_dc_filtering(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] dcs"]
#[doc = " @param[in] dcs_length"]
#[doc = " @return same as cass_execution_profile_set_blacklist_dc_filtering()"]
#[doc = ""]
#[doc = " @see cass_execution_profile_set_blacklist_dc_filtering()"]
#[doc = " @see cass_cluster_set_blacklist_dc_filtering()"]
pub fn cass_execution_profile_set_blacklist_dc_filtering_n(
profile: *mut CassExecProfile,
dcs: *const ::std::os::raw::c_char,
dcs_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the execution profile's retry policy."]
#[doc = ""]
#[doc = " <b>Note:</b> Profile-based retry policy is disabled by default; cluster retry"]
#[doc = " policy is used when profile does not contain a policy unless the retry policy"]
#[doc = " was explicitly set on the batch/statement request."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] retry_policy NULL will clear retry policy from execution profile"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_retry_policy()"]
pub fn cass_execution_profile_set_retry_policy(
profile: *mut CassExecProfile,
retry_policy: *mut CassRetryPolicy,
) -> CassError;
}
extern "C" {
#[doc = " Enable constant speculative executions with the supplied settings for the"]
#[doc = " execution profile."]
#[doc = ""]
#[doc = " <b>Note:</b> Profile-based speculative execution policy is disabled by"]
#[doc = " default; cluster speculative execution policy is used when profile does not"]
#[doc = " contain a policy."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @param[in] constant_delay_ms"]
#[doc = " @param[in] max_speculative_executions"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
#[doc = ""]
#[doc = " @see cass_cluster_set_constant_speculative_execution_policy()"]
pub fn cass_execution_profile_set_constant_speculative_execution_policy(
profile: *mut CassExecProfile,
constant_delay_ms: cass_int64_t,
max_speculative_executions: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Disable speculative executions for the execution profile."]
#[doc = ""]
#[doc = " <b>Note:</b> Profile-based speculative execution policy is disabled by"]
#[doc = " default; cluster speculative execution policy is used when profile does not"]
#[doc = " contain a policy."]
#[doc = ""]
#[doc = " @public @memberof CassExecProfile"]
#[doc = ""]
#[doc = " @param[in] profile"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
#[doc = ""]
#[doc = " @see cass_cluster_set_no_speculative_execution_policy()"]
pub fn cass_execution_profile_set_no_speculative_execution_policy(
profile: *mut CassExecProfile,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new cluster."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @return Returns a cluster that must be freed."]
#[doc = ""]
#[doc = " @see cass_cluster_free()"]
pub fn cass_cluster_new() -> *mut CassCluster;
}
extern "C" {
#[doc = " Frees a cluster instance."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
pub fn cass_cluster_free(cluster: *mut CassCluster);
}
extern "C" {
#[doc = " Sets/Appends contact points. This *MUST* be set. The first call sets"]
#[doc = " the contact points and any subsequent calls appends additional contact"]
#[doc = " points. Passing an empty string will clear the contact points. White space"]
#[doc = " is striped from the contact points."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" \"127.0.0.1,127.0.0.2\", \"server1.domain.com\""]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] contact_points A comma delimited list of addresses or"]
#[doc = " names. An empty string will clear the contact points."]
#[doc = " The string is copied into the cluster configuration; the memory pointed"]
#[doc = " to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_contact_points(
cluster: *mut CassCluster,
contact_points: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_contact_points(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] contact_points"]
#[doc = " @param[in] contact_points_length"]
#[doc = " @return same as cass_cluster_set_contact_points()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_contact_points()"]
pub fn cass_cluster_set_contact_points_n(
cluster: *mut CassCluster,
contact_points: *const ::std::os::raw::c_char,
contact_points_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the port."]
#[doc = ""]
#[doc = " <b>Default:</b> 9042"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] port"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_port(
cluster: *mut CassCluster,
port: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Sets the local address to bind when connecting to the cluster,"]
#[doc = " if desired."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] name IP address to bind, or empty string for no binding."]
#[doc = " Only numeric addresses are supported; no resolution is done."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_local_address(
cluster: *mut CassCluster,
name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_local_address(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_cluster_set_local_address()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_local_address()"]
pub fn cass_cluster_set_local_address_n(
cluster: *mut CassCluster,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the SSL context and enables SSL."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] ssl"]
#[doc = ""]
#[doc = " @see cass_ssl_new()"]
pub fn cass_cluster_set_ssl(cluster: *mut CassCluster, ssl: *mut CassSsl);
}
extern "C" {
#[doc = " Sets custom authenticator"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] exchange_callbacks"]
#[doc = " @param[in] cleanup_callback"]
#[doc = " @param[in] data"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_authenticator_callbacks(
cluster: *mut CassCluster,
exchange_callbacks: *const CassAuthenticatorCallbacks,
cleanup_callback: CassAuthenticatorDataCleanupCallback,
data: *mut ::std::os::raw::c_void,
) -> CassError;
}
extern "C" {
#[doc = " Sets the protocol version. The driver will automatically downgrade to the lowest"]
#[doc = " supported protocol version."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_PROTOCOL_VERSION_V4 or CASS_PROTOCOL_VERSION_DSEV1 when"]
#[doc = " using the DSE driver with DataStax Enterprise."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] protocol_version"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_use_beta_protocol_version()"]
pub fn cass_cluster_set_protocol_version(
cluster: *mut CassCluster,
protocol_version: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Use the newest beta protocol version. This currently enables the use of"]
#[doc = " protocol version v5 (CASS_PROTOCOL_VERSION_V5) or DSEv2 (CASS_PROTOCOL_VERSION_DSEV2)"]
#[doc = " when using the DSE driver with DataStax Enterprise."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enable if false the highest non-beta protocol version will be used"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_use_beta_protocol_version(
cluster: *mut CassCluster,
enable: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets default consistency level of statement."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_CONSISTENCY_LOCAL_ONE"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_consistency(
cluster: *mut CassCluster,
consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets default serial consistency level of statement."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_CONSISTENCY_ANY"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_serial_consistency(
cluster: *mut CassCluster,
consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the number of IO threads. This is the number of threads"]
#[doc = " that will handle query requests."]
#[doc = ""]
#[doc = " <b>Default:</b> 1"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] num_threads"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_num_threads_io(
cluster: *mut CassCluster,
num_threads: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
#[doc = " Sets the size of the fixed size queue that stores"]
#[doc = " pending requests."]
#[doc = ""]
#[doc = " <b>Default:</b> 8192"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] queue_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_queue_size_io(
cluster: *mut CassCluster,
queue_size: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_queue_size_event(
cluster: *mut CassCluster,
queue_size: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
#[doc = " Sets the number of connections made to each server in each"]
#[doc = " IO thread."]
#[doc = ""]
#[doc = " <b>Default:</b> 1"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] num_connections"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_core_connections_per_host(
cluster: *mut CassCluster,
num_connections: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_max_connections_per_host(
cluster: *mut CassCluster,
num_connections: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_reconnect_wait_time(
cluster: *mut CassCluster,
wait_time: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Configures the cluster to use a reconnection policy that waits a constant"]
#[doc = " time between each reconnection attempt."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] delay_ms Time in milliseconds to delay attempting a reconnection;"]
#[doc = " 0 to perform a reconnection immediately."]
pub fn cass_cluster_set_constant_reconnect(cluster: *mut CassCluster, delay_ms: cass_uint64_t);
}
extern "C" {
#[doc = " Configures the cluster to use a reconnection policy that waits exponentially"]
#[doc = " longer between each reconnection attempt; however will maintain a constant"]
#[doc = " delay once the maximum delay is reached."]
#[doc = ""]
#[doc = " <b>Default:</b>"]
#[doc = " <ul>"]
#[doc = " <li>2000 milliseconds base delay</li>"]
#[doc = " <li>60000 milliseconds max delay</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " <p>"]
#[doc = " <b>Note:</b> A random amount of jitter (+/- 15%) will be added to the pure"]
#[doc = " exponential delay value. This helps to prevent situations where multiple"]
#[doc = " connections are in the reconnection process at exactly the same time. The"]
#[doc = " jitter will never cause the delay to be less than the base delay, or more"]
#[doc = " than the max delay."]
#[doc = " </p>"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] base_delay_ms The base delay (in milliseconds) to use for"]
#[doc = " scheduling reconnection attempts."]
#[doc = " @param[in] max_delay_ms The maximum delay to wait between two reconnection"]
#[doc = " attempts."]
#[doc = " @return CASS_OK if successful, otherwise error occurred."]
pub fn cass_cluster_set_exponential_reconnect(
cluster: *mut CassCluster,
base_delay_ms: cass_uint64_t,
max_delay_ms: cass_uint64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the amount of time, in microseconds, to wait for new requests to"]
#[doc = " coalesce into a single system call. This should be set to a value around"]
#[doc = " the latency SLA of your application's requests while also considering the"]
#[doc = " request's roundtrip time. Larger values should be used for throughput"]
#[doc = " bound workloads and lower values should be used for latency bound"]
#[doc = " workloads."]
#[doc = ""]
#[doc = " <b>Default:</b> 200 us"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] delay_us"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_coalesce_delay(
cluster: *mut CassCluster,
delay_us: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the ratio of time spent processing new requests versus handling the I/O"]
#[doc = " and processing of outstanding requests. The range of this setting is 1 to 100,"]
#[doc = " where larger values allocate more time to processing new requests and smaller"]
#[doc = " values allocate more time to processing outstanding requests."]
#[doc = ""]
#[doc = " <b>Default:</b> 50"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] ratio"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_new_request_ratio(
cluster: *mut CassCluster,
ratio: cass_int32_t,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_max_concurrent_creation(
cluster: *mut CassCluster,
num_connections: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_max_concurrent_requests_threshold(
cluster: *mut CassCluster,
num_requests: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_max_requests_per_flush(
cluster: *mut CassCluster,
num_requests: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_write_bytes_high_water_mark(
cluster: *mut CassCluster,
num_bytes: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_write_bytes_low_water_mark(
cluster: *mut CassCluster,
num_bytes: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_pending_requests_high_water_mark(
cluster: *mut CassCluster,
num_requests: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
pub fn cass_cluster_set_pending_requests_low_water_mark(
cluster: *mut CassCluster,
num_requests: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
#[doc = " Sets the timeout for connecting to a node."]
#[doc = ""]
#[doc = " <b>Default:</b> 5000 milliseconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] timeout_ms Connect timeout in milliseconds"]
pub fn cass_cluster_set_connect_timeout(
cluster: *mut CassCluster,
timeout_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the timeout for waiting for a response from a node."]
#[doc = ""]
#[doc = " <b>Default:</b> 12000 milliseconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] timeout_ms Request timeout in milliseconds. Use 0 for no timeout."]
pub fn cass_cluster_set_request_timeout(
cluster: *mut CassCluster,
timeout_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the timeout for waiting for DNS name resolution."]
#[doc = ""]
#[doc = " <b>Default:</b> 2000 milliseconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] timeout_ms Request timeout in milliseconds"]
pub fn cass_cluster_set_resolve_timeout(
cluster: *mut CassCluster,
timeout_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the maximum time to wait for schema agreement after a schema change"]
#[doc = " is made (e.g. creating, altering, dropping a table/keyspace/view/index etc)."]
#[doc = ""]
#[doc = " <b>Default:</b> 10000 milliseconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] wait_time_ms Wait time in milliseconds"]
pub fn cass_cluster_set_max_schema_wait_time(
cluster: *mut CassCluster,
wait_time_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the maximum time to wait for tracing data to become available."]
#[doc = ""]
#[doc = " <b>Default:</b> 15 milliseconds"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] max_wait_time_ms"]
pub fn cass_cluster_set_tracing_max_wait_time(
cluster: *mut CassCluster,
max_wait_time_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the amount of time to wait between attempts to check to see if tracing is"]
#[doc = " available."]
#[doc = ""]
#[doc = " <b>Default:</b> 3 milliseconds"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] retry_wait_time_ms"]
pub fn cass_cluster_set_tracing_retry_wait_time(
cluster: *mut CassCluster,
retry_wait_time_ms: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the consistency level to use for checking to see if tracing data is"]
#[doc = " available."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_CONSISTENCY_ONE"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] consistency"]
pub fn cass_cluster_set_tracing_consistency(
cluster: *mut CassCluster,
consistency: CassConsistency,
);
}
extern "C" {
#[doc = " Sets credentials for plain text authentication."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] username"]
#[doc = " @param[in] password"]
pub fn cass_cluster_set_credentials(
cluster: *mut CassCluster,
username: *const ::std::os::raw::c_char,
password: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_credentials(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] username"]
#[doc = " @param[in] username_length"]
#[doc = " @param[in] password"]
#[doc = " @param[in] password_length"]
#[doc = " @return same as cass_cluster_set_credentials()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_credentials();"]
pub fn cass_cluster_set_credentials_n(
cluster: *mut CassCluster,
username: *const ::std::os::raw::c_char,
username_length: usize,
password: *const ::std::os::raw::c_char,
password_length: usize,
);
}
extern "C" {
#[doc = " Configures the cluster to use round-robin load balancing."]
#[doc = ""]
#[doc = " The driver discovers all nodes in a cluster and cycles through"]
#[doc = " them per request. All are considered 'local'."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
pub fn cass_cluster_set_load_balance_round_robin(cluster: *mut CassCluster);
}
extern "C" {
#[doc = " Configures the cluster to use DC-aware load balancing."]
#[doc = " For each query, all live nodes in a primary 'local' DC are tried first,"]
#[doc = " followed by any node from other DCs."]
#[doc = ""]
#[doc = " <b>Note:</b> This is the default, and does not need to be called unless"]
#[doc = " switching an existing from another policy or changing settings."]
#[doc = " Without further configuration, a default local_dc is chosen from the"]
#[doc = " first connected contact point, and no remote hosts are considered in"]
#[doc = " query plans. If relying on this mechanism, be sure to use only contact"]
#[doc = " points from the local DC."]
#[doc = ""]
#[doc = " @deprecated The remote DC settings for DC-aware are not suitable for most"]
#[doc = " scenarios that require DC failover. There is also unhandled gap between"]
#[doc = " replication factor number of nodes failing and the full cluster failing. Only"]
#[doc = " the remote DC settings are being deprecated."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] local_dc The primary data center to try first"]
#[doc = " @param[in] used_hosts_per_remote_dc The number of hosts used in each remote"]
#[doc = " DC if no hosts are available in the local dc (<b>deprecated</b>)"]
#[doc = " @param[in] allow_remote_dcs_for_local_cl Allows remote hosts to be used if no"]
#[doc = " local dc hosts are available and the consistency level is LOCAL_ONE or"]
#[doc = " LOCAL_QUORUM (<b>deprecated</b>)"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_load_balance_dc_aware(
cluster: *mut CassCluster,
local_dc: *const ::std::os::raw::c_char,
used_hosts_per_remote_dc: ::std::os::raw::c_uint,
allow_remote_dcs_for_local_cl: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_load_balance_dc_aware(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @deprecated The remote DC settings for DC-aware are not suitable for most"]
#[doc = " scenarios that require DC failover. There is also unhandled gap between"]
#[doc = " replication factor number of nodes failing and the full cluster failing. Only"]
#[doc = " the remote DC settings are being deprecated."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] local_dc"]
#[doc = " @param[in] local_dc_length"]
#[doc = " @param[in] used_hosts_per_remote_dc (<b>deprecated</b>)"]
#[doc = " @param[in] allow_remote_dcs_for_local_cl (<b>deprecated</b>)"]
#[doc = " @return same as cass_cluster_set_load_balance_dc_aware()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_load_balance_dc_aware()"]
pub fn cass_cluster_set_load_balance_dc_aware_n(
cluster: *mut CassCluster,
local_dc: *const ::std::os::raw::c_char,
local_dc_length: usize,
used_hosts_per_remote_dc: ::std::os::raw::c_uint,
allow_remote_dcs_for_local_cl: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Configures the cluster to use token-aware request routing or not."]
#[doc = ""]
#[doc = " <b>Important:</b> Token-aware routing depends on keyspace metadata."]
#[doc = " For this reason enabling token-aware routing will also enable retrieving"]
#[doc = " and updating keyspace schema metadata."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " This routing policy composes the base routing policy, routing"]
#[doc = " requests first to replicas on nodes considered 'local' by"]
#[doc = " the base load balancing policy."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
pub fn cass_cluster_set_token_aware_routing(cluster: *mut CassCluster, enabled: cass_bool_t);
}
extern "C" {
#[doc = " Configures token-aware routing to randomly shuffle replicas. This can reduce"]
#[doc = " the effectiveness of server-side caching, but it can better distribute load over"]
#[doc = " replicas for a given partition key."]
#[doc = ""]
#[doc = " <b>Note:</b> Token-aware routing must be enabled for the setting to"]
#[doc = " be applicable."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
pub fn cass_cluster_set_token_aware_routing_shuffle_replicas(
cluster: *mut CassCluster,
enabled: cass_bool_t,
);
}
extern "C" {
#[doc = " Configures the cluster to use latency-aware request routing or not."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false (disabled)."]
#[doc = ""]
#[doc = " This routing policy is a top-level routing policy. It uses the"]
#[doc = " base routing policy to determine locality (dc-aware) and/or"]
#[doc = " placement (token-aware) before considering the latency."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
pub fn cass_cluster_set_latency_aware_routing(cluster: *mut CassCluster, enabled: cass_bool_t);
}
extern "C" {
#[doc = " Configures the settings for latency-aware request routing."]
#[doc = ""]
#[doc = " <b>Defaults:</b>"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>exclusion_threshold: 2.0</li>"]
#[doc = " <li>scale_ms: 100 milliseconds</li>"]
#[doc = " <li>retry_period_ms: 10,000 milliseconds (10 seconds)</li>"]
#[doc = " <li>update_rate_ms: 100 milliseconds</li>"]
#[doc = " <li>min_measured: 50</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] exclusion_threshold Controls how much worse the latency must be compared to the"]
#[doc = " average latency of the best performing node before it penalized."]
#[doc = " @param[in] scale_ms Controls the weight given to older latencies when calculating the average"]
#[doc = " latency of a node. A bigger scale will give more weight to older latency measurements."]
#[doc = " @param[in] retry_period_ms The amount of time a node is penalized by the policy before"]
#[doc = " being given a second chance when the current average latency exceeds the calculated"]
#[doc = " threshold (exclusion_threshold * best_average_latency)."]
#[doc = " @param[in] update_rate_ms The rate at which the best average latency is recomputed."]
#[doc = " @param[in] min_measured The minimum number of measurements per-host required to"]
#[doc = " be considered by the policy."]
pub fn cass_cluster_set_latency_aware_routing_settings(
cluster: *mut CassCluster,
exclusion_threshold: cass_double_t,
scale_ms: cass_uint64_t,
retry_period_ms: cass_uint64_t,
update_rate_ms: cass_uint64_t,
min_measured: cass_uint64_t,
);
}
extern "C" {
#[doc = " Sets/Appends whitelist hosts. The first call sets the whitelist hosts and"]
#[doc = " any subsequent calls appends additional hosts. Passing an empty string will"]
#[doc = " clear and disable the whitelist. White space is striped from the hosts."]
#[doc = ""]
#[doc = " This policy filters requests to all other policies, only allowing requests"]
#[doc = " to the hosts contained in the whitelist. Any host not in the whitelist will"]
#[doc = " be ignored and a connection will not be established. This policy is useful"]
#[doc = " for ensuring that the driver will only connect to a predefined set of hosts."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" \"127.0.0.1,127.0.0.2\""]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] hosts A comma delimited list of addresses. An empty string will"]
#[doc = " clear the whitelist hosts. The string is copied into the cluster"]
#[doc = " configuration; the memory pointed to by this parameter can be freed after"]
#[doc = " this call."]
pub fn cass_cluster_set_whitelist_filtering(
cluster: *mut CassCluster,
hosts: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_whitelist_filtering(), but with lengths for"]
#[doc = " string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] hosts"]
#[doc = " @param[in] hosts_length"]
#[doc = " @return same as cass_cluster_set_whitelist_filtering()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_whitelist_filtering()"]
pub fn cass_cluster_set_whitelist_filtering_n(
cluster: *mut CassCluster,
hosts: *const ::std::os::raw::c_char,
hosts_length: usize,
);
}
extern "C" {
#[doc = " Sets/Appends blacklist hosts. The first call sets the blacklist hosts and"]
#[doc = " any subsequent calls appends additional hosts. Passing an empty string will"]
#[doc = " clear and disable the blacklist. White space is striped from the hosts."]
#[doc = ""]
#[doc = " This policy filters requests to all other policies, only allowing requests"]
#[doc = " to the hosts not contained in the blacklist. Any host in the blacklist will"]
#[doc = " be ignored and a connection will not be established. This policy is useful"]
#[doc = " for ensuring that the driver will not connect to a predefined set of hosts."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" \"127.0.0.1,127.0.0.2\""]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] hosts A comma delimited list of addresses. An empty string will"]
#[doc = " clear the blacklist hosts. The string is copied into the cluster"]
#[doc = " configuration; the memory pointed to by this parameter can be freed after"]
#[doc = " this call."]
pub fn cass_cluster_set_blacklist_filtering(
cluster: *mut CassCluster,
hosts: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_blacklist_filtering_hosts(), but with lengths for"]
#[doc = " string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] hosts"]
#[doc = " @param[in] hosts_length"]
#[doc = " @return same as cass_cluster_set_blacklist_filtering()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_blacklist_filtering()"]
pub fn cass_cluster_set_blacklist_filtering_n(
cluster: *mut CassCluster,
hosts: *const ::std::os::raw::c_char,
hosts_length: usize,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_whitelist_filtering(), but whitelist all hosts of a dc"]
#[doc = ""]
#[doc = " Examples: \"dc1\", \"dc1,dc2\""]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] dcs A comma delimited list of dcs. An empty string will clear the"]
#[doc = " whitelist dcs. The string is copied into the cluster configuration; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
pub fn cass_cluster_set_whitelist_dc_filtering(
cluster: *mut CassCluster,
dcs: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_whitelist_dc_filtering(), but with lengths for"]
#[doc = " string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] dcs"]
#[doc = " @param[in] dcs_length"]
#[doc = " @return same as cass_cluster_set_whitelist_dc_filtering()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_whitelist_dc_filtering()"]
pub fn cass_cluster_set_whitelist_dc_filtering_n(
cluster: *mut CassCluster,
dcs: *const ::std::os::raw::c_char,
dcs_length: usize,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_blacklist_filtering(), but blacklist all hosts of a dc"]
#[doc = ""]
#[doc = " Examples: \"dc1\", \"dc1,dc2\""]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] dcs A comma delimited list of dcs. An empty string will clear the"]
#[doc = " blacklist dcs. The string is copied into the cluster configuration; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
pub fn cass_cluster_set_blacklist_dc_filtering(
cluster: *mut CassCluster,
dcs: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_blacklist_dc_filtering(), but with lengths for"]
#[doc = " string parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] dcs"]
#[doc = " @param[in] dcs_length"]
#[doc = " @return same as cass_cluster_set_blacklist_dc_filtering()"]
#[doc = ""]
#[doc = " @see cass_cluster_set_blacklist_dc_filtering()"]
pub fn cass_cluster_set_blacklist_dc_filtering_n(
cluster: *mut CassCluster,
dcs: *const ::std::os::raw::c_char,
dcs_length: usize,
);
}
extern "C" {
#[doc = " Enable/Disable Nagle's algorithm on connections."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (disables Nagle's algorithm)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
pub fn cass_cluster_set_tcp_nodelay(cluster: *mut CassCluster, enabled: cass_bool_t);
}
extern "C" {
#[doc = " Enable/Disable TCP keep-alive"]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false (disabled)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
#[doc = " @param[in] delay_secs The initial delay in seconds, ignored when"]
#[doc = " `enabled` is false."]
pub fn cass_cluster_set_tcp_keepalive(
cluster: *mut CassCluster,
enabled: cass_bool_t,
delay_secs: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the timestamp generator used to assign timestamps to all requests"]
#[doc = " unless overridden by setting the timestamp on a statement or a batch."]
#[doc = ""]
#[doc = " <b>Default:</b> Monotonically increasing, client-side timestamp generator."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] timestamp_gen"]
#[doc = ""]
#[doc = " @see cass_statement_set_timestamp()"]
#[doc = " @see cass_batch_set_timestamp()"]
pub fn cass_cluster_set_timestamp_gen(
cluster: *mut CassCluster,
timestamp_gen: *mut CassTimestampGen,
);
}
extern "C" {
#[doc = " Sets the amount of time between heartbeat messages and controls the amount"]
#[doc = " of time the connection must be idle before sending heartbeat messages. This"]
#[doc = " is useful for preventing intermediate network devices from dropping"]
#[doc = " connections."]
#[doc = ""]
#[doc = " <b>Default:</b> 30 seconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] interval_secs Use 0 to disable heartbeat messages"]
pub fn cass_cluster_set_connection_heartbeat_interval(
cluster: *mut CassCluster,
interval_secs: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the amount of time a connection is allowed to be without a successful"]
#[doc = " heartbeat response before being terminated and scheduled for reconnection."]
#[doc = ""]
#[doc = " <b>Default:</b> 60 seconds"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] timeout_secs"]
pub fn cass_cluster_set_connection_idle_timeout(
cluster: *mut CassCluster,
timeout_secs: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Sets the retry policy used for all requests unless overridden by setting"]
#[doc = " a retry policy on a statement or a batch."]
#[doc = ""]
#[doc = " <b>Default:</b> The same policy as would be created by the function:"]
#[doc = " cass_retry_policy_default_new(). This policy will retry on a read timeout"]
#[doc = " if there was enough replicas, but no data present, on a write timeout if a"]
#[doc = " logged batch request failed to write the batch log, and on a unavailable"]
#[doc = " error it retries using a new host. In all other cases the default policy"]
#[doc = " will return an error."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] retry_policy"]
#[doc = ""]
#[doc = " @see cass_retry_policy_default_new()"]
#[doc = " @see cass_statement_set_retry_policy()"]
#[doc = " @see cass_batch_set_retry_policy()"]
pub fn cass_cluster_set_retry_policy(
cluster: *mut CassCluster,
retry_policy: *mut CassRetryPolicy,
);
}
extern "C" {
#[doc = " Enable/Disable retrieving and updating schema metadata. If disabled"]
#[doc = " this is allows the driver to skip over retrieving and updating schema"]
#[doc = " metadata and cass_session_get_schema_meta() will always return an empty object."]
#[doc = " This can be useful for reducing the startup overhead of short-lived sessions."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
#[doc = ""]
#[doc = " @see cass_session_get_schema_meta()"]
pub fn cass_cluster_set_use_schema(cluster: *mut CassCluster, enabled: cass_bool_t);
}
extern "C" {
#[doc = " Enable/Disable retrieving hostnames for IP addresses using reverse IP lookup."]
#[doc = ""]
#[doc = " This is useful for authentication (Kerberos) or encryption (SSL) services"]
#[doc = " that require a valid hostname for verification."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false (disabled)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
#[doc = ""]
#[doc = " @see cass_cluster_set_resolve_timeout()"]
pub fn cass_cluster_set_use_hostname_resolution(
cluster: *mut CassCluster,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Enable/Disable the randomization of the contact points list."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true (enabled)."]
#[doc = ""]
#[doc = " <b>Important:</b> This setting should only be disabled for debugging or"]
#[doc = " tests."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_use_randomized_contact_points(
cluster: *mut CassCluster,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Enable constant speculative executions with the supplied settings."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] constant_delay_ms"]
#[doc = " @param[in] max_speculative_executions"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_constant_speculative_execution_policy(
cluster: *mut CassCluster,
constant_delay_ms: cass_int64_t,
max_speculative_executions: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Disable speculative executions"]
#[doc = ""]
#[doc = " <b>Default:</b> This is the default speculative execution policy."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_no_speculative_execution_policy(cluster: *mut CassCluster)
-> CassError;
}
extern "C" {
#[doc = " Sets the maximum number of \"pending write\" objects that will be"]
#[doc = " saved for re-use for marshalling new requests. These objects may"]
#[doc = " hold on to a significant amount of memory and reducing the"]
#[doc = " number of these objects may reduce memory usage of the application."]
#[doc = ""]
#[doc = " The cost of reducing the value of this setting is potentially slower"]
#[doc = " marshalling of requests prior to sending."]
#[doc = ""]
#[doc = " <b>Default:</b> Max unsigned integer value"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] num_objects"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_cluster_set_max_reusable_write_objects(
cluster: *mut CassCluster,
num_objects: ::std::os::raw::c_uint,
) -> CassError;
}
extern "C" {
#[doc = " Associates a named execution profile which can be utilized during execution."]
#[doc = ""]
#[doc = " <b>Note:</b> Once the execution profile is added to a cluster, it is"]
#[doc = " immutable and any changes made to the execution profile must be re-assigned"]
#[doc = " to the cluster before a session connection is established in order for those"]
#[doc = " settings to be utilized during query execution."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] name"]
#[doc = " @param[in] profile"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
#[doc = ""]
#[doc = " @see cass_batch_set_execution_profile()"]
#[doc = " @see cass_statement_set_execution_profile()"]
pub fn cass_cluster_set_execution_profile(
cluster: *mut CassCluster,
name: *const ::std::os::raw::c_char,
profile: *mut CassExecProfile,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_add_execution_profile(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] profile"]
#[doc = " @return same as cass_cluster_set_execution_profile()"]
#[doc = ""]
#[doc = " @see cass_batch_set_execution_profile()"]
#[doc = " @see cass_statement_set_execution_profile()"]
pub fn cass_cluster_set_execution_profile_n(
cluster: *mut CassCluster,
name: *const ::std::os::raw::c_char,
name_length: usize,
profile: *mut CassExecProfile,
) -> CassError;
}
extern "C" {
#[doc = " Prepare statements on all available hosts."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param cluster"]
#[doc = " @param enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_prepare_on_all_hosts(
cluster: *mut CassCluster,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Enable pre-preparing cached prepared statements when existing hosts become"]
#[doc = " available again or when new hosts are added to the cluster."]
#[doc = ""]
#[doc = " This can help mitigate request latency when executing prepared statements"]
#[doc = " by avoiding an extra round trip in cases where the statement is"]
#[doc = " unprepared on a freshly started server. The main tradeoff is extra background"]
#[doc = " network traffic is required to prepare the statements on hosts as they become"]
#[doc = " available."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_true"]
#[doc = ""]
#[doc = " @param cluster"]
#[doc = " @param enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_cluster_set_prepare_on_up_or_add_host(
cluster: *mut CassCluster,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Enable the <b>NO_COMPACT</b> startup option."]
#[doc = ""]
#[doc = " This can help facilitate uninterrupted cluster upgrades where tables using"]
#[doc = " <b>COMPACT_STORAGE</b> will operate in \"compatibility mode\" for"]
#[doc = " <b>BATCH</b>, <b>DELETE</b>, <b>SELECT</b>, and <b>UPDATE</b> CQL operations."]
#[doc = ""]
#[doc = " <b>Default:</b> cass_false"]
#[doc = ""]
#[doc = " @cassandra{3.0.16+}"]
#[doc = " @cassandra{3.11.2+}"]
#[doc = " @cassandra{4.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] enabled"]
pub fn cass_cluster_set_no_compact(
cluster: *mut CassCluster,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a callback for handling host state changes in the cluster."]
#[doc = ""]
#[doc = " <b>Note:</b> The callback is invoked only when state changes in the cluster"]
#[doc = " are applicable to the configured load balancing policy(s)."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] callback"]
#[doc = " @param[in] data"]
#[doc = " @return CASS_OK if successful, otherwise and error occurred"]
pub fn cass_cluster_set_host_listener_callback(
cluster: *mut CassCluster,
callback: CassHostListenerCallback,
data: *mut ::std::os::raw::c_void,
) -> CassError;
}
extern "C" {
#[doc = " Sets the secure connection bundle path for processing DBaaS credentials."]
#[doc = ""]
#[doc = " This will pre-configure a cluster using the credentials format provided by"]
#[doc = " the DBaaS cloud provider."]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] path Absolute path to DBaaS credentials file."]
#[doc = " @return CASS_OK if successful, otherwise error occured."]
pub fn cass_cluster_set_cloud_secure_connection_bundle(
cluster: *mut CassCluster,
path: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_cloud_secure_connection_bundle(), but with lengths"]
#[doc = " for string parameters."]
#[doc = ""]
#[doc = " @see cass_cluster_set_cloud_secure_connection_bundle()"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] path Absolute path to DBaaS credentials file."]
#[doc = " @param[in] path_length Length of path variable."]
#[doc = " @return CASS_OK if successful, otherwise error occured."]
pub fn cass_cluster_set_cloud_secure_connection_bundle_n(
cluster: *mut CassCluster,
path: *const ::std::os::raw::c_char,
path_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_cloud_secure_connection_bundle(), but it does not"]
#[doc = " initialize the underlying SSL library implementation. The SSL library still"]
#[doc = " needs to be initialized, but it's up to the client application to handle"]
#[doc = " initialization. This is similar to the function cass_ssl_new_no_lib_init(),"]
#[doc = " and its documentation should be used as a reference to properly initialize"]
#[doc = " the underlying SSL library."]
#[doc = ""]
#[doc = " @see cass_ssl_new_no_lib_init()"]
#[doc = " @see cass_cluster_set_cloud_secure_connection_bundle()"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] path Absolute path to DBaaS credentials file."]
#[doc = " @return CASS_OK if successful, otherwise error occured."]
pub fn cass_cluster_set_cloud_secure_connection_bundle_no_ssl_lib_init(
cluster: *mut CassCluster,
path: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_cluster_set_cloud_secure_connection_bundle_no_ssl_lib_init(),"]
#[doc = " but with lengths for string parameters."]
#[doc = ""]
#[doc = " @see cass_cluster_set_cloud_secure_connection_bundle_no_ssl_lib_init()"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] path Absolute path to DBaaS credentials file."]
#[doc = " @param[in] path_length Length of path variable."]
#[doc = " @return CASS_OK if successful, otherwise error occured."]
pub fn cass_cluster_set_cloud_secure_connection_bundle_no_ssl_lib_init_n(
cluster: *mut CassCluster,
path: *const ::std::os::raw::c_char,
path_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Set the application name."]
#[doc = ""]
#[doc = " This is optional; however it provides the server with the application name"]
#[doc = " that can aid in debugging issues with larger clusters where there are a lot"]
#[doc = " of client (or application) connections."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] application_name"]
pub fn cass_cluster_set_application_name(
cluster: *mut CassCluster,
application_name: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_application_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] application_name"]
#[doc = " @param[in] application_name_length"]
pub fn cass_cluster_set_application_name_n(
cluster: *mut CassCluster,
application_name: *const ::std::os::raw::c_char,
application_name_length: usize,
);
}
extern "C" {
#[doc = " Set the application version."]
#[doc = ""]
#[doc = " This is optional; however it provides the server with the application"]
#[doc = " version that can aid in debugging issues with large clusters where there are"]
#[doc = " a lot of client (or application) connections that may have different"]
#[doc = " versions in use."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] application_version"]
pub fn cass_cluster_set_application_version(
cluster: *mut CassCluster,
application_version: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_cluster_set_application_version(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] application_version"]
#[doc = " @param[in] application_version_length"]
pub fn cass_cluster_set_application_version_n(
cluster: *mut CassCluster,
application_version: *const ::std::os::raw::c_char,
application_version_length: usize,
);
}
extern "C" {
#[doc = " Set the client id."]
#[doc = ""]
#[doc = " This is optional; however it provides the server with the client ID that can"]
#[doc = " aid in debugging issues with large clusters where there are a lot of client"]
#[doc = " connections."]
#[doc = ""]
#[doc = " Default: UUID v4 generated (@see cass_session_get_client_id())"]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] client_id"]
pub fn cass_cluster_set_client_id(cluster: *mut CassCluster, client_id: CassUuid);
}
extern "C" {
#[doc = " Sets the amount of time between monitor reporting event messages."]
#[doc = ""]
#[doc = " <b>Default:</b> 300 seconds."]
#[doc = ""]
#[doc = " @public @memberof CassCluster"]
#[doc = ""]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] interval_secs Use 0 to disable monitor reporting event messages."]
pub fn cass_cluster_set_monitor_reporting_interval(
cluster: *mut CassCluster,
interval_secs: ::std::os::raw::c_uint,
);
}
extern "C" {
#[doc = " Creates a new session."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @return Returns a session that must be freed."]
#[doc = ""]
#[doc = " @see cass_session_free()"]
pub fn cass_session_new() -> *mut CassSession;
}
extern "C" {
#[doc = " Frees a session instance. If the session is still connected it will be synchronously"]
#[doc = " closed before being deallocated."]
#[doc = ""]
#[doc = " Important: Do not free a session in a future callback. Freeing a session in a future"]
#[doc = " callback will cause a deadlock."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
pub fn cass_session_free(session: *mut CassSession);
}
extern "C" {
#[doc = " Connects a session."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] cluster The cluster configuration is copied into the session and"]
#[doc = " is immutable after connection."]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_session_close()"]
pub fn cass_session_connect(
session: *mut CassSession,
cluster: *const CassCluster,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Connects a session and sets the keyspace."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] cluster The cluster configuration is copied into the session and"]
#[doc = " is immutable after connection."]
#[doc = " @param[in] keyspace"]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_session_close()"]
pub fn cass_session_connect_keyspace(
session: *mut CassSession,
cluster: *const CassCluster,
keyspace: *const ::std::os::raw::c_char,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Same as cass_session_connect_keyspace(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] cluster"]
#[doc = " @param[in] keyspace"]
#[doc = " @param[in] keyspace_length"]
#[doc = " @return same as cass_session_connect_keyspace()"]
#[doc = ""]
#[doc = " @see cass_session_connect_keyspace()"]
pub fn cass_session_connect_keyspace_n(
session: *mut CassSession,
cluster: *const CassCluster,
keyspace: *const ::std::os::raw::c_char,
keyspace_length: usize,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Closes the session instance, outputs a close future which can"]
#[doc = " be used to determine when the session has been terminated. This allows"]
#[doc = " in-flight requests to finish."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @return A future that must be freed."]
pub fn cass_session_close(session: *mut CassSession) -> *mut CassFuture;
}
extern "C" {
#[doc = " Create a prepared statement."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] query The query is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_future_get_prepared()"]
pub fn cass_session_prepare(
session: *mut CassSession,
query: *const ::std::os::raw::c_char,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Same as cass_session_prepare(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] query"]
#[doc = " @param[in] query_length"]
#[doc = " @return same as cass_session_prepare()"]
#[doc = ""]
#[doc = " @see cass_session_prepare()"]
pub fn cass_session_prepare_n(
session: *mut CassSession,
query: *const ::std::os::raw::c_char,
query_length: usize,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Create a prepared statement from an existing statement."]
#[doc = ""]
#[doc = " <b>Note:</b> Bound statements will inherit the keyspace, consistency,"]
#[doc = " serial consistency, request timeout and retry policy of the existing"]
#[doc = " statement."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] statement"]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_future_get_prepared()"]
pub fn cass_session_prepare_from_existing(
session: *mut CassSession,
statement: *mut CassStatement,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Execute a query or bound statement."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] statement"]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_future_get_result()"]
pub fn cass_session_execute(
session: *mut CassSession,
statement: *const CassStatement,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Execute a batch statement."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[in] batch"]
#[doc = " @return A future that must be freed."]
#[doc = ""]
#[doc = " @see cass_future_get_result()"]
pub fn cass_session_execute_batch(
session: *mut CassSession,
batch: *const CassBatch,
) -> *mut CassFuture;
}
extern "C" {
#[doc = " Gets a snapshot of this session's schema metadata. The returned"]
#[doc = " snapshot of the schema metadata is not updated. This function"]
#[doc = " must be called again to retrieve any schema changes since the"]
#[doc = " previous call."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @return A schema instance that must be freed."]
#[doc = ""]
#[doc = " @see cass_schema_meta_free()"]
pub fn cass_session_get_schema_meta(session: *const CassSession) -> *const CassSchemaMeta;
}
extern "C" {
#[doc = " Gets a copy of this session's performance/diagnostic metrics."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[out] output"]
pub fn cass_session_get_metrics(session: *const CassSession, output: *mut CassMetrics);
}
extern "C" {
#[doc = " Gets a copy of this session's speculative execution metrics."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @param[out] output"]
pub fn cass_session_get_speculative_execution_metrics(
session: *const CassSession,
output: *mut CassSpeculativeExecutionMetrics,
);
}
extern "C" {
#[doc = " Get the client id."]
#[doc = ""]
#[doc = " @public @memberof CassSession"]
#[doc = ""]
#[doc = " @param[in] session"]
#[doc = " @return Client id."]
pub fn cass_session_get_client_id(session: *mut CassSession) -> CassUuid;
}
extern "C" {
#[doc = " Frees a schema metadata instance."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
pub fn cass_schema_meta_free(schema_meta: *const CassSchemaMeta);
}
extern "C" {
#[doc = " Gets the version of the schema metadata snapshot."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
#[doc = ""]
#[doc = " @return The snapshot version."]
pub fn cass_schema_meta_snapshot_version(schema_meta: *const CassSchemaMeta) -> cass_uint32_t;
}
extern "C" {
#[doc = " Gets the version of the connected Cassandra cluster."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
#[doc = ""]
#[doc = " @return Cassandra's version"]
pub fn cass_schema_meta_version(schema_meta: *const CassSchemaMeta) -> CassVersion;
}
extern "C" {
#[doc = " Gets the keyspace metadata for the provided keyspace name."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
#[doc = " @param[in] keyspace"]
#[doc = ""]
#[doc = " @return The metadata for a keyspace. NULL if keyspace does not exist."]
pub fn cass_schema_meta_keyspace_by_name(
schema_meta: *const CassSchemaMeta,
keyspace: *const ::std::os::raw::c_char,
) -> *const CassKeyspaceMeta;
}
extern "C" {
#[doc = " Same as cass_schema_meta_keyspace_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
#[doc = " @param[in] keyspace"]
#[doc = " @param[in] keyspace_length"]
#[doc = " @return same as cass_schema_meta_keyspace_by_name()"]
#[doc = ""]
#[doc = " @see cass_schema_meta_keyspace_by_name()"]
pub fn cass_schema_meta_keyspace_by_name_n(
schema_meta: *const CassSchemaMeta,
keyspace: *const ::std::os::raw::c_char,
keyspace_length: usize,
) -> *const CassKeyspaceMeta;
}
extern "C" {
#[doc = " Gets the name of the keyspace."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_keyspace_meta_name(
keyspace_meta: *const CassKeyspaceMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Determine if the keyspace is a virtual keyspace."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return cass_true is the keyspace is virtual, otherwise cass_false"]
pub fn cass_keyspace_meta_is_virtual(keyspace_meta: *const CassKeyspaceMeta) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the table metadata for the provided table name."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] table"]
#[doc = ""]
#[doc = " @return The metadata for a table. NULL if table does not exist."]
pub fn cass_keyspace_meta_table_by_name(
keyspace_meta: *const CassKeyspaceMeta,
table: *const ::std::os::raw::c_char,
) -> *const CassTableMeta;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_table_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] table"]
#[doc = " @param[in] table_length"]
#[doc = " @return same as cass_keyspace_meta_table_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_table_by_name()"]
pub fn cass_keyspace_meta_table_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
table: *const ::std::os::raw::c_char,
table_length: usize,
) -> *const CassTableMeta;
}
extern "C" {
#[doc = " Gets the materialized view metadata for the provided view name."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] view"]
#[doc = ""]
#[doc = " @return The metadata for a view. NULL if view does not exist."]
pub fn cass_keyspace_meta_materialized_view_by_name(
keyspace_meta: *const CassKeyspaceMeta,
view: *const ::std::os::raw::c_char,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_materialized_view_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] view"]
#[doc = " @param[in] view_length"]
#[doc = " @return same as cass_keyspace_meta_materialized_view_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_materialized_view_by_name()"]
pub fn cass_keyspace_meta_materialized_view_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
view: *const ::std::os::raw::c_char,
view_length: usize,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Gets the data type for the provided type name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] type"]
#[doc = ""]
#[doc = " @return The data type for a user defined type. NULL if type does not exist."]
pub fn cass_keyspace_meta_user_type_by_name(
keyspace_meta: *const CassKeyspaceMeta,
type_: *const ::std::os::raw::c_char,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] type"]
#[doc = " @param[in] type_length"]
#[doc = " @return same as cass_keyspace_meta_type_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_type_by_name()"]
pub fn cass_keyspace_meta_user_type_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
type_: *const ::std::os::raw::c_char,
type_length: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the function metadata for the provided function name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] arguments A comma delimited list of CQL types (e.g \"text,int,...\")"]
#[doc = " describing the function's signature."]
#[doc = ""]
#[doc = " @return The data function for a user defined function. NULL if function does not exist."]
pub fn cass_keyspace_meta_function_by_name(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
arguments: *const ::std::os::raw::c_char,
) -> *const CassFunctionMeta;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_function_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] arguments"]
#[doc = " @param[in] arguments_length"]
#[doc = " @return same as cass_keyspace_meta_function_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_function_by_name()"]
pub fn cass_keyspace_meta_function_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
arguments: *const ::std::os::raw::c_char,
arguments_length: usize,
) -> *const CassFunctionMeta;
}
extern "C" {
#[doc = " Gets the aggregate metadata for the provided aggregate name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] arguments A comma delimited list of CQL types (e.g \"text,int,...\")"]
#[doc = " describing the aggregate's signature."]
#[doc = ""]
#[doc = " @return The data aggregate for a user defined aggregate. NULL if aggregate does not exist."]
pub fn cass_keyspace_meta_aggregate_by_name(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
arguments: *const ::std::os::raw::c_char,
) -> *const CassAggregateMeta;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_aggregate_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] arguments"]
#[doc = " @param[in] arguments_length"]
#[doc = " @return same as cass_keyspace_meta_aggregate_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_aggregate_by_name()"]
pub fn cass_keyspace_meta_aggregate_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
arguments: *const ::std::os::raw::c_char,
arguments_length: usize,
) -> *const CassAggregateMeta;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"keyspaces\" metadata table."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_keyspace_meta_field_by_name(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_keyspace_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_keyspace_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_keyspace_meta_field_by_name()"]
pub fn cass_keyspace_meta_field_by_name_n(
keyspace_meta: *const CassKeyspaceMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the name of the table."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_table_meta_name(
table_meta: *const CassTableMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Determine if the table is a virtual table."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return cass_true is the table is virtual, otherwise cass_false"]
pub fn cass_table_meta_is_virtual(table_meta: *const CassTableMeta) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the column metadata for the provided column name."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] column"]
#[doc = ""]
#[doc = " @return The metadata for a column. NULL if column does not exist."]
pub fn cass_table_meta_column_by_name(
table_meta: *const CassTableMeta,
column: *const ::std::os::raw::c_char,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Same as cass_table_meta_column_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] column"]
#[doc = " @param[in] column_length"]
#[doc = " @return same as cass_table_meta_column_by_name()"]
#[doc = ""]
#[doc = " @see cass_table_meta_column_by_name()"]
pub fn cass_table_meta_column_by_name_n(
table_meta: *const CassTableMeta,
column: *const ::std::os::raw::c_char,
column_length: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the total number of columns for the table."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return The total column count."]
pub fn cass_table_meta_column_count(table_meta: *const CassTableMeta) -> usize;
}
extern "C" {
#[doc = " Gets the column metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
pub fn cass_table_meta_column(
table_meta: *const CassTableMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the index metadata for the provided index name."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = ""]
#[doc = " @return The metadata for a index. NULL if index does not exist."]
pub fn cass_table_meta_index_by_name(
table_meta: *const CassTableMeta,
index: *const ::std::os::raw::c_char,
) -> *const CassIndexMeta;
}
extern "C" {
#[doc = " Same as cass_table_meta_index_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @param[in] index_length"]
#[doc = " @return same as cass_table_meta_index_by_name()"]
#[doc = ""]
#[doc = " @see cass_table_meta_index_by_name()"]
pub fn cass_table_meta_index_by_name_n(
table_meta: *const CassTableMeta,
index: *const ::std::os::raw::c_char,
index_length: usize,
) -> *const CassIndexMeta;
}
extern "C" {
#[doc = " Gets the total number of indexes for the table."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return The total index count."]
pub fn cass_table_meta_index_count(table_meta: *const CassTableMeta) -> usize;
}
extern "C" {
#[doc = " Gets the index metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a index. NULL returned if the index is out of range."]
pub fn cass_table_meta_index(
table_meta: *const CassTableMeta,
index: usize,
) -> *const CassIndexMeta;
}
extern "C" {
#[doc = " Gets the materialized view metadata for the provided view name."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] view"]
#[doc = ""]
#[doc = " @return The metadata for a view. NULL if view does not exist."]
pub fn cass_table_meta_materialized_view_by_name(
table_meta: *const CassTableMeta,
view: *const ::std::os::raw::c_char,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Same as cass_table_meta_materialized_view_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] view"]
#[doc = " @param[in] view_length"]
#[doc = " @return same as cass_table_meta_materialized_view_by_name()"]
#[doc = ""]
#[doc = " @see cass_table_meta_materialized_view_by_name()"]
pub fn cass_table_meta_materialized_view_by_name_n(
table_meta: *const CassTableMeta,
view: *const ::std::os::raw::c_char,
view_length: usize,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Gets the total number of views for the table."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return The total view count."]
pub fn cass_table_meta_materialized_view_count(table_meta: *const CassTableMeta) -> usize;
}
extern "C" {
#[doc = " Gets the materialized view metadata for the provided index."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a view. NULL returned if the index is out of range."]
pub fn cass_table_meta_materialized_view(
table_meta: *const CassTableMeta,
index: usize,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Gets the number of columns for the table's partition key."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return The count for the number of columns in the partition key."]
pub fn cass_table_meta_partition_key_count(table_meta: *const CassTableMeta) -> usize;
}
extern "C" {
#[doc = " Gets the partition key column metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
#[doc = ""]
#[doc = " @see cass_table_meta_partition_key_count()"]
pub fn cass_table_meta_partition_key(
table_meta: *const CassTableMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the number of columns for the table's clustering key."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return The count for the number of columns in the clustering key."]
pub fn cass_table_meta_clustering_key_count(table_meta: *const CassTableMeta) -> usize;
}
extern "C" {
#[doc = " Gets the clustering key column metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
#[doc = ""]
#[doc = " @see cass_table_meta_clustering_key_count()"]
pub fn cass_table_meta_clustering_key(
table_meta: *const CassTableMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the clustering order column metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The clustering order for a column."]
#[doc = " CASS_CLUSTERING_ORDER_NONE returned if the index is out of range."]
#[doc = ""]
#[doc = " @see cass_table_meta_clustering_key_count()"]
pub fn cass_table_meta_clustering_key_order(
table_meta: *const CassTableMeta,
index: usize,
) -> CassClusteringOrder;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"tables\" metadata table."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_table_meta_field_by_name(
table_meta: *const CassTableMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_table_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_table_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_table_meta_field_by_name()"]
pub fn cass_table_meta_field_by_name_n(
table_meta: *const CassTableMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the column metadata for the provided column name."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] column"]
#[doc = ""]
#[doc = " @return The metadata for a column. NULL if column does not exist."]
pub fn cass_materialized_view_meta_column_by_name(
view_meta: *const CassMaterializedViewMeta,
column: *const ::std::os::raw::c_char,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Same as cass_materialized_view_meta_column_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] column"]
#[doc = " @param[in] column_length"]
#[doc = " @return same as cass_materialized_view_meta_column_by_name()"]
#[doc = ""]
#[doc = " @see cass_materialized_view_meta_column_by_name()"]
pub fn cass_materialized_view_meta_column_by_name_n(
view_meta: *const CassMaterializedViewMeta,
column: *const ::std::os::raw::c_char,
column_length: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the name of the view."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_materialized_view_meta_name(
view_meta: *const CassMaterializedViewMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the base table of the view."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = ""]
#[doc = " @return The base table for the view."]
pub fn cass_materialized_view_meta_base_table(
view_meta: *const CassMaterializedViewMeta,
) -> *const CassTableMeta;
}
extern "C" {
#[doc = " Gets the total number of columns for the view."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @return The total column count."]
pub fn cass_materialized_view_meta_column_count(
view_meta: *const CassMaterializedViewMeta,
) -> usize;
}
extern "C" {
#[doc = " Gets the column metadata for the provided index."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
pub fn cass_materialized_view_meta_column(
view_meta: *const CassMaterializedViewMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the number of columns for the view's partition key."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @return The count for the number of columns in the partition key."]
pub fn cass_materialized_view_meta_partition_key_count(
view_meta: *const CassMaterializedViewMeta,
) -> usize;
}
extern "C" {
#[doc = " Gets the partition key column metadata for the provided index."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
pub fn cass_materialized_view_meta_partition_key(
view_meta: *const CassMaterializedViewMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the number of columns for the view's clustering key."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @return The count for the number of columns in the clustering key."]
pub fn cass_materialized_view_meta_clustering_key_count(
view_meta: *const CassMaterializedViewMeta,
) -> usize;
}
extern "C" {
#[doc = " Gets the clustering key column metadata for the provided index."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The metadata for a column. NULL returned if the index is out of range."]
pub fn cass_materialized_view_meta_clustering_key(
view_meta: *const CassMaterializedViewMeta,
index: usize,
) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the clustering order column metadata for the provided index."]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The clustering order for a column."]
#[doc = " CASS_CLUSTERING_ORDER_NONE returned if the index is out of range."]
#[doc = ""]
#[doc = " @see cass_materialized_view_meta_clustering_key_count()"]
pub fn cass_materialized_view_meta_clustering_key_order(
view_meta: *const CassMaterializedViewMeta,
index: usize,
) -> CassClusteringOrder;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"views\" metadata view."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_materialized_view_meta_field_by_name(
view_meta: *const CassMaterializedViewMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_materialized_view_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_materialized_view_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_materialized_view_meta_field_by_name()"]
pub fn cass_materialized_view_meta_field_by_name_n(
view_meta: *const CassMaterializedViewMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the name of the column."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_column_meta_name(
column_meta: *const CassColumnMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the type of the column."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @return The column's type."]
pub fn cass_column_meta_type(column_meta: *const CassColumnMeta) -> CassColumnType;
}
extern "C" {
#[doc = " Gets the data type of the column."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @return The column's data type."]
pub fn cass_column_meta_data_type(column_meta: *const CassColumnMeta) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"columns\" metadata table."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_column_meta_field_by_name(
column_meta: *const CassColumnMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_column_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_column_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_column_meta_field_by_name()"]
pub fn cass_column_meta_field_by_name_n(
column_meta: *const CassColumnMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the name of the index."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_index_meta_name(
index_meta: *const CassIndexMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the type of the index."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @return The index's type."]
pub fn cass_index_meta_type(index_meta: *const CassIndexMeta) -> CassIndexType;
}
extern "C" {
#[doc = " Gets the target of the index."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @param[out] target"]
#[doc = " @param[out] target_length"]
pub fn cass_index_meta_target(
index_meta: *const CassIndexMeta,
target: *mut *const ::std::os::raw::c_char,
target_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the options of the index."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @return The index's options."]
pub fn cass_index_meta_options(index_meta: *const CassIndexMeta) -> *const CassValue;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the index data found in the underlying \"indexes\" metadata table."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_index_meta_field_by_name(
index_meta: *const CassIndexMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_index_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_index_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_index_meta_field_by_name()"]
pub fn cass_index_meta_field_by_name_n(
index_meta: *const CassIndexMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the name of the function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_function_meta_name(
function_meta: *const CassFunctionMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the full name of the function. The full name includes the"]
#[doc = " function's name and the function's signature:"]
#[doc = " \"name(type1 type2.. typeN)\"."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[out] full_name"]
#[doc = " @param[out] full_name_length"]
pub fn cass_function_meta_full_name(
function_meta: *const CassFunctionMeta,
full_name: *mut *const ::std::os::raw::c_char,
full_name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the body of the function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[out] body"]
#[doc = " @param[out] body_length"]
pub fn cass_function_meta_body(
function_meta: *const CassFunctionMeta,
body: *mut *const ::std::os::raw::c_char,
body_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the language of the function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[out] language"]
#[doc = " @param[out] language_length"]
pub fn cass_function_meta_language(
function_meta: *const CassFunctionMeta,
language: *mut *const ::std::os::raw::c_char,
language_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets whether a function is called on \"null\"."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @return cass_true if a function is called on null, otherwise cass_false."]
pub fn cass_function_meta_called_on_null_input(
function_meta: *const CassFunctionMeta,
) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the number of arguments this function takes."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @return The number of arguments."]
pub fn cass_function_meta_argument_count(function_meta: *const CassFunctionMeta) -> usize;
}
extern "C" {
#[doc = " Gets the function's argument name and type for the provided index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[in] index"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @param[out] type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_function_meta_argument(
function_meta: *const CassFunctionMeta,
index: usize,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
type_: *mut *const CassDataType,
) -> CassError;
}
extern "C" {
#[doc = " Gets the function's argument and type for the provided name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A data type. NULL if the argument does not exist."]
pub fn cass_function_meta_argument_type_by_name(
function_meta: *const CassFunctionMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Same as cass_function_meta_argument_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_function_meta_argument_type_by_name()"]
#[doc = ""]
#[doc = " @see cass_function_meta_argument_type_by_name()"]
pub fn cass_function_meta_argument_type_by_name_n(
function_meta: *const CassFunctionMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the return type of the function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @return The data type returned by the function."]
pub fn cass_function_meta_return_type(
function_meta: *const CassFunctionMeta,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"functions\" metadata table."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_function_meta_field_by_name(
function_meta: *const CassFunctionMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_function_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_function_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_function_meta_field_by_name()"]
pub fn cass_function_meta_field_by_name_n(
function_meta: *const CassFunctionMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the name of the aggregate."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
pub fn cass_aggregate_meta_name(
aggregate_meta: *const CassAggregateMeta,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the full name of the aggregate. The full name includes the"]
#[doc = " aggregate's name and the aggregate's signature:"]
#[doc = " \"name(type1 type2.. typeN)\"."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @param[out] full_name"]
#[doc = " @param[out] full_name_length"]
pub fn cass_aggregate_meta_full_name(
aggregate_meta: *const CassAggregateMeta,
full_name: *mut *const ::std::os::raw::c_char,
full_name_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the number of arguments this aggregate takes."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The number of arguments."]
pub fn cass_aggregate_meta_argument_count(aggregate_meta: *const CassAggregateMeta) -> usize;
}
extern "C" {
#[doc = " Gets the aggregate's argument type for the provided index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @param[in] index"]
#[doc = " @return The data type for argument. NULL returned if the index is out of range."]
pub fn cass_aggregate_meta_argument_type(
aggregate_meta: *const CassAggregateMeta,
index: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the return type of the aggregate."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The data type returned by the aggregate."]
pub fn cass_aggregate_meta_return_type(
aggregate_meta: *const CassAggregateMeta,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the state type of the aggregate."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The data type of the aggregate's state."]
pub fn cass_aggregate_meta_state_type(
aggregate_meta: *const CassAggregateMeta,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the function metadata for the aggregate's state function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The function metadata for the state function."]
pub fn cass_aggregate_meta_state_func(
aggregate_meta: *const CassAggregateMeta,
) -> *const CassFunctionMeta;
}
extern "C" {
#[doc = " Gets the function metadata for the aggregates's final function."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The function metadata for the final function."]
pub fn cass_aggregate_meta_final_func(
aggregate_meta: *const CassAggregateMeta,
) -> *const CassFunctionMeta;
}
extern "C" {
#[doc = " Gets the initial condition value for the aggregate."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " <b>Note:</b> The value of the initial condition will always be"]
#[doc = " a \"varchar\" type for Cassandra 3.0+."]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return The value of the initial condition."]
pub fn cass_aggregate_meta_init_cond(
aggregate_meta: *const CassAggregateMeta,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets a metadata field for the provided name. Metadata fields allow direct"]
#[doc = " access to the column data found in the underlying \"aggregates\" metadata table."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @param[in] name"]
#[doc = " @return A metadata field value. NULL if the field does not exist."]
pub fn cass_aggregate_meta_field_by_name(
aggregate_meta: *const CassAggregateMeta,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_aggregate_meta_field_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_aggregate_meta_field_by_name()"]
#[doc = ""]
#[doc = " @see cass_aggregate_meta_field_by_name()"]
pub fn cass_aggregate_meta_field_by_name_n(
aggregate_meta: *const CassAggregateMeta,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Creates a new SSL context."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @return Returns a SSL context that must be freed."]
#[doc = ""]
#[doc = " @see cass_ssl_free()"]
pub fn cass_ssl_new() -> *mut CassSsl;
}
extern "C" {
#[doc = " Creates a new SSL context <b>without</b> initializing the underlying library"]
#[doc = " implementation. The integrating application is responsible for"]
#[doc = " initializing the underlying SSL implementation. The driver uses the SSL"]
#[doc = " implmentation from several threads concurrently so it's important that it's"]
#[doc = " properly setup for multithreaded use e.g. lock callbacks for OpenSSL."]
#[doc = ""]
#[doc = " <b>Important:</b> The SSL library must be initialized before calling this"]
#[doc = " function."]
#[doc = ""]
#[doc = " When using OpenSSL the following components need to be initialized:"]
#[doc = ""]
#[doc = " SSL_library_init();"]
#[doc = " SSL_load_error_strings();"]
#[doc = " OpenSSL_add_all_algorithms();"]
#[doc = ""]
#[doc = " The following thread-safety callbacks also need to be set:"]
#[doc = ""]
#[doc = " CRYPTO_set_locking_callback(...);"]
#[doc = " CRYPTO_set_id_callback(...);"]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @return Returns a SSL context that must be freed."]
#[doc = ""]
#[doc = " @see cass_ssl_new()"]
#[doc = " @see cass_ssl_free()"]
pub fn cass_ssl_new_no_lib_init() -> *mut CassSsl;
}
extern "C" {
#[doc = " Frees a SSL context instance."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
pub fn cass_ssl_free(ssl: *mut CassSsl);
}
extern "C" {
#[doc = " Adds a trusted certificate. This is used to verify"]
#[doc = " the peer's certificate."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] cert PEM formatted certificate string"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_ssl_add_trusted_cert(
ssl: *mut CassSsl,
cert: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_ssl_add_trusted_cert(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] cert"]
#[doc = " @param[in] cert_length"]
#[doc = " @return same as cass_ssl_add_trusted_cert()"]
#[doc = ""]
#[doc = " @see cass_ssl_add_trusted_cert()"]
pub fn cass_ssl_add_trusted_cert_n(
ssl: *mut CassSsl,
cert: *const ::std::os::raw::c_char,
cert_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets verification performed on the peer's certificate."]
#[doc = ""]
#[doc = " CASS_SSL_VERIFY_NONE - No verification is performed"]
#[doc = " CASS_SSL_VERIFY_PEER_CERT - Certificate is present and valid"]
#[doc = " CASS_SSL_VERIFY_PEER_IDENTITY - IP address matches the certificate's"]
#[doc = " common name or one of its subject alternative names. This implies the"]
#[doc = " certificate is also present."]
#[doc = " CASS_SSL_VERIFY_PEER_IDENTITY_DNS - Hostname matches the certificate's"]
#[doc = " common name or one of its subject alternative names. This implies the"]
#[doc = " certificate is also present. Hostname resolution must also be enabled."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_SSL_VERIFY_PEER_CERT"]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] flags"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
#[doc = ""]
#[doc = " @see cass_cluster_set_use_hostname_resolution()"]
pub fn cass_ssl_set_verify_flags(ssl: *mut CassSsl, flags: ::std::os::raw::c_int);
}
extern "C" {
#[doc = " Set client-side certificate chain. This is used to authenticate"]
#[doc = " the client on the server-side. This should contain the entire"]
#[doc = " Certificate chain starting with the certificate itself."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] cert PEM formatted certificate string"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_ssl_set_cert(ssl: *mut CassSsl, cert: *const ::std::os::raw::c_char) -> CassError;
}
extern "C" {
#[doc = " Same as cass_ssl_set_cert(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] cert"]
#[doc = " @param[in] cert_length"]
#[doc = " @return same as cass_ssl_set_cert()"]
#[doc = ""]
#[doc = " @see cass_ssl_set_cert()"]
pub fn cass_ssl_set_cert_n(
ssl: *mut CassSsl,
cert: *const ::std::os::raw::c_char,
cert_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Set client-side private key. This is used to authenticate"]
#[doc = " the client on the server-side."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] key PEM formatted key string"]
#[doc = " @param[in] password used to decrypt key"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_ssl_set_private_key(
ssl: *mut CassSsl,
key: *const ::std::os::raw::c_char,
password: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_ssl_set_private_key(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassSsl"]
#[doc = ""]
#[doc = " @param[in] ssl"]
#[doc = " @param[in] key"]
#[doc = " @param[in] key_length"]
#[doc = " @param[in] password"]
#[doc = " @param[in] password_length"]
#[doc = " @return same as cass_ssl_set_private_key()"]
#[doc = ""]
#[doc = " @see cass_ssl_set_private_key()"]
pub fn cass_ssl_set_private_key_n(
ssl: *mut CassSsl,
key: *const ::std::os::raw::c_char,
key_length: usize,
password: *const ::std::os::raw::c_char,
password_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the IP address of the host being authenticated."]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[out] address"]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
pub fn cass_authenticator_address(auth: *const CassAuthenticator, address: *mut CassInet);
}
extern "C" {
#[doc = " Gets the hostname of the host being authenticated."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[out] length"]
#[doc = " @return A null-terminated string."]
pub fn cass_authenticator_hostname(
auth: *const CassAuthenticator,
length: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Gets the class name for the server-side IAuthentication implementation."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[out] length"]
#[doc = " @return A null-terminated string."]
pub fn cass_authenticator_class_name(
auth: *const CassAuthenticator,
length: *mut usize,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Gets the user data created during the authenticator exchange. This"]
#[doc = " is set using cass_authenticator_set_exchange_data()."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @return User specified exchange data previously set by"]
#[doc = " cass_authenticator_set_exchange_data()."]
#[doc = ""]
#[doc = " @see cass_authenticator_set_exchange_data()"]
pub fn cass_authenticator_exchange_data(
auth: *mut CassAuthenticator,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[doc = " Sets the user data to be used during the authenticator exchange."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] exchange_data"]
#[doc = ""]
#[doc = " @see cass_authenticator_exchange_data()"]
pub fn cass_authenticator_set_exchange_data(
auth: *mut CassAuthenticator,
exchange_data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = " Gets a response token buffer of the provided size."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] size"]
#[doc = " @return A buffer to copy the response token."]
pub fn cass_authenticator_response(
auth: *mut CassAuthenticator,
size: usize,
) -> *mut ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Sets the response token."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] response"]
#[doc = " @param[in] response_size"]
pub fn cass_authenticator_set_response(
auth: *mut CassAuthenticator,
response: *const ::std::os::raw::c_char,
response_size: usize,
);
}
extern "C" {
#[doc = " Sets an error for the authenticator exchange."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] message"]
pub fn cass_authenticator_set_error(
auth: *mut CassAuthenticator,
message: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_authenticator_set_error(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassAuthenticator"]
#[doc = ""]
#[doc = " @param[in] auth"]
#[doc = " @param[in] message"]
#[doc = " @param[in] message_length"]
#[doc = ""]
#[doc = " @see cass_authenticator_set_error()"]
pub fn cass_authenticator_set_error_n(
auth: *mut CassAuthenticator,
message: *const ::std::os::raw::c_char,
message_length: usize,
);
}
extern "C" {
#[doc = " Frees a future instance. A future can be freed anytime."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
pub fn cass_future_free(future: *mut CassFuture);
}
extern "C" {
#[doc = " Sets a callback that is called when a future is set"]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @param[in] callback"]
#[doc = " @param[in] data"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred"]
pub fn cass_future_set_callback(
future: *mut CassFuture,
callback: CassFutureCallback,
data: *mut ::std::os::raw::c_void,
) -> CassError;
}
extern "C" {
#[doc = " Gets the set status of the future."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return true if set"]
pub fn cass_future_ready(future: *mut CassFuture) -> cass_bool_t;
}
extern "C" {
#[doc = " Wait for the future to be set with either a result or error."]
#[doc = ""]
#[doc = " <b>Important:</b> Do not wait in a future callback. Waiting in a future"]
#[doc = " callback will cause a deadlock."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
pub fn cass_future_wait(future: *mut CassFuture);
}
extern "C" {
#[doc = " Wait for the future to be set or timeout."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @param[in] timeout_us wait time in microseconds"]
#[doc = " @return false if returned due to timeout"]
pub fn cass_future_wait_timed(
future: *mut CassFuture,
timeout_us: cass_duration_t,
) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the result of a successful future. If the future is not ready this method will"]
#[doc = " wait for the future to be set."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return CassResult instance if successful, otherwise NULL for error. The return instance"]
#[doc = " must be freed using cass_result_free()."]
#[doc = ""]
#[doc = " @see cass_session_execute() and cass_session_execute_batch()"]
pub fn cass_future_get_result(future: *mut CassFuture) -> *const CassResult;
}
extern "C" {
#[doc = " Gets the error result from a future that failed as a result of a server error. If the"]
#[doc = " future is not ready this method will wait for the future to be set."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return CassErrorResult instance if the request failed with a server error,"]
#[doc = " otherwise NULL if the request was successful or the failure was not caused by"]
#[doc = " a server error. The return instance must be freed using cass_error_result_free()."]
#[doc = ""]
#[doc = " @see cass_session_execute() and cass_session_execute_batch()"]
pub fn cass_future_get_error_result(future: *mut CassFuture) -> *const CassErrorResult;
}
extern "C" {
#[doc = " Gets the result of a successful future. If the future is not ready this method will"]
#[doc = " wait for the future to be set. The first successful call consumes the future, all"]
#[doc = " subsequent calls will return NULL."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return CassPrepared instance if successful, otherwise NULL for error. The return instance"]
#[doc = " must be freed using cass_prepared_free()."]
#[doc = ""]
#[doc = " @see cass_session_prepare()"]
pub fn cass_future_get_prepared(future: *mut CassFuture) -> *const CassPrepared;
}
extern "C" {
#[doc = " Gets the error code from future. If the future is not ready this method will"]
#[doc = " wait for the future to be set."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_error_desc()"]
pub fn cass_future_error_code(future: *mut CassFuture) -> CassError;
}
extern "C" {
#[doc = " Gets the error message from future. If the future is not ready this method will"]
#[doc = " wait for the future to be set."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @param[out] message Empty string returned if successful, otherwise"]
#[doc = " a message describing the error is returned."]
#[doc = " @param[out] message_length"]
pub fn cass_future_error_message(
future: *mut CassFuture,
message: *mut *const ::std::os::raw::c_char,
message_length: *mut usize,
);
}
extern "C" {
#[doc = " Gets the tracing ID associated with the request."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @param[out] tracing_id"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_future_tracing_id(future: *mut CassFuture, tracing_id: *mut CassUuid) -> CassError;
}
extern "C" {
#[doc = " Gets a the number of custom payload items from a response future. If the future is not"]
#[doc = " ready this method will wait for the future to be set."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @return the number of custom payload items."]
pub fn cass_future_custom_payload_item_count(future: *mut CassFuture) -> usize;
}
extern "C" {
#[doc = " Gets a custom payload item from a response future at the specified index. If the future is not"]
#[doc = " ready this method will wait for the future to be set."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param[in] future"]
#[doc = " @param[in] index"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @param[out] value"]
#[doc = " @param[out] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_future_custom_payload_item(
future: *mut CassFuture,
index: usize,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
value: *mut *const cass_byte_t,
value_size: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the node that acted as coordinator for this query. If the future is not"]
#[doc = " ready this method will wait for the future to be set."]
#[doc = ""]
#[doc = " @public @memberof CassFuture"]
#[doc = ""]
#[doc = " @param future"]
#[doc = " @return The coordinator node that handled the query. The lifetime of this"]
#[doc = " object is the same as the result object it came from. NULL can be returned"]
#[doc = " if the future is not a response future or if an error occurs before a"]
#[doc = " coordinator responds."]
#[doc = ""]
#[doc = " @see cass_statement_set_node()"]
pub fn cass_future_coordinator(future: *mut CassFuture) -> *const CassNode;
}
extern "C" {
#[doc = " Creates a new query statement."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] query The query is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] parameter_count The number of bound parameters."]
#[doc = " @return Returns a statement that must be freed."]
#[doc = ""]
#[doc = " @see cass_statement_free()"]
pub fn cass_statement_new(
query: *const ::std::os::raw::c_char,
parameter_count: usize,
) -> *mut CassStatement;
}
extern "C" {
#[doc = " Same as cass_statement_new(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] query"]
#[doc = " @param[in] query_length"]
#[doc = " @param[in] parameter_count"]
#[doc = " @return same as cass_statement_new()"]
#[doc = ""]
#[doc = " @see cass_statement_new()"]
pub fn cass_statement_new_n(
query: *const ::std::os::raw::c_char,
query_length: usize,
parameter_count: usize,
) -> *mut CassStatement;
}
extern "C" {
#[doc = " Clear and/or resize the statement's parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] count"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_reset_parameters(
statement: *mut CassStatement,
count: usize,
) -> CassError;
}
extern "C" {
#[doc = " Frees a statement instance. Statements can be immediately freed after"]
#[doc = " being prepared, executed or added to a batch."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
pub fn cass_statement_free(statement: *mut CassStatement);
}
extern "C" {
#[doc = " Adds a key index specifier to this a statement."]
#[doc = " When using token-aware routing, this can be used to tell the driver which"]
#[doc = " parameters within a non-prepared, parameterized statement are part of"]
#[doc = " the partition key."]
#[doc = ""]
#[doc = " Use consecutive calls for composite partition keys."]
#[doc = ""]
#[doc = " This is not necessary for prepared statements, as the key"]
#[doc = " parameters are determined in the metadata processed in the prepare phase."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_add_key_index(statement: *mut CassStatement, index: usize) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's keyspace. This is used for token-aware routing and when"]
#[doc = " using protocol v5 or greater it also overrides the session's current"]
#[doc = " keyspace for the statement."]
#[doc = ""]
#[doc = " This is not necessary and will not work for bound statements, as the keyspace"]
#[doc = " is determined by the prepared statement metadata."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] keyspace"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_keyspace(
statement: *mut CassStatement,
keyspace: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_set_keyspace(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] keyspace"]
#[doc = " @param[in] keyspace_length"]
#[doc = " @return same as cass_statement_set_keyspace()"]
#[doc = ""]
#[doc = " @see cass_statement_set_keyspace()"]
pub fn cass_statement_set_keyspace_n(
statement: *mut CassStatement,
keyspace: *const ::std::os::raw::c_char,
keyspace_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's consistency level."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_CONSISTENCY_LOCAL_ONE"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_consistency(
statement: *mut CassStatement,
consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's serial consistency level."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " <b>Default:</b> Not set"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] serial_consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_serial_consistency(
statement: *mut CassStatement,
serial_consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's page size."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " <b>Default:</b> -1 (Disabled)"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] page_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_paging_size(
statement: *mut CassStatement,
page_size: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's paging state. This can be used to get the next page of"]
#[doc = " data in a multi-page query."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] result"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_paging_state(
statement: *mut CassStatement,
result: *const CassResult,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's paging state. This can be used to get the next page of"]
#[doc = " data in a multi-page query."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " <b>Warning:</b> The paging state should not be exposed to or come from"]
#[doc = " untrusted environments. The paging state could be spoofed and potentially"]
#[doc = " used to gain access to other data."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] paging_state"]
#[doc = " @param[in] paging_state_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_result_paging_state_token()"]
pub fn cass_statement_set_paging_state_token(
statement: *mut CassStatement,
paging_state: *const ::std::os::raw::c_char,
paging_state_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's timestamp."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] timestamp"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_timestamp(
statement: *mut CassStatement,
timestamp: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's timeout for waiting for a response from a node."]
#[doc = ""]
#[doc = " <b>Default:</b> Disabled (use the cluster-level request timeout)"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] timeout_ms Request timeout in milliseconds. Use 0 for no timeout"]
#[doc = " or CASS_UINT64_MAX to disable (to use the cluster-level request timeout)."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_request_timeout()"]
pub fn cass_statement_set_request_timeout(
statement: *mut CassStatement,
timeout_ms: cass_uint64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets whether the statement is idempotent. Idempotent statements are able to be"]
#[doc = " automatically retried after timeouts/errors and can be speculatively executed."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] is_idempotent"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_constant_speculative_execution_policy()"]
#[doc = " @see cass_execution_profile_set_constant_speculative_execution_policy()"]
pub fn cass_statement_set_is_idempotent(
statement: *mut CassStatement,
is_idempotent: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's retry policy."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] retry_policy"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_retry_policy(
statement: *mut CassStatement,
retry_policy: *mut CassRetryPolicy,
) -> CassError;
}
extern "C" {
#[doc = " Sets the statement's custom payload."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] payload"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_custom_payload(
statement: *mut CassStatement,
payload: *const CassCustomPayload,
) -> CassError;
}
extern "C" {
#[doc = " Sets the execution profile to execute the statement with."]
#[doc = ""]
#[doc = " <b>Note:</b> NULL or empty string will clear execution profile from statement"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_execution_profile()"]
pub fn cass_statement_set_execution_profile(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_set_execution_profile(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_statement_set_execution_profile()"]
pub fn cass_statement_set_execution_profile_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets whether the statement should use tracing."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_tracing(
statement: *mut CassStatement,
enabled: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a specific host that should run the query."]
#[doc = ""]
#[doc = " In general, this should not be used, but it can be useful in the following"]
#[doc = " situations:"]
#[doc = " * To query node-local tables such as system and virtual tables."]
#[doc = " * To apply a sequence of schema changes where it makes sense for all the"]
#[doc = " changes to be applied on a single node."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] host"]
#[doc = " @param[in] port"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_host(
statement: *mut CassStatement,
host: *const ::std::os::raw::c_char,
port: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_set_host(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] host"]
#[doc = " @param[in] host_length"]
#[doc = " @param[in] port"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_host_n(
statement: *mut CassStatement,
host: *const ::std::os::raw::c_char,
host_length: usize,
port: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_set_host(), but with the `CassInet` type"]
#[doc = " for the host instead of a string."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] host"]
#[doc = " @param[in] port"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_set_host_inet(
statement: *mut CassStatement,
host: *const CassInet,
port: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_set_host(), but using the `CassNode` type. This can"]
#[doc = " be used to re-query the same coordinator when used with the result of"]
#[doc = " `cass_future_coordinator()`"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param statement"]
#[doc = " @param address"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_future_coordinator()"]
pub fn cass_statement_set_node(
statement: *mut CassStatement,
node: *const CassNode,
) -> CassError;
}
extern "C" {
#[doc = " Binds null to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_null(statement: *mut CassStatement, index: usize) -> CassError;
}
extern "C" {
#[doc = " Binds a null to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_null_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_null_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_statement_bind_null_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_null_by_name()"]
pub fn cass_statement_bind_null_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"tinyint\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int8(
statement: *mut CassStatement,
index: usize,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"tinyint\" to all the values with the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int8_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_int8_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_int8_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_int8_by_name()"]
pub fn cass_statement_bind_int8_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"smallint\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int16(
statement: *mut CassStatement,
index: usize,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"smallint\" to all the values with the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int16_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_int16_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_int16_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_int16_by_name()"]
pub fn cass_statement_bind_int16_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"int\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int32(
statement: *mut CassStatement,
index: usize,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"int\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int32_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_int32_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_int32_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_int32_by_name()"]
pub fn cass_statement_bind_int32_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"date\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_uint32(
statement: *mut CassStatement,
index: usize,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"date\" to all the values with the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_uint32_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_uint32_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_uint32_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_uint32_by_name()"]
pub fn cass_statement_bind_uint32_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"bigint\", \"counter\", \"timestamp\" or \"time\" to a query or"]
#[doc = " bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int64(
statement: *mut CassStatement,
index: usize,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"bigint\", \"counter\", \"timestamp\" or \"time\" to all values"]
#[doc = " with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_int64_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_int64_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_int64_by_name(0"]
#[doc = ""]
#[doc = " @see cass_statement_bind_int64_by_name()"]
pub fn cass_statement_bind_int64_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"float\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_float(
statement: *mut CassStatement,
index: usize,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"float\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_float_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_float_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_float_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_float_by_name()"]
pub fn cass_statement_bind_float_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"double\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_double(
statement: *mut CassStatement,
index: usize,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"double\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_double_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_double_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_double_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_double_by_name()"]
pub fn cass_statement_bind_double_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"boolean\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_bool(
statement: *mut CassStatement,
index: usize,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"boolean\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_bool_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_bool_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_bool_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_bool_by_name()"]
pub fn cass_statement_bind_bool_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"ascii\", \"text\" or \"varchar\" to a query or bound statement"]
#[doc = " at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_string(
statement: *mut CassStatement,
index: usize,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_statement_bind_string()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_string()"]
pub fn cass_statement_bind_string_n(
statement: *mut CassStatement,
index: usize,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"ascii\", \"text\" or \"varchar\" to all the values"]
#[doc = " with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_string_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_string_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_statement_bind_string_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_string_by_name()"]
pub fn cass_statement_bind_string_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"blob\", \"varint\" or \"custom\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_bytes(
statement: *mut CassStatement,
index: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"blob\", \"varint\" or \"custom\" to all the values with the"]
#[doc = " specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_bytes_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_bytes_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_statement_bind_bytes_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_bytes_by_name()"]
pub fn cass_statement_bind_bytes_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"custom\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_custom(
statement: *mut CassStatement,
index: usize,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_custom(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_custom_n(
statement: *mut CassStatement,
index: usize,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"custom\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_custom_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_custom_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_statement_bind_custom_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_custom_by_name()"]
pub fn cass_statement_bind_custom_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"uuid\" or \"timeuuid\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_uuid(
statement: *mut CassStatement,
index: usize,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"uuid\" or \"timeuuid\" to all the values"]
#[doc = " with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_uuid_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_uuid_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_uuid_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_uuid_by_name()"]
pub fn cass_statement_bind_uuid_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"inet\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_inet(
statement: *mut CassStatement,
index: usize,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Binds an \"inet\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_inet_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_inet_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_statement_bind_inet_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_inet_by_name()"]
pub fn cass_statement_bind_inet_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Bind a \"decimal\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] varint The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_decimal(
statement: *mut CassStatement,
index: usize,
varint: *const cass_byte_t,
varint_size: usize,
scale: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"decimal\" to all the values with the specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] varint The value is copied into the statement object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_decimal_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
varint: *const cass_byte_t,
varint_size: usize,
scale: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_decimal_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] varint"]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return same as cass_statement_bind_decimal_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_decimal_by_name()"]
pub fn cass_statement_bind_decimal_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
varint: *const cass_byte_t,
varint_size: usize,
scale: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"duration\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_duration(
statement: *mut CassStatement,
index: usize,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Binds a \"duration\" to all the values with the specified name."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_duration_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_duration_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return same as cass_statement_bind_duration_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_duration_by_name()"]
pub fn cass_statement_bind_duration_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Bind a \"list\", \"map\" or \"set\" to a query or bound statement at the"]
#[doc = " specified index."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] collection The collection can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_collection(
statement: *mut CassStatement,
index: usize,
collection: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Bind a \"list\", \"map\" or \"set\" to all the values with the"]
#[doc = " specified name."]
#[doc = ""]
#[doc = " This can only be used with statements created by"]
#[doc = " cass_prepared_bind() when using Cassandra 2.0 or earlier."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] collection The collection can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_collection_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
collection: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_collection_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] collection"]
#[doc = " @return same as cass_statement_bind_collection_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_collection_by_name()"]
pub fn cass_statement_bind_collection_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
collection: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Bind a \"tuple\" to a query or bound statement at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] tuple The tuple can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_tuple(
statement: *mut CassStatement,
index: usize,
tuple: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Bind a \"tuple\" to all the values with the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] tuple The tuple can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_tuple_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
tuple: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_tuple_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] tuple"]
#[doc = " @return same as cass_statement_bind_tuple_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_tuple_by_name()"]
pub fn cass_statement_bind_tuple_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
tuple: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Bind a user defined type to a query or bound statement at the"]
#[doc = " specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] index"]
#[doc = " @param[in] user_type The user type can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_user_type(
statement: *mut CassStatement,
index: usize,
user_type: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Bind a user defined type to a query or bound statement with the"]
#[doc = " specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] user_type The user type can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_statement_bind_user_type_by_name(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
user_type: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_statement_bind_user_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] statement"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] user_type"]
#[doc = " @return same as cass_statement_bind_user_type_by_name()"]
#[doc = ""]
#[doc = " @see cass_statement_bind_collection_by_name()"]
pub fn cass_statement_bind_user_type_by_name_n(
statement: *mut CassStatement,
name: *const ::std::os::raw::c_char,
name_length: usize,
user_type: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Frees a prepared instance."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
pub fn cass_prepared_free(prepared: *const CassPrepared);
}
extern "C" {
#[doc = " Creates a bound statement from a pre-prepared statement."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
#[doc = " @return Returns a bound statement that must be freed."]
#[doc = ""]
#[doc = " @see cass_statement_free()"]
pub fn cass_prepared_bind(prepared: *const CassPrepared) -> *mut CassStatement;
}
extern "C" {
#[doc = " Gets the name of a parameter at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
#[doc = " @param[in] index"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_prepared_parameter_name(
prepared: *const CassPrepared,
index: usize,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the data type of a parameter at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
#[doc = " @param[in] index"]
#[doc = " @return Returns a reference to the data type of the parameter. Do not free"]
#[doc = " this reference as it is bound to the lifetime of the prepared."]
pub fn cass_prepared_parameter_data_type(
prepared: *const CassPrepared,
index: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the data type of a parameter for the specified name."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
#[doc = " @param[in] name"]
#[doc = " @return Returns a reference to the data type of the parameter. Do not free"]
#[doc = " this reference as it is bound to the lifetime of the prepared."]
pub fn cass_prepared_parameter_data_type_by_name(
prepared: *const CassPrepared,
name: *const ::std::os::raw::c_char,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Same as cass_prepared_parameter_data_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassPrepared"]
#[doc = ""]
#[doc = " @param[in] prepared"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return Returns a reference to the data type of the parameter. Do not free"]
#[doc = " this reference as it is bound to the lifetime of the prepared."]
#[doc = ""]
#[doc = " @see cass_prepared_parameter_data_type_by_name()"]
pub fn cass_prepared_parameter_data_type_by_name_n(
prepared: *const CassPrepared,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Creates a new batch statement with batch type."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] type"]
#[doc = " @return Returns a batch statement that must be freed."]
#[doc = ""]
#[doc = " @see cass_batch_free()"]
pub fn cass_batch_new(type_: CassBatchType) -> *mut CassBatch;
}
extern "C" {
#[doc = " Frees a batch instance. Batches can be immediately freed after being"]
#[doc = " executed."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
pub fn cass_batch_free(batch: *mut CassBatch);
}
extern "C" {
#[doc = " Sets the batch's keyspace. When using protocol v5 or greater it overrides"]
#[doc = " the session's keyspace for the batch."]
#[doc = ""]
#[doc = " <b>Note:</b> If not set explicitly then the batch will inherit the keyspace"]
#[doc = " of the first child statement with a non-empty keyspace."]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] keyspace"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_keyspace(
batch: *mut CassBatch,
keyspace: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_batch_set_keyspace(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] keyspace"]
#[doc = " @param[in] keyspace_length"]
#[doc = " @return same as cass_batch_set_keyspace()"]
#[doc = ""]
#[doc = " @see cass_batch_set_keyspace()"]
pub fn cass_batch_set_keyspace_n(
batch: *mut CassBatch,
keyspace: *const ::std::os::raw::c_char,
keyspace_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's consistency level"]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] consistency The batch's write consistency."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_consistency(
batch: *mut CassBatch,
consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's serial consistency level."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " <b>Default:</b> Not set"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] serial_consistency"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_serial_consistency(
batch: *mut CassBatch,
serial_consistency: CassConsistency,
) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's timestamp."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] timestamp"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_timestamp(batch: *mut CassBatch, timestamp: cass_int64_t) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's timeout for waiting for a response from a node."]
#[doc = ""]
#[doc = " <b>Default:</b> Disabled (use the cluster-level request timeout)"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] timeout_ms Request timeout in milliseconds. Use 0 for no timeout"]
#[doc = " or CASS_UINT64_MAX to disable (to use the cluster-level request timeout)."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_request_timeout()"]
pub fn cass_batch_set_request_timeout(
batch: *mut CassBatch,
timeout_ms: cass_uint64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets whether the statements in a batch are idempotent. Idempotent batches"]
#[doc = " are able to be automatically retried after timeouts/errors and can be"]
#[doc = " speculatively executed."]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] is_idempotent"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_constant_speculative_execution_policy()"]
#[doc = " @see cass_execution_profile_set_constant_speculative_execution_policy()"]
pub fn cass_batch_set_is_idempotent(
batch: *mut CassBatch,
is_idempotent: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's retry policy."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] retry_policy"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_retry_policy(
batch: *mut CassBatch,
retry_policy: *mut CassRetryPolicy,
) -> CassError;
}
extern "C" {
#[doc = " Sets the batch's custom payload."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] payload"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_custom_payload(
batch: *mut CassBatch,
payload: *const CassCustomPayload,
) -> CassError;
}
extern "C" {
#[doc = " Sets whether the batch should use tracing."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassStatement"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] enabled"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_set_tracing(batch: *mut CassBatch, enabled: cass_bool_t) -> CassError;
}
extern "C" {
#[doc = " Adds a statement to a batch."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] statement"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_batch_add_statement(
batch: *mut CassBatch,
statement: *mut CassStatement,
) -> CassError;
}
extern "C" {
#[doc = " Sets the execution profile to execute the batch with."]
#[doc = ""]
#[doc = " <b>Note:</b> NULL or empty string will clear execution profile from batch"]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_cluster_set_execution_profile()"]
pub fn cass_batch_set_execution_profile(
batch: *mut CassBatch,
name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_batch_set_execution_profile(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassBatch"]
#[doc = ""]
#[doc = " @param[in] batch"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
#[doc = ""]
#[doc = " @see cass_batch_set_execution_profile()"]
pub fn cass_batch_set_execution_profile_n(
batch: *mut CassBatch,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new data type with value type."]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] type"]
#[doc = " @return Returns a data type that must be freed."]
#[doc = ""]
#[doc = " @see cass_data_type_free()"]
pub fn cass_data_type_new(type_: CassValueType) -> *mut CassDataType;
}
extern "C" {
#[doc = " Creates a new data type from an existing data type."]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return Returns a data type that must be freed."]
#[doc = ""]
#[doc = " @see cass_data_type_free()"]
pub fn cass_data_type_new_from_existing(data_type: *const CassDataType) -> *mut CassDataType;
}
extern "C" {
#[doc = " Creates a new tuple data type."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] item_count The number of items in the tuple"]
#[doc = " @return Returns a data type that must be freed."]
#[doc = ""]
#[doc = " @see cass_data_type_free()"]
pub fn cass_data_type_new_tuple(item_count: usize) -> *mut CassDataType;
}
extern "C" {
#[doc = " Creates a new UDT (user defined type) data type."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] field_count The number of fields in the UDT"]
#[doc = " @return Returns a data type that must be freed."]
#[doc = ""]
#[doc = " @see cass_data_type_free()"]
pub fn cass_data_type_new_udt(field_count: usize) -> *mut CassDataType;
}
extern "C" {
#[doc = " Frees a data type instance."]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
pub fn cass_data_type_free(data_type: *mut CassDataType);
}
extern "C" {
#[doc = " Gets the value type of the specified data type."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return The value type"]
pub fn cass_data_type_type(data_type: *const CassDataType) -> CassValueType;
}
extern "C" {
#[doc = " Gets whether a data type is frozen."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return cass_true if the data type is frozen, otherwise cass_false."]
pub fn cass_data_type_is_frozen(data_type: *const CassDataType) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the type name of a UDT data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[out] type_name"]
#[doc = " @param[out] type_name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_type_name(
data_type: *const CassDataType,
type_name: *mut *const ::std::os::raw::c_char,
type_name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the type name of a UDT data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] type_name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_set_type_name(
data_type: *mut CassDataType,
type_name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_data_type_set_type_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] type_name"]
#[doc = " @param[in] type_name_length"]
#[doc = " @return Returns a data type that must be freed."]
pub fn cass_data_type_set_type_name_n(
data_type: *mut CassDataType,
type_name: *const ::std::os::raw::c_char,
type_name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the type name of a UDT data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[out] keyspace"]
#[doc = " @param[out] keyspace_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_keyspace(
data_type: *const CassDataType,
keyspace: *mut *const ::std::os::raw::c_char,
keyspace_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the keyspace of a UDT data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] keyspace"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_set_keyspace(
data_type: *mut CassDataType,
keyspace: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_data_type_set_keyspace(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] keyspace"]
#[doc = " @param[in] keyspace_length"]
#[doc = " @return Returns a data type that must be freed."]
pub fn cass_data_type_set_keyspace_n(
data_type: *mut CassDataType,
keyspace: *const ::std::os::raw::c_char,
keyspace_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the class name of a custom data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for custom data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[out] class_name"]
#[doc = " @param[out] class_name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_class_name(
data_type: *const CassDataType,
class_name: *mut *const ::std::os::raw::c_char,
class_name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets the class name of a custom data type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for custom data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] class_name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_set_class_name(
data_type: *mut CassDataType,
class_name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_data_type_set_class_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @return Returns a data type that must be freed."]
pub fn cass_data_type_set_class_name_n(
data_type: *mut CassDataType,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the sub-data type count of a UDT (user defined type), tuple"]
#[doc = " or collection."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT, tuple and collection data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return Returns the number of sub-data types"]
pub fn cass_data_type_sub_type_count(data_type: *const CassDataType) -> usize;
}
extern "C" {
pub fn cass_data_sub_type_count(data_type: *const CassDataType) -> usize;
}
extern "C" {
#[doc = " Gets the sub-data type of a UDT (user defined type), tuple or collection at"]
#[doc = " the specified index."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT, tuple and collection data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] index"]
#[doc = " @return Returns a reference to a child data type. Do not free this"]
#[doc = " reference as it is bound to the lifetime of the parent data type. NULL"]
#[doc = " is returned if the index is out of range."]
pub fn cass_data_type_sub_data_type(
data_type: *const CassDataType,
index: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the sub-data type of a UDT (user defined type) at the specified index."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @return Returns a reference to a child data type. Do not free this"]
#[doc = " reference as it is bound to the lifetime of the parent data type. NULL"]
#[doc = " is returned if the name doesn't exist."]
pub fn cass_data_type_sub_data_type_by_name(
data_type: *const CassDataType,
name: *const ::std::os::raw::c_char,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Same as cass_data_type_sub_data_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassDataType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return Returns a reference to a child data type. Do not free this"]
#[doc = " reference as it is bound to the lifetime of the parent data type. NULL"]
#[doc = " is returned if the name doesn't exist."]
pub fn cass_data_type_sub_data_type_by_name_n(
data_type: *const CassDataType,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the sub-type name of a UDT (user defined type) at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] index"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_sub_type_name(
data_type: *const CassDataType,
index: usize,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Adds a sub-data type to a tuple or collection."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for tuple and collection data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] sub_data_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_type(
data_type: *mut CassDataType,
sub_data_type: *const CassDataType,
) -> CassError;
}
extern "C" {
#[doc = " Adds a sub-data type to a UDT (user defined type)."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] sub_data_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_type_by_name(
data_type: *mut CassDataType,
name: *const ::std::os::raw::c_char,
sub_data_type: *const CassDataType,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_data_type_add_sub_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] sub_data_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_type_by_name_n(
data_type: *mut CassDataType,
name: *const ::std::os::raw::c_char,
name_length: usize,
sub_data_type: *const CassDataType,
) -> CassError;
}
extern "C" {
#[doc = " Adds a sub-data type to a tuple or collection using a value type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for tuple and collection data types."]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] sub_value_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_value_type(
data_type: *mut CassDataType,
sub_value_type: CassValueType,
) -> CassError;
}
extern "C" {
#[doc = " Adds a sub-data type to a UDT (user defined type) using a value type."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] sub_value_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_value_type_by_name(
data_type: *mut CassDataType,
name: *const ::std::os::raw::c_char,
sub_value_type: CassValueType,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_data_type_add_sub_value_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " <b>Note:</b> Only valid for UDT data types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] sub_value_type"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_data_type_add_sub_value_type_by_name_n(
data_type: *mut CassDataType,
name: *const ::std::os::raw::c_char,
name_length: usize,
sub_value_type: CassValueType,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] type"]
#[doc = " @param[in] item_count The approximate number of items in the collection."]
#[doc = " @return Returns a collection that must be freed."]
#[doc = ""]
#[doc = " @see cass_collection_free()"]
pub fn cass_collection_new(type_: CassCollectionType, item_count: usize)
-> *mut CassCollection;
}
extern "C" {
#[doc = " Creates a new collection from an existing data type."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @param[in] item_count The approximate number of items in the collection."]
#[doc = " @return Returns a collection that must be freed."]
#[doc = ""]
#[doc = " @see cass_collection_free();"]
pub fn cass_collection_new_from_data_type(
data_type: *const CassDataType,
item_count: usize,
) -> *mut CassCollection;
}
extern "C" {
#[doc = " Frees a collection instance."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
pub fn cass_collection_free(collection: *mut CassCollection);
}
extern "C" {
#[doc = " Gets the data type of a collection."]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @return Returns a reference to the data type of the collection. Do not free"]
#[doc = " this reference as it is bound to the lifetime of the collection."]
pub fn cass_collection_data_type(collection: *const CassCollection) -> *const CassDataType;
}
extern "C" {
#[doc = " Appends a \"tinyint\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_int8(
collection: *mut CassCollection,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends an \"smallint\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_int16(
collection: *mut CassCollection,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends an \"int\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_int32(
collection: *mut CassCollection,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"date\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_uint32(
collection: *mut CassCollection,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"bigint\", \"counter\", \"timestamp\" or \"time\" to the"]
#[doc = " collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_int64(
collection: *mut CassCollection,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"float\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_float(
collection: *mut CassCollection,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"double\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_double(
collection: *mut CassCollection,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"boolean\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_bool(
collection: *mut CassCollection,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends an \"ascii\", \"text\" or \"varchar\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value The value is copied into the collection object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_string(
collection: *mut CassCollection,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_collection_append_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_collection_append_string()"]
#[doc = ""]
#[doc = " @see cass_collection_append_string();"]
pub fn cass_collection_append_string_n(
collection: *mut CassCollection,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"blob\", \"varint\" or \"custom\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value The value is copied into the collection object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_bytes(
collection: *mut CassCollection,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"custom\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value The value is copied into the collection object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_custom(
collection: *mut CassCollection,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_collection_append_custom(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_collection_append_custom()"]
#[doc = ""]
#[doc = " @see cass_collection_append_custom()"]
pub fn cass_collection_append_custom_n(
collection: *mut CassCollection,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"uuid\" or \"timeuuid\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_uuid(
collection: *mut CassCollection,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Appends an \"inet\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_inet(
collection: *mut CassCollection,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"decimal\" to the collection."]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] varint The value is copied into the collection object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_decimal(
collection: *mut CassCollection,
varint: *const cass_byte_t,
varint_size: usize,
scale: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"duration\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_duration(
collection: *mut CassCollection,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"list\", \"map\" or \"set\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_collection(
collection: *mut CassCollection,
value: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"tuple\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_tuple(
collection: *mut CassCollection,
value: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Appends a \"udt\" to the collection."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassCollection"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_collection_append_user_type(
collection: *mut CassCollection,
value: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new tuple."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] item_count The number of items in the tuple."]
#[doc = " @return Returns a tuple that must be freed."]
#[doc = ""]
#[doc = " @see cass_tuple_free()"]
pub fn cass_tuple_new(item_count: usize) -> *mut CassTuple;
}
extern "C" {
#[doc = " Creates a new tuple from an existing data type."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return Returns a tuple that must be freed."]
#[doc = ""]
#[doc = " @see cass_tuple_free();"]
pub fn cass_tuple_new_from_data_type(data_type: *const CassDataType) -> *mut CassTuple;
}
extern "C" {
#[doc = " Frees a tuple instance."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
pub fn cass_tuple_free(tuple: *mut CassTuple);
}
extern "C" {
#[doc = " Gets the data type of a tuple."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @return Returns a reference to the data type of the tuple. Do not free"]
#[doc = " this reference as it is bound to the lifetime of the tuple."]
pub fn cass_tuple_data_type(tuple: *const CassTuple) -> *const CassDataType;
}
extern "C" {
#[doc = " Sets an null in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_null(tuple: *mut CassTuple, index: usize) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tinyint\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_int8(
tuple: *mut CassTuple,
index: usize,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"smallint\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_int16(
tuple: *mut CassTuple,
index: usize,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"int\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_int32(
tuple: *mut CassTuple,
index: usize,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"date\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_uint32(
tuple: *mut CassTuple,
index: usize,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"bigint\", \"counter\", \"timestamp\" or \"time\" in a tuple at the"]
#[doc = " specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_int64(
tuple: *mut CassTuple,
index: usize,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"float\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_float(
tuple: *mut CassTuple,
index: usize,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"double\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_double(
tuple: *mut CassTuple,
index: usize,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"boolean\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_bool(
tuple: *mut CassTuple,
index: usize,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"ascii\", \"text\" or \"varchar\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value The value is copied into the tuple object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_string(
tuple: *mut CassTuple,
index: usize,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_tuple_set_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_tuple_set_string()"]
#[doc = ""]
#[doc = " @see cass_tuple_set_string();"]
pub fn cass_tuple_set_string_n(
tuple: *mut CassTuple,
index: usize,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"blob\", \"varint\" or \"custom\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value The value is copied into the tuple object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_bytes(
tuple: *mut CassTuple,
index: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"custom\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value The value is copied into the tuple object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_custom(
tuple: *mut CassTuple,
index: usize,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_tuple_set_custom(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_tuple_set_custom()"]
#[doc = ""]
#[doc = " @see cass_tuple_set_custom()"]
pub fn cass_tuple_set_custom_n(
tuple: *mut CassTuple,
index: usize,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"uuid\" or \"timeuuid\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_uuid(tuple: *mut CassTuple, index: usize, value: CassUuid) -> CassError;
}
extern "C" {
#[doc = " Sets an \"inet\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_inet(tuple: *mut CassTuple, index: usize, value: CassInet) -> CassError;
}
extern "C" {
#[doc = " Sets a \"decimal\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] varint The value is copied into the tuple object; the"]
#[doc = " memory pointed to by this parameter can be freed after this call."]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_decimal(
tuple: *mut CassTuple,
index: usize,
varint: *const cass_byte_t,
varint_size: usize,
scale: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"duration\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_duration(
tuple: *mut CassTuple,
index: usize,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"list\", \"map\" or \"set\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_collection(
tuple: *mut CassTuple,
index: usize,
value: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tuple\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_tuple(
tuple: *mut CassTuple,
index: usize,
value: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"udt\" in a tuple at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTuple"]
#[doc = ""]
#[doc = " @param[in] tuple"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_tuple_set_user_type(
tuple: *mut CassTuple,
index: usize,
value: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new user defined type from existing data type;"]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] data_type"]
#[doc = " @return Returns a user defined type that must be freed. NULL is returned if"]
#[doc = " the data type is not a user defined type."]
#[doc = ""]
#[doc = " @see cass_user_type_free()"]
pub fn cass_user_type_new_from_data_type(data_type: *const CassDataType) -> *mut CassUserType;
}
extern "C" {
#[doc = " Frees a user defined type instance."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
pub fn cass_user_type_free(user_type: *mut CassUserType);
}
extern "C" {
#[doc = " Gets the data type of a user defined type."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @return Returns a reference to the data type of the user defined type."]
#[doc = " Do not free this reference as it is bound to the lifetime of the"]
#[doc = " user defined type."]
pub fn cass_user_type_data_type(user_type: *const CassUserType) -> *const CassDataType;
}
extern "C" {
#[doc = " Sets a null in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_null(user_type: *mut CassUserType, index: usize) -> CassError;
}
extern "C" {
#[doc = " Sets a null in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_null_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_null_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_user_type_set_null_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_null_by_name()"]
pub fn cass_user_type_set_null_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tinyint\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int8(
user_type: *mut CassUserType,
index: usize,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tinyint\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int8_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_int8_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_int8_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_int8_by_name()"]
pub fn cass_user_type_set_int8_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int8_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"smallint\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int16(
user_type: *mut CassUserType,
index: usize,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"smallint\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int16_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_int16_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_int16_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_int16_by_name()"]
pub fn cass_user_type_set_int16_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int16_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"int\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int32(
user_type: *mut CassUserType,
index: usize,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"int\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int32_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_int32_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_int32_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_int32_by_name()"]
pub fn cass_user_type_set_int32_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"date\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_uint32(
user_type: *mut CassUserType,
index: usize,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"date\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_uint32_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_uint32_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_uint32_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_uint32_by_name()"]
pub fn cass_user_type_set_uint32_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_uint32_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"bigint\", \"counter\", \"timestamp\" or \"time\" in a"]
#[doc = " user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int64(
user_type: *mut CassUserType,
index: usize,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"bigint\", \"counter\", \"timestamp\" or \"time\" in a"]
#[doc = " user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_int64_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_int64_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_int64_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_int64_by_name()"]
pub fn cass_user_type_set_int64_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"float\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_float(
user_type: *mut CassUserType,
index: usize,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"float\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_float_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_float_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_float_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_float_by_name()"]
pub fn cass_user_type_set_float_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_float_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"double\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_double(
user_type: *mut CassUserType,
index: usize,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"double\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_double_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_double_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_double_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_double_by_name()"]
pub fn cass_user_type_set_double_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_double_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"boolean\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_bool(
user_type: *mut CassUserType,
index: usize,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"boolean\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_bool_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_double_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_double_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_double_by_name()"]
pub fn cass_user_type_set_bool_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: cass_bool_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"ascii\", \"text\" or \"varchar\" in a user defined type at the"]
#[doc = " specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_string(
user_type: *mut CassUserType,
index: usize,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_user_type_set_string()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_string()"]
pub fn cass_user_type_set_string_n(
user_type: *mut CassUserType,
index: usize,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"ascii\", \"text\" or \"varchar\" in a user defined type at the"]
#[doc = " specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_string_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: *const ::std::os::raw::c_char,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_string_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_length"]
#[doc = " @return same as cass_user_type_set_string_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_string_by_name()"]
pub fn cass_user_type_set_string_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const ::std::os::raw::c_char,
value_length: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"blob\" \"varint\" or \"custom\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_bytes(
user_type: *mut CassUserType,
index: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"blob\", \"varint\" or \"custom\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_bytes_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_bytes_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_user_type_set_bytes_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_bytes_by_name()"]
pub fn cass_user_type_set_bytes_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"custom\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_custom(
user_type: *mut CassUserType,
index: usize,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_custom(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_user_type_set_custom()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_custom()"]
pub fn cass_user_type_set_custom_n(
user_type: *mut CassUserType,
index: usize,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"custom\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_custom_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
class_name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_custom_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] class_name"]
#[doc = " @param[in] class_name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
#[doc = " @return same as cass_user_type_set_custom_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_custom_by_name()"]
pub fn cass_user_type_set_custom_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
class_name: *const ::std::os::raw::c_char,
class_name_length: usize,
value: *const cass_byte_t,
value_size: usize,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"uuid\" or \"timeuuid\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_uuid(
user_type: *mut CassUserType,
index: usize,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"uuid\" or \"timeuuid\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_uuid_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_uuid_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_uuid_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_uuid_by_name()"]
pub fn cass_user_type_set_uuid_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"inet\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_inet(
user_type: *mut CassUserType,
index: usize,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"inet\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_inet_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_inet_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_inet_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_inet_by_name()"]
pub fn cass_user_type_set_inet_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Sets an \"decimal\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] varint"]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_decimal(
user_type: *mut CassUserType,
index: usize,
varint: *const cass_byte_t,
varint_size: usize,
scale: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Sets \"decimal\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] varint"]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_decimal_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
varint: *const cass_byte_t,
varint_size: usize,
scale: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_decimal_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] varint"]
#[doc = " @param[in] varint_size"]
#[doc = " @param[in] scale"]
#[doc = " @return same as cass_user_type_set_decimal_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_decimal_by_name()"]
pub fn cass_user_type_set_decimal_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
varint: *const cass_byte_t,
varint_size: usize,
scale: ::std::os::raw::c_int,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"duration\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_duration(
user_type: *mut CassUserType,
index: usize,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets \"duration\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_duration_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_duration_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] months"]
#[doc = " @param[in] days"]
#[doc = " @param[in] nanos"]
#[doc = " @return same as cass_user_type_set_duration_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_duration_by_name()"]
pub fn cass_user_type_set_duration_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
months: cass_int32_t,
days: cass_int32_t,
nanos: cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"list\", \"map\" or \"set\" in a user defined type at the"]
#[doc = " specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_collection(
user_type: *mut CassUserType,
index: usize,
value: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"list\", \"map\" or \"set\" in a user defined type at the"]
#[doc = " specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_collection_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_collection_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_collection_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_collection_by_name()"]
pub fn cass_user_type_set_collection_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const CassCollection,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tuple\" in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_tuple(
user_type: *mut CassUserType,
index: usize,
value: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Sets a \"tuple\" in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_tuple_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_tuple_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_tuple_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_tuple_by_name()"]
pub fn cass_user_type_set_tuple_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const CassTuple,
) -> CassError;
}
extern "C" {
#[doc = " Sets a user defined type in a user defined type at the specified index."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] index"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_user_type(
user_type: *mut CassUserType,
index: usize,
value: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Sets a user defined type in a user defined type at the specified name."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @return CASS_OK if successful, otherwise an error occurred."]
pub fn cass_user_type_set_user_type_by_name(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
value: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_user_type_set_user_type_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassUserType"]
#[doc = ""]
#[doc = " @param[in] user_type"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @return same as cass_user_type_set_user_type_by_name()"]
#[doc = ""]
#[doc = " @see cass_user_type_set_user_type_by_name()"]
pub fn cass_user_type_set_user_type_by_name_n(
user_type: *mut CassUserType,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const CassUserType,
) -> CassError;
}
extern "C" {
#[doc = " Frees a result instance."]
#[doc = ""]
#[doc = " This method invalidates all values, rows, and"]
#[doc = " iterators that were derived from this result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
pub fn cass_result_free(result: *const CassResult);
}
extern "C" {
#[doc = " Gets the number of rows for the specified result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @return The number of rows in the result."]
pub fn cass_result_row_count(result: *const CassResult) -> usize;
}
extern "C" {
#[doc = " Gets the number of columns per row for the specified result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @return The number of columns per row in the result."]
pub fn cass_result_column_count(result: *const CassResult) -> usize;
}
extern "C" {
#[doc = " Gets the column name at index for the specified result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @param[in] index"]
#[doc = " @param[out] name The column name at the specified index."]
#[doc = " @param[out] name_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_result_column_name(
result: *const CassResult,
index: usize,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the column type at index for the specified result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @param[in] index"]
#[doc = " @return The column type at the specified index. CASS_VALUE_TYPE_UNKNOWN"]
#[doc = " is returned if the index is out of bounds."]
pub fn cass_result_column_type(result: *const CassResult, index: usize) -> CassValueType;
}
extern "C" {
#[doc = " Gets the column data type at index for the specified result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @param[in] index"]
#[doc = " @return The column type at the specified index. NULL is returned if the"]
#[doc = " index is out of bounds."]
pub fn cass_result_column_data_type(
result: *const CassResult,
index: usize,
) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the first row of the result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @return The first row of the result. NULL if there are no rows."]
pub fn cass_result_first_row(result: *const CassResult) -> *const CassRow;
}
extern "C" {
#[doc = " Returns true if there are more pages."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @return cass_true if there are more pages"]
pub fn cass_result_has_more_pages(result: *const CassResult) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the raw paging state from the result. The paging state is bound to the"]
#[doc = " lifetime of the result object. If paging state needs to live beyond the"]
#[doc = " lifetime of the result object it must be copied."]
#[doc = ""]
#[doc = " <b>Warning:</b> The paging state should not be exposed to or come from"]
#[doc = " untrusted environments. The paging state could be spoofed and potentially"]
#[doc = " used to gain access to other data."]
#[doc = ""]
#[doc = " @cassandra{2.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @param[out] paging_state"]
#[doc = " @param[out] paging_state_size"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
#[doc = ""]
#[doc = " @see cass_statement_set_paging_state_token()"]
pub fn cass_result_paging_state_token(
result: *const CassResult,
paging_state: *mut *const ::std::os::raw::c_char,
paging_state_size: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Frees an error result instance."]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
pub fn cass_error_result_free(error_result: *const CassErrorResult);
}
extern "C" {
#[doc = " Gets error code for the error result. This error code will always"]
#[doc = " have an server error source."]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The server error code"]
pub fn cass_error_result_code(error_result: *const CassErrorResult) -> CassError;
}
extern "C" {
#[doc = " Gets consistency that triggered the error result of the"]
#[doc = " following types:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_UNAVAILABLE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The consistency that triggered the error for a read timeout,"]
#[doc = " write timeout or an unavailable error result. Undefined for other"]
#[doc = " error result types."]
pub fn cass_error_result_consistency(error_result: *const CassErrorResult) -> CassConsistency;
}
extern "C" {
#[doc = " Gets the actual number of received responses, received acknowledgments"]
#[doc = " or alive nodes for following error result types, respectively:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_UNAVAILABLE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The actual received responses for a read timeout, actual received"]
#[doc = " acknowledgments for a write timeout or actual alive nodes for a unavailable"]
#[doc = " error. Undefined for other error result types."]
pub fn cass_error_result_responses_received(
error_result: *const CassErrorResult,
) -> cass_int32_t;
}
extern "C" {
#[doc = " Gets required responses, required acknowledgments or required alive nodes"]
#[doc = " needed to successfully complete the request for following error result types,"]
#[doc = " respectively:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_UNAVAILABLE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The required responses for a read time, required acknowledgments"]
#[doc = " for a write timeout or required alive nodes for an unavailable error result."]
#[doc = " Undefined for other error result types."]
pub fn cass_error_result_responses_required(
error_result: *const CassErrorResult,
) -> cass_int32_t;
}
extern "C" {
#[doc = " Gets the number of nodes that experienced failures for the following error types:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_FAILURE</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_FAILURE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The number of nodes that failed during a read or write request."]
pub fn cass_error_result_num_failures(error_result: *const CassErrorResult) -> cass_int32_t;
}
extern "C" {
#[doc = " Determines whether the actual data was present in the responses from the"]
#[doc = " replicas for the following error result types:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_READ_FAILURE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return cass_true if the data was present in the received responses when the"]
#[doc = " read timeout occurred. Undefined for other error result types."]
pub fn cass_error_result_data_present(error_result: *const CassErrorResult) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the write type of a request for the following error result types:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_TIMEOUT</li>"]
#[doc = " <li>CASS_ERROR_SERVER_WRITE_FAILURE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The type of the write that timed out. Undefined for"]
#[doc = " other error result types."]
pub fn cass_error_result_write_type(error_result: *const CassErrorResult) -> CassWriteType;
}
extern "C" {
#[doc = " Gets the affected keyspace for the following error result types:"]
#[doc = ""]
#[doc = " <ul>"]
#[doc = " <li>CASS_ERROR_SERVER_ALREADY_EXISTS</li>"]
#[doc = " <li>CASS_ERROR_SERVER_FUNCTION_FAILURE</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @param[out] keyspace"]
#[doc = " @param[out] keyspace_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_error_result_keyspace(
error_result: *const CassErrorResult,
keyspace: *mut *const ::std::os::raw::c_char,
keyspace_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the affected table for the already exists error"]
#[doc = " (CASS_ERROR_SERVER_ALREADY_EXISTS) result type."]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @param[out] table"]
#[doc = " @param[out] table_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_error_result_table(
error_result: *const CassErrorResult,
table: *mut *const ::std::os::raw::c_char,
table_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the affected function for the function failure error"]
#[doc = " (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @param[out] function"]
#[doc = " @param[out] function_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_error_result_function(
error_result: *const CassErrorResult,
function: *mut *const ::std::os::raw::c_char,
function_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the number of argument types for the function failure error"]
#[doc = " (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @return The number of arguments for the affected function."]
pub fn cass_error_num_arg_types(error_result: *const CassErrorResult) -> usize;
}
extern "C" {
#[doc = " Gets the argument type at the specified index for the function failure"]
#[doc = " error (CASS_ERROR_SERVER_FUNCTION_FAILURE) result type."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassErrorResult"]
#[doc = ""]
#[doc = " @param[in] error_result"]
#[doc = " @param[in] index"]
#[doc = " @param[out] arg_type"]
#[doc = " @param[out] arg_type_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_error_result_arg_type(
error_result: *const CassErrorResult,
index: usize,
arg_type: *mut *const ::std::os::raw::c_char,
arg_type_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Frees an iterator instance."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
pub fn cass_iterator_free(iterator: *mut CassIterator);
}
extern "C" {
#[doc = " Gets the type of the specified iterator."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return The type of the iterator."]
pub fn cass_iterator_type(iterator: *mut CassIterator) -> CassIteratorType;
}
extern "C" {
#[doc = " Creates a new iterator for the specified result. This can be"]
#[doc = " used to iterate over rows in the result."]
#[doc = ""]
#[doc = " @public @memberof CassResult"]
#[doc = ""]
#[doc = " @param[in] result"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_from_result(result: *const CassResult) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified row. This can be"]
#[doc = " used to iterate over columns in a row."]
#[doc = ""]
#[doc = " @public @memberof CassRow"]
#[doc = ""]
#[doc = " @param[in] row"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_from_row(row: *const CassRow) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified collection. This can be"]
#[doc = " used to iterate over values in a collection."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return A new iterator that must be freed. NULL returned if the"]
#[doc = " value is not a collection."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_from_collection(value: *const CassValue) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified map. This can be"]
#[doc = " used to iterate over key/value pairs in a map."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return A new iterator that must be freed. NULL returned if the"]
#[doc = " value is not a map."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_from_map(value: *const CassValue) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified tuple. This can be"]
#[doc = " used to iterate over values in a tuple."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return A new iterator that must be freed. NULL returned if the"]
#[doc = " value is not a tuple."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_from_tuple(value: *const CassValue) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified user defined type. This can be"]
#[doc = " used to iterate over fields in a user defined type."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return A new iterator that must be freed. NULL returned if the"]
#[doc = " value is not a user defined type."]
#[doc = ""]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_user_type(value: *const CassValue) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified schema metadata."]
#[doc = " This can be used to iterate over keyspace."]
#[doc = ""]
#[doc = " @public @memberof CassSchemaMeta"]
#[doc = ""]
#[doc = " @param[in] schema_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_keyspace_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_keyspaces_from_schema_meta(
schema_meta: *const CassSchemaMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified keyspace metadata."]
#[doc = " This can be used to iterate over tables."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_table_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_tables_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified keyspace metadata."]
#[doc = " This can be used to iterate over views."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_materialized_view_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_materialized_views_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified keyspace metadata."]
#[doc = " This can be used to iterate over types."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_user_type()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_user_types_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified keyspace metadata."]
#[doc = " This can be used to iterate over functions."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_function_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_functions_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified keyspace metadata."]
#[doc = " This can be used to iterate over aggregates."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_aggregate_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_aggregates_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified keyspace metadata. Metadata"]
#[doc = " fields allow direct access to the column data found in the underlying"]
#[doc = " \"keyspaces\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @public @memberof CassKeyspaceMeta"]
#[doc = ""]
#[doc = " @param[in] keyspace_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field_name()"]
#[doc = " @see cass_iterator_get_meta_field_value()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_keyspace_meta(
keyspace_meta: *const CassKeyspaceMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified table metadata."]
#[doc = " This can be used to iterate over columns."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_column_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_columns_from_table_meta(
table_meta: *const CassTableMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified table metadata."]
#[doc = " This can be used to iterate over indexes."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_index_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_indexes_from_table_meta(
table_meta: *const CassTableMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified materialized view metadata."]
#[doc = " This can be used to iterate over columns."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_materialized_view_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_materialized_views_from_table_meta(
table_meta: *const CassTableMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified table metadata. Metadata"]
#[doc = " fields allow direct access to the column data found in the underlying"]
#[doc = " \"tables\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @public @memberof CassTableMeta"]
#[doc = ""]
#[doc = " @param[in] table_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field_name()"]
#[doc = " @see cass_iterator_get_meta_field_value()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_table_meta(
table_meta: *const CassTableMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new iterator for the specified materialized view metadata."]
#[doc = " This can be used to iterate over columns."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_column_meta()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_columns_from_materialized_view_meta(
view_meta: *const CassMaterializedViewMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified materialized view metadata."]
#[doc = " Metadata fields allow direct access to the column data found in the"]
#[doc = " underlying \"views\" metadata view. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassMaterializedViewMeta"]
#[doc = ""]
#[doc = " @param[in] view_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field_name()"]
#[doc = " @see cass_iterator_get_meta_field_value()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_materialized_view_meta(
view_meta: *const CassMaterializedViewMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified column metadata. Metadata"]
#[doc = " fields allow direct access to the column data found in the underlying"]
#[doc = " \"columns\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @public @memberof CassColumnMeta"]
#[doc = ""]
#[doc = " @param[in] column_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field_name()"]
#[doc = " @see cass_iterator_get_meta_field_value()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_column_meta(
column_meta: *const CassColumnMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified index metadata. Metadata"]
#[doc = " fields allow direct access to the index data found in the underlying"]
#[doc = " \"indexes\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @public @memberof CassIndexMeta"]
#[doc = ""]
#[doc = " @param[in] index_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field_name()"]
#[doc = " @see cass_iterator_get_meta_field_value()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_index_meta(
index_meta: *const CassIndexMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified function metadata. Metadata"]
#[doc = " fields allow direct access to the column data found in the underlying"]
#[doc = " \"functions\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassFunctionMeta"]
#[doc = ""]
#[doc = " @param[in] function_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_function_meta(
function_meta: *const CassFunctionMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Creates a new fields iterator for the specified aggregate metadata. Metadata"]
#[doc = " fields allow direct access to the column data found in the underlying"]
#[doc = " \"aggregates\" metadata table. This can be used to iterate those metadata"]
#[doc = " field entries."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassAggregateMeta"]
#[doc = ""]
#[doc = " @param[in] aggregate_meta"]
#[doc = " @return A new iterator that must be freed."]
#[doc = ""]
#[doc = " @see cass_iterator_get_meta_field()"]
#[doc = " @see cass_iterator_free()"]
pub fn cass_iterator_fields_from_aggregate_meta(
aggregate_meta: *const CassAggregateMeta,
) -> *mut CassIterator;
}
extern "C" {
#[doc = " Advance the iterator to the next row, column or collection item."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return false if no more rows, columns or items, otherwise true"]
pub fn cass_iterator_next(iterator: *mut CassIterator) -> cass_bool_t;
}
extern "C" {
#[doc = " Gets the row at the result iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " row returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A row"]
pub fn cass_iterator_get_row(iterator: *const CassIterator) -> *const CassRow;
}
extern "C" {
#[doc = " Gets the column value at the row iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " column returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A value"]
pub fn cass_iterator_get_column(iterator: *const CassIterator) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the value at a collection or tuple iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A value"]
pub fn cass_iterator_get_value(iterator: *const CassIterator) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the key at the map iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A value"]
pub fn cass_iterator_get_map_key(iterator: *const CassIterator) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the value at the map iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A value"]
pub fn cass_iterator_get_map_value(iterator: *const CassIterator) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the field name at the user type defined iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " name returned by this method."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_iterator_get_user_type_field_name(
iterator: *const CassIterator,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the field value at the user type defined iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A value"]
pub fn cass_iterator_get_user_type_field_value(
iterator: *const CassIterator,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the keyspace metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A keyspace metadata entry"]
pub fn cass_iterator_get_keyspace_meta(
iterator: *const CassIterator,
) -> *const CassKeyspaceMeta;
}
extern "C" {
#[doc = " Gets the table metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A table metadata entry"]
pub fn cass_iterator_get_table_meta(iterator: *const CassIterator) -> *const CassTableMeta;
}
extern "C" {
#[doc = " Gets the materialized view metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @cassandra{3.0+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A materialized view metadata entry"]
pub fn cass_iterator_get_materialized_view_meta(
iterator: *const CassIterator,
) -> *const CassMaterializedViewMeta;
}
extern "C" {
#[doc = " Gets the type metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A type metadata entry"]
pub fn cass_iterator_get_user_type(iterator: *const CassIterator) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets the function metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A function metadata entry"]
pub fn cass_iterator_get_function_meta(
iterator: *const CassIterator,
) -> *const CassFunctionMeta;
}
extern "C" {
#[doc = " Gets the aggregate metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A aggregate metadata entry"]
pub fn cass_iterator_get_aggregate_meta(
iterator: *const CassIterator,
) -> *const CassAggregateMeta;
}
extern "C" {
#[doc = " Gets the column metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A column metadata entry"]
pub fn cass_iterator_get_column_meta(iterator: *const CassIterator) -> *const CassColumnMeta;
}
extern "C" {
#[doc = " Gets the index metadata entry at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A index metadata entry"]
pub fn cass_iterator_get_index_meta(iterator: *const CassIterator) -> *const CassIndexMeta;
}
extern "C" {
#[doc = " Gets the metadata field name at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @param[out] name"]
#[doc = " @param[out] name_length"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_iterator_get_meta_field_name(
iterator: *const CassIterator,
name: *mut *const ::std::os::raw::c_char,
name_length: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the metadata field value at the iterator's current position."]
#[doc = ""]
#[doc = " Calling cass_iterator_next() will invalidate the previous"]
#[doc = " value returned by this method."]
#[doc = ""]
#[doc = " @public @memberof CassIterator"]
#[doc = ""]
#[doc = " @param[in] iterator"]
#[doc = " @return A metadata field value"]
pub fn cass_iterator_get_meta_field_value(iterator: *const CassIterator) -> *const CassValue;
}
extern "C" {
#[doc = " Get the column value at index for the specified row."]
#[doc = ""]
#[doc = " @public @memberof CassRow"]
#[doc = ""]
#[doc = " @param[in] row"]
#[doc = " @param[in] index"]
#[doc = " @return The column value at the specified index. NULL is"]
#[doc = " returned if the index is out of bounds."]
pub fn cass_row_get_column(row: *const CassRow, index: usize) -> *const CassValue;
}
extern "C" {
#[doc = " Get the column value by name for the specified row."]
#[doc = ""]
#[doc = " @public @memberof CassRow"]
#[doc = ""]
#[doc = " @param[in] row"]
#[doc = " @param[in] name"]
#[doc = " @return The column value for the specified name. NULL is"]
#[doc = " returned if the column does not exist."]
pub fn cass_row_get_column_by_name(
row: *const CassRow,
name: *const ::std::os::raw::c_char,
) -> *const CassValue;
}
extern "C" {
#[doc = " Same as cass_row_get_column_by_name(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassRow"]
#[doc = ""]
#[doc = " @param[in] row"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @return same as cass_row_get_column_by_name()"]
#[doc = ""]
#[doc = " @see cass_row_get_column_by_name()"]
pub fn cass_row_get_column_by_name_n(
row: *const CassRow,
name: *const ::std::os::raw::c_char,
name_length: usize,
) -> *const CassValue;
}
extern "C" {
#[doc = " Gets the data type of a value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return Returns a reference to the data type of the value."]
#[doc = " Do not free this reference as it is bound to the lifetime of the value."]
pub fn cass_value_data_type(value: *const CassValue) -> *const CassDataType;
}
extern "C" {
#[doc = " Gets an int8 for the specified value."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_int8(value: *const CassValue, output: *mut cass_int8_t) -> CassError;
}
extern "C" {
#[doc = " Gets an int16 for the specified value."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_int16(value: *const CassValue, output: *mut cass_int16_t) -> CassError;
}
extern "C" {
#[doc = " Gets an int32 for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_int32(value: *const CassValue, output: *mut cass_int32_t) -> CassError;
}
extern "C" {
#[doc = " Gets an uint32 for the specified value."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_uint32(value: *const CassValue, output: *mut cass_uint32_t) -> CassError;
}
extern "C" {
#[doc = " Gets an int64 for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_int64(value: *const CassValue, output: *mut cass_int64_t) -> CassError;
}
extern "C" {
#[doc = " Gets a float for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_float(value: *const CassValue, output: *mut cass_float_t) -> CassError;
}
extern "C" {
#[doc = " Gets a double for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_double(value: *const CassValue, output: *mut cass_double_t) -> CassError;
}
extern "C" {
#[doc = " Gets a bool for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_bool(value: *const CassValue, output: *mut cass_bool_t) -> CassError;
}
extern "C" {
#[doc = " Gets a UUID for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_uuid(value: *const CassValue, output: *mut CassUuid) -> CassError;
}
extern "C" {
#[doc = " Gets an INET for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_inet(value: *const CassValue, output: *mut CassInet) -> CassError;
}
extern "C" {
#[doc = " Gets a string for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @param[out] output_size"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_string(
value: *const CassValue,
output: *mut *const ::std::os::raw::c_char,
output_size: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets the bytes of the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] output"]
#[doc = " @param[out] output_size"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_bytes(
value: *const CassValue,
output: *mut *const cass_byte_t,
output_size: *mut usize,
) -> CassError;
}
extern "C" {
#[doc = " Gets a decimal for the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] varint"]
#[doc = " @param[out] varint_size"]
#[doc = " @param[out] scale"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_decimal(
value: *const CassValue,
varint: *mut *const cass_byte_t,
varint_size: *mut usize,
scale: *mut cass_int32_t,
) -> CassError;
}
extern "C" {
#[doc = " Gets a duration for the specified value."]
#[doc = ""]
#[doc = " @cassandra{3.10+}"]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @param[out] months"]
#[doc = " @param[out] days"]
#[doc = " @param[out] nanos"]
#[doc = " @return CASS_OK if successful, otherwise error occurred"]
pub fn cass_value_get_duration(
value: *const CassValue,
months: *mut cass_int32_t,
days: *mut cass_int32_t,
nanos: *mut cass_int64_t,
) -> CassError;
}
extern "C" {
#[doc = " Gets the type of the specified value."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return The type of the specified value."]
pub fn cass_value_type(value: *const CassValue) -> CassValueType;
}
extern "C" {
#[doc = " Returns true if a specified value is null."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return true if the value is null, otherwise false."]
pub fn cass_value_is_null(value: *const CassValue) -> cass_bool_t;
}
extern "C" {
#[doc = " Returns true if a specified value is a collection."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return true if the value is a collection, otherwise false."]
pub fn cass_value_is_collection(value: *const CassValue) -> cass_bool_t;
}
extern "C" {
#[doc = " Returns true if a specified value is a duration."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] value"]
#[doc = " @return true if the value is a duration, otherwise false."]
pub fn cass_value_is_duration(value: *const CassValue) -> cass_bool_t;
}
extern "C" {
#[doc = " Get the number of items in a collection. Works for all collection types."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @return Count of items in a collection. 0 if not a collection."]
pub fn cass_value_item_count(collection: *const CassValue) -> usize;
}
extern "C" {
#[doc = " Get the primary sub-type for a collection. This returns the sub-type for a"]
#[doc = " list or set and the key type for a map."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @return The type of the primary sub-type. CASS_VALUE_TYPE_UNKNOWN"]
#[doc = " returned if not a collection."]
pub fn cass_value_primary_sub_type(collection: *const CassValue) -> CassValueType;
}
extern "C" {
#[doc = " Get the secondary sub-type for a collection. This returns the value type for a"]
#[doc = " map."]
#[doc = ""]
#[doc = " @public @memberof CassValue"]
#[doc = ""]
#[doc = " @param[in] collection"]
#[doc = " @return The type of the primary sub-type. CASS_VALUE_TYPE_UNKNOWN"]
#[doc = " returned if not a collection or not a map."]
pub fn cass_value_secondary_sub_type(collection: *const CassValue) -> CassValueType;
}
extern "C" {
#[doc = " Creates a new UUID generator."]
#[doc = ""]
#[doc = " <b>Note:</b> This object is thread-safe. It is best practice to create and reuse"]
#[doc = " a single object per application."]
#[doc = ""]
#[doc = " <b>Note:</b> If unique node information (IP address) is unable to be determined"]
#[doc = " then random node information will be generated."]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @return Returns a UUID generator that must be freed."]
#[doc = ""]
#[doc = " @see cass_uuid_gen_free()"]
#[doc = " @see cass_uuid_gen_new_with_node()"]
pub fn cass_uuid_gen_new() -> *mut CassUuidGen;
}
extern "C" {
#[doc = " Creates a new UUID generator with custom node information."]
#[doc = ""]
#[doc = " <b>Note:</b> This object is thread-safe. It is best practice to create and reuse"]
#[doc = " a single object per application."]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @return Returns a UUID generator that must be freed."]
#[doc = ""]
#[doc = " @see cass_uuid_gen_free()"]
pub fn cass_uuid_gen_new_with_node(node: cass_uint64_t) -> *mut CassUuidGen;
}
extern "C" {
#[doc = " Frees a UUID generator instance."]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @param[in] uuid_gen"]
pub fn cass_uuid_gen_free(uuid_gen: *mut CassUuidGen);
}
extern "C" {
#[doc = " Generates a V1 (time) UUID."]
#[doc = ""]
#[doc = " <b>Note:</b> This method is thread-safe"]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @param[in] uuid_gen"]
#[doc = " @param[out] output A V1 UUID for the current time."]
pub fn cass_uuid_gen_time(uuid_gen: *mut CassUuidGen, output: *mut CassUuid);
}
extern "C" {
#[doc = " Generates a new V4 (random) UUID"]
#[doc = ""]
#[doc = " <b>Note:</b>: This method is thread-safe"]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @param[in] uuid_gen"]
#[doc = " @param output A randomly generated V4 UUID."]
pub fn cass_uuid_gen_random(uuid_gen: *mut CassUuidGen, output: *mut CassUuid);
}
extern "C" {
#[doc = " Generates a V1 (time) UUID for the specified time."]
#[doc = ""]
#[doc = " <b>Note:</b>: This method is thread-safe"]
#[doc = ""]
#[doc = " @public @memberof CassUuidGen"]
#[doc = ""]
#[doc = " @param[in] uuid_gen"]
#[doc = " @param[in] timestamp"]
#[doc = " @param[out] output A V1 UUID for the specified time."]
pub fn cass_uuid_gen_from_time(
uuid_gen: *mut CassUuidGen,
timestamp: cass_uint64_t,
output: *mut CassUuid,
);
}
extern "C" {
#[doc = " Sets the UUID to the minimum V1 (time) value for the specified time."]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] time"]
#[doc = " @param[out] output A minimum V1 UUID for the specified time."]
pub fn cass_uuid_min_from_time(time: cass_uint64_t, output: *mut CassUuid);
}
extern "C" {
#[doc = " Sets the UUID to the maximum V1 (time) value for the specified time."]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] time"]
#[doc = " @param[out] output A maximum V1 UUID for the specified time."]
pub fn cass_uuid_max_from_time(time: cass_uint64_t, output: *mut CassUuid);
}
extern "C" {
#[doc = " Gets the timestamp for a V1 UUID"]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] uuid"]
#[doc = " @return The timestamp in milliseconds since the Epoch"]
#[doc = " (00:00:00 UTC on 1 January 1970). 0 returned if the UUID"]
#[doc = " is not V1."]
pub fn cass_uuid_timestamp(uuid: CassUuid) -> cass_uint64_t;
}
extern "C" {
#[doc = " Gets the version for a UUID"]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] uuid"]
#[doc = " @return The version of the UUID (1 or 4)"]
pub fn cass_uuid_version(uuid: CassUuid) -> cass_uint8_t;
}
extern "C" {
#[doc = " Returns a null-terminated string for the specified UUID."]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] uuid"]
#[doc = " @param[out] output A null-terminated string of length CASS_UUID_STRING_LENGTH."]
pub fn cass_uuid_string(uuid: CassUuid, output: *mut ::std::os::raw::c_char);
}
extern "C" {
#[doc = " Returns a UUID for the specified string."]
#[doc = ""]
#[doc = " Example: \"550e8400-e29b-41d4-a716-446655440000\""]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] str"]
#[doc = " @param[out] output"]
pub fn cass_uuid_from_string(
str_: *const ::std::os::raw::c_char,
output: *mut CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_uuid_from_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassUuid"]
#[doc = ""]
#[doc = " @param[in] str"]
#[doc = " @param[in] str_length"]
#[doc = " @param[out] output"]
#[doc = " @return same as cass_uuid_from_string()"]
#[doc = ""]
#[doc = " @see cass_uuid_from_string()"]
pub fn cass_uuid_from_string_n(
str_: *const ::std::os::raw::c_char,
str_length: usize,
output: *mut CassUuid,
) -> CassError;
}
extern "C" {
#[doc = " Creates a new server-side timestamp generator. This generator allows Cassandra"]
#[doc = " to assign timestamps server-side."]
#[doc = ""]
#[doc = " <b>Note:</b> This is the default timestamp generator."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTimestampGen"]
#[doc = ""]
#[doc = " @return Returns a timestamp generator that must be freed."]
#[doc = ""]
#[doc = " @see cass_timestamp_gen_free()"]
pub fn cass_timestamp_gen_server_side_new() -> *mut CassTimestampGen;
}
extern "C" {
#[doc = " Creates a new monotonically increasing timestamp generator with microsecond"]
#[doc = " precision."]
#[doc = ""]
#[doc = " This implementation guarantees a monotonically increasing timestamp. If the"]
#[doc = " timestamp generation rate exceeds one per microsecond or if the clock skews"]
#[doc = " into the past the generator will artificially increment the previously"]
#[doc = " generated timestamp until the request rate decreases or the clock skew"]
#[doc = " is corrected."]
#[doc = ""]
#[doc = " By default, this timestamp generator will generate warnings if more than"]
#[doc = " 1 second of clock skew is detected. It will print an error every second until"]
#[doc = " the clock skew is resolved. These settings can be changed by using"]
#[doc = " `cass_timestamp_gen_monotonic_new_with_settings()` to create the generator"]
#[doc = " instance."]
#[doc = ""]
#[doc = " <b>Note:</b> This generator is thread-safe and can be shared by multiple"]
#[doc = " sessions."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTimestampGen"]
#[doc = ""]
#[doc = " @return Returns a timestamp generator that must be freed."]
#[doc = ""]
#[doc = " @see cass_timestamp_gen_monotonic_new_with_settings();"]
#[doc = " @see cass_timestamp_gen_free()"]
pub fn cass_timestamp_gen_monotonic_new() -> *mut CassTimestampGen;
}
extern "C" {
#[doc = " Same as cass_timestamp_gen_monotonic_new(), but with settings for controlling"]
#[doc = " warnings about clock skew."]
#[doc = ""]
#[doc = " @param warning_threshold_us The amount of clock skew, in microseconds, that"]
#[doc = " must be detected before a warning is triggered. A threshold less than 0 can"]
#[doc = " be used to disable warnings."]
#[doc = " @param warning_interval_ms The amount of time, in milliseconds, to wait before"]
#[doc = " warning again about clock skew. An interval value less than or equal to 0 allows"]
#[doc = " the warning to be triggered every millisecond."]
#[doc = " @return Returns a timestamp generator that must be freed."]
pub fn cass_timestamp_gen_monotonic_new_with_settings(
warning_threshold_us: cass_int64_t,
warning_interval_ms: cass_int64_t,
) -> *mut CassTimestampGen;
}
extern "C" {
#[doc = " Frees a timestamp generator instance."]
#[doc = ""]
#[doc = " @cassandra{2.1+}"]
#[doc = ""]
#[doc = " @public @memberof CassTimestampGen"]
#[doc = ""]
#[doc = " @param[in] timestamp_gen"]
pub fn cass_timestamp_gen_free(timestamp_gen: *mut CassTimestampGen);
}
extern "C" {
#[doc = " Creates a new default retry policy."]
#[doc = ""]
#[doc = " This policy retries queries in the following cases:"]
#[doc = " <ul>"]
#[doc = " <li>On a read timeout, if enough replicas replied but data was not received.</li>"]
#[doc = " <li>On a write timeout, if a timeout occurs while writing the distributed batch log</li>"]
#[doc = " <li>On unavailable, it will move to the next host</li>"]
#[doc = " </ul>"]
#[doc = ""]
#[doc = " In all other cases the error will be returned."]
#[doc = ""]
#[doc = " This policy always uses the query's original consistency level."]
#[doc = ""]
#[doc = " @public @memberof CassRetryPolicy"]
#[doc = ""]
#[doc = " @return Returns a retry policy that must be freed."]
#[doc = ""]
#[doc = " @see cass_retry_policy_free()"]
pub fn cass_retry_policy_default_new() -> *mut CassRetryPolicy;
}
extern "C" {
pub fn cass_retry_policy_downgrading_consistency_new() -> *mut CassRetryPolicy;
}
extern "C" {
#[doc = " Creates a new fallthrough retry policy."]
#[doc = ""]
#[doc = " This policy never retries or ignores a server-side failure. The error"]
#[doc = " is always returned."]
#[doc = ""]
#[doc = " @public @memberof CassRetryPolicy"]
#[doc = ""]
#[doc = " @return Returns a retry policy that must be freed."]
#[doc = ""]
#[doc = " @see cass_retry_policy_free()"]
pub fn cass_retry_policy_fallthrough_new() -> *mut CassRetryPolicy;
}
extern "C" {
#[doc = " Creates a new logging retry policy."]
#[doc = ""]
#[doc = " This policy logs the retry decision of its child policy. Logging is"]
#[doc = " done using CASS_LOG_INFO."]
#[doc = ""]
#[doc = " @public @memberof CassRetryPolicy"]
#[doc = ""]
#[doc = " @param[in] child_retry_policy"]
#[doc = " @return Returns a retry policy that must be freed. NULL is returned if"]
#[doc = " the child_policy is a logging retry policy."]
#[doc = ""]
#[doc = " @see cass_retry_policy_free()"]
pub fn cass_retry_policy_logging_new(
child_retry_policy: *mut CassRetryPolicy,
) -> *mut CassRetryPolicy;
}
extern "C" {
#[doc = " Frees a retry policy instance."]
#[doc = ""]
#[doc = " @public @memberof CassRetryPolicy"]
#[doc = ""]
#[doc = " @param[in] policy"]
pub fn cass_retry_policy_free(policy: *mut CassRetryPolicy);
}
extern "C" {
#[doc = " Creates a new custom payload."]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @return Returns a custom payload that must be freed."]
#[doc = ""]
#[doc = " @see cass_custom_payload_free()"]
pub fn cass_custom_payload_new() -> *mut CassCustomPayload;
}
extern "C" {
#[doc = " Frees a custom payload instance."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @param[in] payload"]
pub fn cass_custom_payload_free(payload: *mut CassCustomPayload);
}
extern "C" {
#[doc = " Sets an item to the custom payload."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @param[in] payload"]
#[doc = " @param[in] name"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
pub fn cass_custom_payload_set(
payload: *mut CassCustomPayload,
name: *const ::std::os::raw::c_char,
value: *const cass_byte_t,
value_size: usize,
);
}
extern "C" {
#[doc = " Same as cass_custom_payload_set(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @param[in] payload"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
#[doc = " @param[in] value"]
#[doc = " @param[in] value_size"]
pub fn cass_custom_payload_set_n(
payload: *mut CassCustomPayload,
name: *const ::std::os::raw::c_char,
name_length: usize,
value: *const cass_byte_t,
value_size: usize,
);
}
extern "C" {
#[doc = " Removes an item from the custom payload."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @param[in] payload"]
#[doc = " @param[in] name"]
pub fn cass_custom_payload_remove(
payload: *mut CassCustomPayload,
name: *const ::std::os::raw::c_char,
);
}
extern "C" {
#[doc = " Same as cass_custom_payload_set(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @public @memberof CassCustomPayload"]
#[doc = ""]
#[doc = " @param[in] payload"]
#[doc = " @param[in] name"]
#[doc = " @param[in] name_length"]
pub fn cass_custom_payload_remove_n(
payload: *mut CassCustomPayload,
name: *const ::std::os::raw::c_char,
name_length: usize,
);
}
extern "C" {
#[doc = " Gets the string for a consistency."]
#[doc = ""]
#[doc = " @param[in] consistency"]
#[doc = " @return A null-terminated string for the consistency."]
#[doc = " Example: \"ALL\", \"ONE\", \"QUORUM\", etc."]
pub fn cass_consistency_string(consistency: CassConsistency) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Write type"]
#[doc = ""]
#[doc = " Gets the string for a write type."]
#[doc = ""]
#[doc = " @param[in] write_type"]
#[doc = " @return A null-terminated string for the write type."]
#[doc = " Example: \"BATCH\", \"SIMPLE\", \"COUNTER\", etc."]
pub fn cass_write_type_string(write_type: CassWriteType) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Gets a description for an error code."]
#[doc = ""]
#[doc = " @param[in] error"]
#[doc = " @return A null-terminated string describing the error."]
pub fn cass_error_desc(error: CassError) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn cass_log_cleanup();
}
extern "C" {
#[doc = " Sets the log level."]
#[doc = ""]
#[doc = " <b>Note:</b> This needs to be done before any call that might log, such as"]
#[doc = " any of the cass_cluster_*() or cass_ssl_*() functions."]
#[doc = ""]
#[doc = " <b>Default:</b> CASS_LOG_WARN"]
#[doc = ""]
#[doc = " @param[in] log_level"]
pub fn cass_log_set_level(log_level: CassLogLevel);
}
extern "C" {
#[doc = " Sets a callback for handling logging events."]
#[doc = ""]
#[doc = " <b>Note:</b> This needs to be done before any call that might log, such as"]
#[doc = " any of the cass_cluster_*() or cass_ssl_*() functions."]
#[doc = ""]
#[doc = " <b>Default:</b> An internal callback that prints to stderr"]
#[doc = ""]
#[doc = " @param[in] data An opaque data object passed to the callback."]
#[doc = " @param[in] callback A callback that handles logging events. This is"]
#[doc = " called in a separate thread so access to shared data must be synchronized."]
pub fn cass_log_set_callback(callback: CassLogCallback, data: *mut ::std::os::raw::c_void);
}
extern "C" {
pub fn cass_log_set_queue_size(queue_size: usize);
}
extern "C" {
#[doc = " Gets the string for a log level."]
#[doc = ""]
#[doc = " @param[in] log_level"]
#[doc = " @return A null-terminated string for the log level."]
#[doc = " Example: \"ERROR\", \"WARN\", \"INFO\", etc."]
pub fn cass_log_level_string(log_level: CassLogLevel) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Constructs an inet v4 object."]
#[doc = ""]
#[doc = " @public @memberof CassInet"]
#[doc = ""]
#[doc = " @param[in] address An address of size CASS_INET_V4_LENGTH"]
#[doc = " @return An inet object."]
pub fn cass_inet_init_v4(address: *const cass_uint8_t) -> CassInet;
}
extern "C" {
#[doc = " Constructs an inet v6 object."]
#[doc = ""]
#[doc = " @public @memberof CassInet"]
#[doc = ""]
#[doc = " @param[in] address An address of size CASS_INET_V6_LENGTH"]
#[doc = " @return An inet object."]
pub fn cass_inet_init_v6(address: *const cass_uint8_t) -> CassInet;
}
extern "C" {
#[doc = " Returns a null-terminated string for the specified inet."]
#[doc = ""]
#[doc = " @public @memberof CassInet"]
#[doc = ""]
#[doc = " @param[in] inet"]
#[doc = " @param[out] output A null-terminated string of length CASS_INET_STRING_LENGTH."]
pub fn cass_inet_string(inet: CassInet, output: *mut ::std::os::raw::c_char);
}
extern "C" {
#[doc = " Returns an inet for the specified string."]
#[doc = ""]
#[doc = " Examples: \"127.0.0.1\" or \"::1\""]
#[doc = ""]
#[doc = " @public @memberof CassInet"]
#[doc = ""]
#[doc = " @param[in] str"]
#[doc = " @param[out] output"]
pub fn cass_inet_from_string(
str_: *const ::std::os::raw::c_char,
output: *mut CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Same as cass_inet_from_string(), but with lengths for string"]
#[doc = " parameters."]
#[doc = ""]
#[doc = " @public @memberof CassInet"]
#[doc = ""]
#[doc = " @param[in] str"]
#[doc = " @param[in] str_length"]
#[doc = " @param[out] output"]
#[doc = " @return same as cass_inet_from_string()"]
#[doc = ""]
#[doc = " @see cass_inet_from_string()"]
pub fn cass_inet_from_string_n(
str_: *const ::std::os::raw::c_char,
str_length: usize,
output: *mut CassInet,
) -> CassError;
}
extern "C" {
#[doc = " Converts a unix timestamp (in seconds) to the Cassandra \"date\" type. The \"date\" type"]
#[doc = " represents the number of days since the Epoch (1970-01-01) with the Epoch centered at"]
#[doc = " the value 2^31."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @param[in] epoch_secs"]
#[doc = " @return the number of days since the date -5877641-06-23"]
pub fn cass_date_from_epoch(epoch_secs: cass_int64_t) -> cass_uint32_t;
}
extern "C" {
#[doc = " Converts a unix timestamp (in seconds) to the Cassandra \"time\" type. The \"time\" type"]
#[doc = " represents the number of nanoseconds since midnight (range 0 to 86399999999999)."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @param[in] epoch_secs"]
#[doc = " @return nanoseconds since midnight"]
pub fn cass_time_from_epoch(epoch_secs: cass_int64_t) -> cass_int64_t;
}
extern "C" {
#[doc = " Combines the Cassandra \"date\" and \"time\" types to Epoch time in seconds."]
#[doc = ""]
#[doc = " @cassandra{2.2+}"]
#[doc = ""]
#[doc = " @param[in] date"]
#[doc = " @param[in] time"]
#[doc = " @return Epoch time in seconds. Negative times are possible if the date"]
#[doc = " occurs before the Epoch (1970-1-1)."]
pub fn cass_date_time_to_epoch(date: cass_uint32_t, time: cass_int64_t) -> cass_int64_t;
}
extern "C" {
#[doc = " Set custom allocation functions."]
#[doc = ""]
#[doc = " <b>Note:</b> This is not thread-safe. The allocation functions must be set"]
#[doc = " before any other library function is called."]
#[doc = ""]
#[doc = " <b>Default:</b> The C runtime's malloc(), realloc() and free()"]
#[doc = ""]
#[doc = " <b>Important:</b> The C runtime's malloc(), realloc() and free() will be"]
#[doc = " used by libuv when using versions 1.5 or earlier."]
#[doc = ""]
#[doc = " @param[in] malloc_func"]
#[doc = " @param[in] realloc_func"]
#[doc = " @param[in] free_func"]
pub fn cass_alloc_set_functions(
malloc_func: CassMallocFunction,
realloc_func: CassReallocFunction,
free_func: CassFreeFunction,
);
}