C API  19.3.0
Oracle NoSQL Database C Client
kvstore.h File Reference

Go to the source code of this file.

Data Structures

struct  kv_execution_id_t
 

Macros

#define KV_DURABILITY_COMMIT_NO_SYNC   (KV_SYNC_NONE | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))
 
#define KV_DURABILITY_COMMIT_SYNC   (KV_SYNC_FLUSH | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))
 
#define KV_DURABILITY_COMMIT_WRITE_NO_SYNC   (KV_SYNC_WRITE_NO_SYNC | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))
 
#define KV_ANONYMOUS   "[]"
 

Typedefs

typedef int kv_int_t
 
typedef long long kv_long_t
 
typedef float kv_float_t
 
typedef double kv_double_t
 
typedef long long kv_timeout_t
 
typedef int kv_durability_t
 
typedef struct store_impl kv_store_t
 
typedef struct config_impl kv_config_t
 
typedef struct proxy_config_impl kv_proxy_config_t
 
typedef struct consistency_impl kv_consistency_t
 
typedef struct iterator_impl kv_iterator_t
 
typedef struct field_range_impl kv_field_range_t
 
typedef struct result_impl kv_result_t
 
typedef struct statement_result_impl kv_statement_result_t
 
typedef struct future_impl kv_future_t
 
typedef struct operations_impl kv_operations_t
 
typedef struct operation_results_impl kv_operation_results_t
 
typedef struct field_impl kv_field_t
 
typedef struct read_options_impl kv_read_options_t
 
typedef struct write_options_impl kv_write_options_t
 
typedef struct version_impl kv_version_t
 
typedef struct row_impl kv_row_t
 
typedef struct arraylist_impl kv_array_t
 
typedef struct hashmap_impl kv_map_t
 
typedef struct hashmap_impl kv_record_t
 
typedef void(* kv_output_func) (const char *)
 

Enumerations

enum  kv_consistency_enum {
  KV_CONSISTENCY_ABSOLUTE = 0, KV_CONSISTENCY_NONE, KV_CONSISTENCY_TIME, KV_CONSISTENCY_VERSION,
  KV_CONSISTENCY_NONE_NO_MASTER
}
 
enum  kv_sync_policy_enum { KV_SYNC_NONE = 1, KV_SYNC_FLUSH = 2, KV_SYNC_WRITE_NO_SYNC = 3 }
 
enum  kv_ack_policy_enum { KV_ACK_ALL = 1, KV_ACK_NONE = 2, KV_ACK_MAJORITY = 3 }
 
enum  kv_return_row_version_enum { KV_RETURN_ROW_NONE = 0, KV_RETURN_ROW_ALL, KV_RETURN_ROW_VALUE, KV_RETURN_ROW_VERSION }
 
enum  kv_field_type_enum {
  FIELD_TYPE_INT = 0, FIELD_TYPE_LONG, FIELD_TYPE_FLOAT, FIELD_TYPE_DOUBLE,
  FIELD_TYPE_STRING, FIELD_TYPE_BOOLEAN, FIELD_TYPE_BYTES, FIELD_TYPE_ARRAY,
  FIELD_TYPE_MAP, FIELD_TYPE_RECORD, FIELD_TYPE_NULL
}
 
enum  kv_direction_enum { KV_DIRECTION_FORWARD, KV_DIRECTION_REVERSE, KV_DIRECTION_UNORDERED }
 
enum  kv_operation_enum {
  KV_OP_DELETE = 0, KV_OP_DELETE_IF_VERSION, KV_OP_PUT, KV_OP_PUT_IF_ABSENT,
  KV_OP_PUT_IF_PRESENT, KV_OP_PUT_IF_VERSION
}
 
enum  kv_error_t {
  KV_SUCCESS = 0, KV_ROW_ALREADY_EXISTS = 1, KV_ROW_NOT_FOUND = 2, KV_VERSION_NOT_MATCH = 3,
  KV_ERROR_OPEN_STORE = -1, KV_INVALID_ARGUMENT = -2, KV_INVALID_STORE = -3, KV_NO_MEMORY = -4,
  KV_NO_SUCH_OBJECT = -5, KV_FIELD_CAST_INCOMPATIBLE = -6, KV_FIELD_INVALID_TYPE = -7, KV_FIELD_NOT_EXISTS = -8,
  KV_ERROR_JSON_PARSE = -9, KV_CANCELLATION = -20, KV_CONSISTENCY = -21, KV_DURABILITY = -22,
  KV_ERROR_THRIFT = -23, KV_EXECUTION = -24, KV_FAULT = -25, KV_ILLEGAL_ARGUMENT = -26,
  KV_INTERRUPTTED = -27, KV_INTERRUPTED = -27, KV_ITERATOR_TIMEOUT = -28, KV_TABLE_OP_EXECUTION = -29,
  KV_PROXY = -30, KV_REQUEST_TIMEOUT = -31, KV_TIMEOUT = -32, KV_ERROR_START_PROXY = -50,
  KV_ERROR_SHUTDOWN_PROXY = -51, KV_ERROR_UNKNOWN = -100
}
 
enum  kv_boolean_t { KV_FALSE = 0, KV_TRUE }
 
enum  kv_ttl_timeunit_enum { HOURS = 0, DAYS }
 

Functions

void kv_driver_version (kv_int_t *major, kv_int_t *minor, kv_int_t *patch)
 
const char * kv_driver_package_version ()
 
kv_error_t kv_proxy_version (kv_store_t *store, const char **versionp)
 
kv_error_t kv_open_store (kv_store_t **storep, const char *host, int port, const kv_config_t *config)
 Opens a KV Store handle. Call kv_close_store() to release the resources allocated for the kv_store_t structure. More...
 
kv_error_t kv_open_store_with_proxy (kv_store_t **storep, const char *host, int port, const kv_config_t *config, const kv_proxy_config_t *proxy_config)
 Opens a KV Store handle. This call will implicitly start a local proxy server using the specified host and port and proxy configuration information, if one is not already available. Users must call kv_close_store() to release the resources allocated for the kv_store_t structure. More...
 
void kv_close_store (kv_store_t **storep)
 Closes the store, releases all resources used by the handle. More...
 
kv_error_t kv_shutdown_proxy (kv_store_t *store)
 Shutdown the proxy. More...
 
kv_error_t kv_create_config (const char *store_name, const char *host, int port, kv_config_t **configp)
 Creates store configuration to be used with kv_open_store(). More...
 
kv_error_t kv_config_add_host_port (kv_config_t *config, const char *host, int port)
 Adds an additional host and port pair to the store's configuration. Use of additional host:port pairs for store connections is highly recommended in case one host is temporarily unavailable. More...
 
kv_error_t kv_config_set_consistency (kv_config_t *config, kv_consistency_t *consistency)
 Identifies the default consistency policy to be used by the store handle. More...
 
kv_error_t kv_config_set_durability (kv_config_t *config, kv_durability_t durability)
 Identifies the default durability policy to be used by the store handle. More...
 
kv_error_t kv_config_set_request_timeout (kv_config_t *config, kv_timeout_t timeout)
 Configures default request timeout value that are used for when this client performs store data access. More...
 
kv_error_t kv_config_set_iterator_max_results (kv_config_t *config, kv_long_t max_results_num)
 Sets the number of results returned by tableIterator or indexIterator in a single call to the server. This would be the default value for the iteration call configuration. More...
 
kv_error_t kv_config_set_auth_user (kv_config_t *config, const char *user_name)
 Sets the username for authentication to the store. More...
 
kv_error_t kv_config_add_read_zone (kv_config_t *config, const char *read_zone)
 Adds a zone in which nodes must be located if they are to be used for read operations. More...
 
const char * kv_config_get_store_name (const kv_config_t *config)
 Returns the store name from the handle. More...
 
kv_consistency_tkv_config_get_consistency (const kv_config_t *config)
 Returns the consistency policy from the handle. More...
 
kv_durability_t kv_config_get_durability (const kv_config_t *config)
 Returns the durability policy from the handle. More...
 
kv_timeout_t kv_config_get_request_timeout (const kv_config_t *config)
 Returns the request timeout value from the handle. More...
 
kv_long_t kv_config_get_iterator_max_results (const kv_config_t *config)
 Returns the default number of results returned by tableIterator or indexIterator in a single server call. More...
 
kv_int_t kv_config_helper_hosts_size (const kv_config_t *config)
 Returns the number of helper hosts defined in the handle. More...
 
const char * kv_config_get_helper_host (const kv_config_t *config, kv_int_t index)
 Gets a specific helper host and port string where the format is "host:port". More...
 
const char * kv_config_get_auth_user (const kv_config_t *config)
 Gets the username for authentication to the store. More...
 
kv_int_t kv_config_read_zones_size (const kv_config_t *config)
 Gets the number of read zones defined in the handle. More...
 
const char * kv_config_get_read_zone (const kv_config_t *config, kv_int_t index)
 Gets a specific read zone name from the handle. More...
 
void kv_release_config (kv_config_t **configp)
 Releases the resources used by the configuration strucutre. More...
 
kv_error_t kv_create_proxy_config (const char *kvproxy_path_to_jar, const char *kvclient_path_to_jar, kv_proxy_config_t **configp)
 Creates a proxy configuration handle to be used with kv_open_store_with_proxy(). More...
 
kv_error_t kv_proxy_config_set_iterator_max_results (kv_proxy_config_t *config, kv_long_t max_results_num)
 Sets the number of results returned by tableIterator or indexIterator in a single call to the server. The default value is 100. More...
 
kv_error_t kv_proxy_config_set_iterator_max_concurrent_requests (kv_proxy_config_t *config, kv_int_t max_concurrent_requests)
 Sets the maximum number of concurrent requests per iterator. Default value is the number of available processors * 2. More...
 
kv_error_t kv_proxy_config_set_iterator_max_results_batches (kv_proxy_config_t *config, kv_int_t max_results_batches)
 Sets the maximum number of results batches that can be held in the proxy per iterator. Default value is 0 that will be set automatically based on the max-concurrent-requests. More...
 
kv_error_t kv_proxy_config_set_iterator_expiration_timeout (kv_proxy_config_t *config, kv_timeout_t timeout_ms)
 Sets the expiration timeout for an iterator in milliseconds. The proxy maintains iterator state when an iteration begins. This timeout is used to expire that state if the client does not complete the iteration in a timely manner. The default value is 60000 (60 seconds). More...
 
kv_error_t kv_proxy_config_set_max_open_iterators (kv_proxy_config_t *config, kv_int_t max_opened_iterators)
 Sets the number for the maximum number of open iterators in a connection. Because the proxy maintains state for iterators an excessive number of active (not completed or timed out) iterators can result in memory problems. This method allows specification of a limit. The default value is 10000. More...
 
kv_error_t kv_proxy_config_set_num_threads (kv_proxy_config_t *config, kv_int_t num_threads)
 Sets the number of threads to use for request handling in the proxy server. The deault value is 20. More...
 
kv_error_t kv_proxy_config_set_request_limits (kv_proxy_config_t *config, kv_int_t max_active_requests, kv_int_t request_threshold_percent, kv_int_t node_limit_percent)
 Configures the maximum number of requests that this client can have active for a node in the KVStore. More...
 
kv_error_t kv_proxy_config_set_timeouts (kv_proxy_config_t *config, kv_timeout_t read_timeout, kv_timeout_t request_timeout, kv_timeout_t socket_open_timeout)
 Configures default timeout values. More...
 
kv_error_t kv_proxy_config_set_sec_prop_file (kv_proxy_config_t *config, const char *security_property_file)
 Sets the security property configuration file, the file is located on the proxy server. More...
 
kv_long_t kv_proxy_config_get_iterator_max_results (const kv_proxy_config_t *config)
 Returns the number of results returned by tableIterator or indexIterator in a single server call. More...
 
kv_int_t kv_proxy_config_get_iterator_max_concurrent_requests (const kv_proxy_config_t *config)
 Returns the maximum number of concurrent requests per iterator. More...
 
kv_int_t kv_proxy_config_get_iterator_max_results_batches (const kv_proxy_config_t *config)
 Returns the maximum number of results batches that can be held in the proxy per iterator. More...
 
kv_timeout_t kv_proxy_config_get_iterator_expiration_timeout (const kv_proxy_config_t *config)
 Returns the expiration timeout for an iterator in milliseconds. More...
 
kv_int_t kv_proxy_config_get_max_open_iterators (const kv_proxy_config_t *config)
 Returns the number for maximum number of active iterators on a connection. More...
 
kv_int_t kv_proxy_config_get_num_threads (const kv_proxy_config_t *config)
 Returns the number of request handler threads configured for the proxy. More...
 
void kv_proxy_config_get_request_limits (const kv_proxy_config_t *config, kv_int_t *max_active_requests, kv_int_t *request_threshold_percent, kv_int_t *node_limit_percent)
 Returns various request limits from the handle. More...
 
void kv_proxy_config_get_timeouts (const kv_proxy_config_t *config, kv_timeout_t *read_timeout, kv_timeout_t *request_timeout, kv_timeout_t *socket_open_timeout)
 Returns various timeout values from the handle. More...
 
const char * kv_proxy_config_get_sec_prop_file (const kv_proxy_config_t *config)
 Gets the security property file that located on the proxy server. More...
 
void kv_release_proxy_config (kv_proxy_config_t **configp)
 Releases the resources used by the proxy configuration handle. More...
 
kv_error_t kv_table_put (kv_store_t *store, const char *table_name, const kv_row_t *row, kv_version_t **new_version)
 Puts a row into a table, overwriting any existing row. More...
 
kv_error_t kv_table_put_with_options (kv_store_t *store, const char *table_name, const kv_row_t *row, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Puts a row to a table using options, overwriting any existing row. More...
 
kv_error_t kv_table_put_if_absent (kv_store_t *store, const char *table_name, const kv_row_t *row, kv_version_t **new_version)
 Puts a row to a table but only if the row does not exist. More...
 
kv_error_t kv_table_put_if_absent_with_options (kv_store_t *store, const char *table_name, const kv_row_t *row, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Puts a row to a table but only if the row does not exist using options. More...
 
kv_error_t kv_table_put_if_present (kv_store_t *store, const char *table_name, const kv_row_t *row, kv_version_t **new_version)
 Puts a row to a table but only if the row already exists. More...
 
kv_error_t kv_table_put_if_present_with_options (kv_store_t *store, const char *table_name, const kv_row_t *row, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Puts a row to a table but only if the row already exists. More...
 
kv_error_t kv_table_put_if_version (kv_store_t *store, const char *table_name, const kv_row_t *row, const kv_version_t *if_version, kv_version_t **new_version)
 Puts a row to a table but only if the version of the existing row matches the if_version argument. More...
 
kv_error_t kv_table_put_if_version_with_options (kv_store_t *store, const char *table_name, const kv_row_t *row, const kv_version_t *if_version, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Puts a row to a table but only if the version of the existing row matches the if_version argument using options. More...
 
kv_error_t kv_table_get (kv_store_t *store, const char *table_name, const kv_row_t *key, kv_row_t **rowp)
 Returns a row associated with the primary key from a table, it uses the store's default consistency policy and timeout value. More...
 
kv_error_t kv_table_get_with_options (kv_store_t *store, const char *table_name, const kv_row_t *key, const kv_read_options_t *options, kv_result_t **resultp)
 Returns a row associated with the primary key from a table using options. More...
 
kv_int_t kv_table_delete (kv_store_t *store, const char *table_name, const kv_row_t *key)
 Deletes a row associated with the primary key from a table. More...
 
kv_int_t kv_table_delete_with_options (kv_store_t *store, const char *table_name, const kv_row_t *key, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Deletes a row associated with the primary key from a table using options. More...
 
kv_int_t kv_table_delete_if_version (kv_store_t *store, const char *table_name, const kv_row_t *key, const kv_version_t *if_version)
 Deletes a row from a table but only if its version matches the one specified in if_version. More...
 
kv_int_t kv_table_delete_if_version_with_options (kv_store_t *store, const char *table_name, const kv_row_t *key, const kv_version_t *if_version, const kv_write_options_t *options, kv_return_row_version_enum choice, kv_result_t **resultp)
 Deletes a row from a table but only if its version matches the one specified in if_version using options. More...
 
kv_error_t kv_table_multi_get (kv_store_t *store, const char *table_name, const kv_row_t *key, kv_boolean_t keyonly, const kv_field_range_t *range, const char **included_tables, const kv_read_options_t *options, kv_iterator_t **iteratorp)
 Returns the rows associated with a partial primary key. The range argument can be used to further limit the rows that are retrieved, the included_tables argument can be used to retrieve the rows from its child and ancestor tables. More...
 
kv_int_t kv_table_multi_delete (kv_store_t *store, const char *table_name, const kv_row_t *key, const kv_field_range_t *range, const char **included_tables, const kv_write_options_t *options)
 Deletes multiple rows from a table in an atomic operation. More...
 
kv_error_t kv_table_iterator (kv_store_t *store, const char *table_name, const kv_row_t *key, kv_boolean_t keyonly, const kv_field_range_t *range, const char **included_tables, kv_direction_enum direction, const kv_read_options_t *options, kv_long_t max_results, kv_iterator_t **iteratorp)
 Returns an iterator over the rows associated with a primary key. More...
 
kv_error_t kv_table_iterator_multi (kv_store_t *store, const char *table_name, kv_row_t **keys, kv_boolean_t keyonly, const kv_field_range_t *range, const char **included_tables, kv_direction_enum direction, const kv_read_options_t *options, kv_long_t max_results, kv_iterator_t **iteratorp)
 Returns an iterator over the rows represented by primary keys. More...
 
kv_error_t kv_index_iterator (kv_store_t *store, const char *table_name, const char *index_name, const kv_row_t *key, kv_boolean_t keyonly, const kv_field_range_t *range, const char **included_tables, kv_direction_enum direction, const kv_read_options_t *options, kv_long_t batch_size, kv_iterator_t **iteratorp)
 Returns an iterator over the rows associated with an index key. More...
 
kv_error_t kv_iterator_next (kv_iterator_t *iterator)
 Advances the iterator to the next result. More...
 
const kv_result_tkv_iterator_get_result (kv_iterator_t *iterator)
 Returns the result at the iterator's current position. More...
 
kv_int_t kv_iterator_size (const kv_iterator_t *iterator)
 
void kv_release_iterator (kv_iterator_t **iteratorp)
 Releases the resources used by the iterator handle. More...
 
kv_error_t kv_table_execute_operations (kv_store_t *store, const kv_operations_t *list, const kv_write_options_t *options, kv_operation_results_t **resultsp)
 Executes a sequence of operations in a single transaction. More...
 
kv_error_t kv_table_execute_sync (kv_store_t *store, const char *statement, kv_statement_result_t **resultp)
 Synchronously executes a table statement. More...
 
kv_error_t kv_table_execute (kv_store_t *store, const char *statement, kv_future_t **futurep)
 Asynchronously executes a table statement. More...
 
kv_error_t kv_get_future (kv_store_t *store, const kv_execution_id_t *id, kv_future_t **futurep)
 Constructs a future handle using the execution id. More...
 
kv_error_t kv_refresh_tables (kv_store_t *store)
 Refreshes cached information about the tables. This method is required before using any tables that had been modified. More...
 
kv_operations_tkv_create_operations ()
 Creates and initializes an operations structure to hold a sequence of update operations that execute in a single transaction. All of the operations in this structure must shard the same fully-defined shard key in order to operate transactionally. More...
 
kv_error_t kv_operations_set_copy (kv_operations_t *operations)
 Configures a list of operations to copy user-supplied structures and buffers. More...
 
kv_error_t kv_operations_set_donate (kv_operations_t *operations)
 Configures the operation list so that keys, rows and versions passed to create operations are donated to the list (owned by the list) and not copied. More...
 
kv_error_t kv_create_table_put_op (kv_operations_t *operations, const char *table_name, const kv_row_t *row, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a put operation. More...
 
kv_error_t kv_create_table_put_if_absent_op (kv_operations_t *operations, const char *table_name, const kv_row_t *row, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a putIfAbsent operation. More...
 
kv_error_t kv_create_table_put_if_present_op (kv_operations_t *operations, const char *table_name, const kv_row_t *row, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a putIfPresent operation. More...
 
kv_error_t kv_create_table_put_if_version_op (kv_operations_t *operations, const char *table_name, const kv_row_t *row, const kv_version_t *if_version, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a putIfVersion operation. More...
 
kv_error_t kv_create_table_delete_op (kv_operations_t *operations, const char *table_name, const kv_row_t *key, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a delete operation. More...
 
kv_error_t kv_create_table_delete_if_version_op (kv_operations_t *operations, const char *table_name, const kv_row_t *key, const kv_version_t *if_version, kv_return_row_version_enum choice, kv_boolean_t abort_on_failure)
 Creates a deleteIfVersion operation. More...
 
kv_int_t kv_operations_size (const kv_operations_t *operations)
 Returns the number of operation in the operations sequence. More...
 
kv_operation_enum kv_operation_get_type (const kv_operations_t *operations, kv_int_t index)
 Returns the type of specified table operation in the list. More...
 
kv_boolean_t kv_operation_get_abort_on_failure (const kv_operations_t *operations, kv_int_t index)
 Returns whether a failure for the identified operation causes the entire sequence of operations to fail. More...
 
void kv_release_operations (kv_operations_t **listp)
 Releases the resouce used by the operations structure. More...
 
kv_int_t kv_operation_results_size (const kv_operation_results_t *results)
 Returns the number of results in the results of a group operation execution. More...
 
kv_result_tkv_table_operation_results_get (const kv_operation_results_t *results, kv_int_t index)
 Returns the results of the specified operation. More...
 
void kv_release_operation_results (kv_operation_results_t **resultsp)
 Releases the resources used by the operation results structure. More...
 
const char * kv_result_get_table_name (const kv_result_t *result)
 Returns the table name from the result handle. More...
 
kv_row_tkv_result_get_row (const kv_result_t *result)
 Returns the row from the result handle. More...
 
kv_version_tkv_result_get_version (const kv_result_t *result)
 Returns the version from the result handle. More...
 
kv_row_tkv_result_get_index_key (const kv_result_t *result)
 Returns the index key from the result handle. More...
 
kv_row_tkv_result_get_prev_row (const kv_result_t *result)
 Returns the previous row from the result handle. More...
 
kv_version_tkv_result_get_prev_row_version (const kv_result_t *result)
 Returns the version of previous row from the result handle. More...
 
kv_boolean_t kv_result_get_success (const kv_result_t *result)
 Identifies if the execution of an operation was successfully. More...
 
kv_long_t kv_result_get_expiration (const kv_result_t *result)
 Returns the expiration time of current row from the result handle. More...
 
void kv_release_result (kv_result_t **resultp)
 Releases the resources used by the result handle. More...
 
kv_error_t kv_copy_version (const kv_version_t *from, kv_version_t **to)
 Copies a version structure. More...
 
void kv_release_version (kv_version_t **versionp)
 Releases the resources used by the version structure. More...
 
kv_durability_t kv_create_durability (kv_sync_policy_enum master, kv_sync_policy_enum replica, kv_ack_policy_enum ack)
 Creates a durability policy, which is then used for store write operations. More...
 
kv_sync_policy_enum kv_get_durability_master_sync (kv_durability_t durability)
 Returns the sync policy in use by the Master for the given durability policy. More...
 
kv_sync_policy_enum kv_get_durability_replica_sync (kv_durability_t durability)
 Returns the sync policy in use by the replicas for the given durability policy. More...
 
kv_ack_policy_enum kv_get_durability_replica_ack (kv_durability_t durability)
 Returns the acknowledgement policy in use for the given durability policy. More...
 
kv_error_t kv_create_simple_consistency (kv_consistency_enum type, kv_consistency_t **consistencyp)
 Creates a consistency guarantee used for read operations. More...
 
kv_error_t kv_create_time_consistency (kv_timeout_t time_lag, kv_timeout_t timeout_ms, kv_consistency_t **consistencyp)
 Creates a consistency policy which describes the amount of time the replica is allowed to lag the master. More...
 
kv_error_t kv_create_version_consistency (const kv_version_t *version, kv_timeout_t timeout_ms, kv_consistency_t **consistencyp)
 Creates a consistency policy which ensures that the environment on a replica node is at least as current as denoted by the specified version. More...
 
kv_consistency_enum kv_get_consistency_type (const kv_consistency_t *consistency)
 Identifies the consistency policy type used by the provided policy. More...
 
void kv_release_consistency (kv_consistency_t **consistencyp)
 Releases the resource used by consistency structure. More...
 
kv_error_t kv_create_field_range (const char *field_name, const char *start, kv_boolean_t start_inclusive, const char *end, kv_boolean_t end_inclusive, kv_field_range_t **rangep)
 Creates a range of values to be used in a table or index iteration or multiGet operation. More...
 
void kv_release_field_range (kv_field_range_t **rangep)
 Releases the resources used by the field range handle. More...
 
kv_error_t kv_create_read_options (const kv_consistency_t *consistency, kv_long_t timeout_ms, kv_read_options_t **optionsp)
 Creates and initializes a read options structure to be used for read operations. More...
 
void kv_release_read_options (kv_read_options_t **optionsp)
 Releases the resources use by the read options structure;. More...
 
kv_error_t kv_create_write_options (kv_durability_t durability, kv_long_t timeout_ms, kv_write_options_t **optionsp)
 Creates and initializes a write options structure to be used for write operations. More...
 
void kv_release_write_options (kv_write_options_t **optionsp)
 Releases the resources use by the write options structure. More...
 
kv_row_tkv_create_row ()
 Creates and initializes a row structure. More...
 
kv_error_t kv_row_put_int (kv_row_t *row, const char *name, kv_int_t value)
 Sets an int value for the named field. More...
 
kv_error_t kv_row_put_long (kv_row_t *row, const char *name, kv_long_t value)
 Sets a long value for the named field. More...
 
kv_error_t kv_row_put_float (kv_row_t *row, const char *name, kv_float_t value)
 Sets a float value for the named field. More...
 
kv_error_t kv_row_put_double (kv_row_t *row, const char *name, kv_double_t value)
 Sets a double value for the named field. More...
 
kv_error_t kv_row_put_boolean (kv_row_t *row, const char *name, kv_boolean_t value)
 Sets a boolean value for the named field. More...
 
kv_error_t kv_row_put_string (kv_row_t *row, const char *name, const char *value)
 Sets a string value for the named field. More...
 
kv_error_t kv_row_put_bytes (kv_row_t *row, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_error_t kv_row_put_bytes_copy (kv_row_t *row, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_array_tkv_row_put_array (kv_row_t *row, const char *name)
 Creates an array for the named field. More...
 
kv_array_tkv_row_put_sized_array (kv_row_t *row, const char *name, kv_int_t size)
 Creates an array with initial size for the named field. More...
 
kv_map_tkv_row_put_map (kv_row_t *row, const char *name)
 Creates a map for the named field. More...
 
kv_record_tkv_row_put_record (kv_row_t *row, const char *name)
 Creates a record for the named field. More...
 
kv_error_t kv_row_put_null (kv_row_t *row, const char *name)
 Sets a NULL value for the named field. More...
 
kv_field_t ** kv_row_get_fields (const kv_row_t *row, kv_int_t *num)
 Returns all field values of the given row handle. More...
 
kv_field_tkv_row_get_field (const kv_row_t *row, const char *name)
 Returns the value of the named field in a row. More...
 
const char * kv_field_get_name (const kv_field_t *field)
 Returns the name of a field value. More...
 
kv_field_type_enum kv_field_get_type (const kv_field_t *field)
 Returns the type of a field value. More...
 
kv_boolean_t kv_field_is_null (const kv_field_t *field)
 Returns whether or not a field value is a NULL value. More...
 
kv_error_t kv_field_as_int (const kv_field_t *field, kv_int_t *value)
 Returns an int value for the specified field value. More...
 
kv_error_t kv_field_as_long (const kv_field_t *field, kv_long_t *value)
 Returns a long value for the specified field value. More...
 
kv_error_t kv_field_as_float (const kv_field_t *field, kv_float_t *value)
 Returns a float value for the specified field value. More...
 
kv_error_t kv_field_as_double (const kv_field_t *field, kv_double_t *value)
 Returns a double value for the specified field value. More...
 
kv_error_t kv_field_as_boolean (const kv_field_t *field, kv_boolean_t *value)
 Returns a boolean value for the specified field value. More...
 
kv_error_t kv_field_as_string (const kv_field_t *field, const char **value)
 Returns a string value for the specified field value. More...
 
kv_error_t kv_field_as_bytes (const kv_field_t *field, unsigned char **bytes, kv_int_t *size)
 Returns a byte value for the specified field value. More...
 
kv_error_t kv_field_as_array (const kv_field_t *field, kv_array_t **value)
 Returns an array value handle for the specified field value. More...
 
kv_error_t kv_field_as_map (const kv_field_t *field, kv_map_t **value)
 Returns a map value handle for the specified field value. More...
 
kv_error_t kv_field_as_record (const kv_field_t *field, kv_record_t **value)
 Returns a record value handle for the specified field value. More...
 
kv_error_t kv_row_get_int (const kv_row_t *row, const char *name, kv_int_t *value)
 Returns an int value for the named field in a row. More...
 
kv_error_t kv_row_get_long (const kv_row_t *row, const char *name, kv_long_t *value)
 Returns a long value for the named field in a row. More...
 
kv_error_t kv_row_get_float (const kv_row_t *row, const char *name, kv_float_t *value)
 Returns a float value for the named field in a row. More...
 
kv_error_t kv_row_get_double (const kv_row_t *row, const char *name, kv_double_t *value)
 Returns a double value for the named field in a row. More...
 
kv_error_t kv_row_get_boolean (const kv_row_t *row, const char *name, kv_boolean_t *value)
 Returns a boolean value for the named field in a row. More...
 
kv_error_t kv_row_get_string (const kv_row_t *row, const char *name, const char **value)
 Returns a string value for the named field in a row. More...
 
kv_error_t kv_row_get_bytes (const kv_row_t *row, const char *name, const unsigned char **bytes, kv_int_t *size)
 Returns the byte value of the named field in a row. More...
 
kv_error_t kv_row_get_array (const kv_row_t *row, const char *name, kv_array_t **value)
 Returns the array value handle for the named field in a row. More...
 
kv_error_t kv_row_get_map (const kv_row_t *row, const char *name, kv_map_t **value)
 Returns the map value handle for the named field in a row. More...
 
kv_error_t kv_row_get_record (const kv_row_t *row, const char *name, kv_record_t **value)
 Returns the record value handle for the named field in a row. More...
 
kv_error_t kv_row_set_ttl_of_hours (kv_row_t *row, kv_long_t hours)
 Sets time to live (TTL) using a period of hours for the row. If not set, the table default value will be used. If no expiration time is desired, hours=0 should be used. More...
 
kv_error_t kv_row_set_ttl_of_days (kv_row_t *row, kv_long_t days)
 Sets time to live (TTL) using a period of days for the row. If not set, the table default value will be used. If no expiration time is desired, days=0 should be used. More...
 
kv_error_t kv_row_set_use_table_ttl (kv_row_t *row, kv_boolean_t flag)
 Sets whether to use table default TTL during update. If the flag is KV_TRUE and the operation updates a record, the the record's expiration time will be updated to table default TTL, otherwise the the record's expiration time will not be changed. By default, this property is KV_FALSE. More...
 
kv_long_t kv_row_get_ttl_value (const kv_row_t *row)
 Gets the numeric duration associated with the row. -1 indicates that the row's TTL is not set. More...
 
kv_ttl_timeunit_enum kv_row_get_ttl_timeunit (const kv_row_t *row)
 Gets the kv_ttl_timeunit_enum associated with the row. -1 indicates that the row's TTL is not set. More...
 
kv_boolean_t kv_row_get_use_table_ttl (const kv_row_t *row)
 Gets whether to use table default TTL during update. Returns KV_TRUE if the absolute expiration time will be updated to table default TTL during update operations, otherwise return KV_FALSE. More...
 
kv_error_t kv_copy_row (const kv_row_t *from, kv_row_t **to)
 Copies a row structure. More...
 
void kv_release_row (kv_row_t **rowp)
 Releases the resources used by the row structure. More...
 
kv_error_t kv_array_append_int (kv_array_t *array, kv_int_t value)
 Appends an int value to an array. More...
 
kv_error_t kv_array_append_long (kv_array_t *array, kv_long_t value)
 Appends a long value to an array. More...
 
kv_error_t kv_array_append_float (kv_array_t *array, kv_float_t value)
 Appends a float value to an array. More...
 
kv_error_t kv_array_append_double (kv_array_t *array, kv_double_t value)
 Appends a double value to an array. More...
 
kv_error_t kv_array_append_boolean (kv_array_t *array, kv_boolean_t value)
 Appends a boolean value to an array. More...
 
kv_error_t kv_array_append_string (kv_array_t *array, const char *value)
 Appends a string value to an array. More...
 
kv_error_t kv_array_append_bytes (kv_array_t *array, const unsigned char *bytes, kv_int_t size)
 Appends a byte array value to an array. More...
 
kv_error_t kv_array_append_bytes_copy (kv_array_t *array, const unsigned char *bytes, kv_int_t size)
 Appends a byte array value to an array. More...
 
kv_array_tkv_array_append_array (kv_array_t *array)
 Creates a nested array structure and appends it an array. More...
 
kv_map_tkv_array_append_map (kv_array_t *array)
 Creates a nested map structure and appends it an array. More...
 
kv_record_tkv_array_append_record (kv_array_t *array)
 Creates a nested record structure and appends it an array. More...
 
kv_error_t kv_array_add_int (kv_array_t *array, kv_int_t index, kv_int_t value)
 Inserts an int value at the specified position in an array. More...
 
kv_error_t kv_array_add_long (kv_array_t *array, kv_int_t index, kv_long_t value)
 Inserts a long value at the specified position in an array. More...
 
kv_error_t kv_array_add_float (kv_array_t *array, kv_int_t index, kv_float_t value)
 Inserts a float value at the specified position in an array. More...
 
kv_error_t kv_array_add_double (kv_array_t *array, kv_int_t index, kv_double_t value)
 Inserts a double value at the specified position in an array. More...
 
kv_error_t kv_array_add_boolean (kv_array_t *array, kv_int_t index, kv_boolean_t value)
 Inserts a boolean value at the specified position in an array. More...
 
kv_error_t kv_array_add_string (kv_array_t *array, kv_int_t index, const char *value)
 Inserts a string value at the specified position in an array. More...
 
kv_error_t kv_array_add_bytes (kv_array_t *array, kv_int_t index, const unsigned char *bytes, kv_int_t size)
 Inserts a byte array at the specified position in an array. More...
 
kv_error_t kv_array_add_bytes_copy (kv_array_t *array, kv_int_t index, const unsigned char *bytes, kv_int_t size)
 Inserts a byte array at the specified position in an array. More...
 
kv_array_tkv_array_add_array (kv_array_t *array, kv_int_t index)
 Creates a nested array and inserts it at the specified position in an array. More...
 
kv_array_tkv_array_add_sized_array (kv_array_t *array, kv_int_t index, kv_int_t size)
 Creates a nested array with initial size and inserts it at the specified position in an array. More...
 
kv_map_tkv_array_add_map (kv_array_t *array, kv_int_t index)
 Creates a nested map and inserts it at the specified position in an array. More...
 
kv_record_tkv_array_add_record (kv_array_t *array, kv_int_t index)
 Creates a nested record and inserts it at the specified position in an array. More...
 
kv_int_t kv_array_get_size (const kv_array_t *array)
 Returns the number of element in an array value. More...
 
kv_error_t kv_array_get_int (const kv_array_t *array, kv_int_t index, kv_int_t *value)
 Returns an int value from an array. More...
 
kv_error_t kv_array_get_long (const kv_array_t *array, kv_int_t index, kv_long_t *value)
 Returns a long value from an array. More...
 
kv_error_t kv_array_get_float (const kv_array_t *array, kv_int_t index, kv_float_t *value)
 Returns a float value from an array. More...
 
kv_error_t kv_array_get_double (const kv_array_t *array, kv_int_t index, kv_double_t *value)
 Returns a double value from an array. More...
 
kv_error_t kv_array_get_boolean (const kv_array_t *array, kv_int_t index, kv_boolean_t *value)
 Returns a boolean value from an array. More...
 
kv_error_t kv_array_get_bytes (const kv_array_t *array, kv_int_t index, const unsigned char **bytes, kv_int_t *size)
 Returns a byte array value from an array. More...
 
kv_error_t kv_array_get_string (const kv_array_t *array, kv_int_t index, const char **value)
 Returns a string value from an array. More...
 
kv_error_t kv_array_get_array (const kv_array_t *array, kv_int_t index, kv_array_t **value)
 Returns a nested array value from an array. More...
 
kv_error_t kv_array_get_map (const kv_array_t *array, kv_int_t index, kv_map_t **value)
 Returns a nested map value from an array. More...
 
kv_error_t kv_array_get_record (const kv_array_t *array, kv_int_t index, kv_record_t **value)
 Returns a nested record value from an array. More...
 
kv_error_t kv_array_get_field (const kv_array_t *array, kv_int_t index, kv_field_t **fieldp)
 Returns a field value from an array. More...
 
kv_error_t kv_map_put_int (kv_map_t *map, const char *name, kv_int_t value)
 Sets an int value for the named field. More...
 
kv_error_t kv_map_put_long (kv_map_t *map, const char *name, kv_long_t value)
 Sets a long value for the named field. More...
 
kv_error_t kv_map_put_float (kv_map_t *map, const char *name, kv_float_t value)
 Sets a float value for the named field. More...
 
kv_error_t kv_map_put_double (kv_map_t *map, const char *name, kv_double_t value)
 Sets a double value for the named field. More...
 
kv_error_t kv_map_put_boolean (kv_map_t *map, const char *name, kv_boolean_t value)
 Sets a boolean value for the named field. More...
 
kv_error_t kv_map_put_string (kv_map_t *map, const char *name, const char *value)
 Sets a string value for the named field. More...
 
kv_error_t kv_map_put_bytes (kv_map_t *map, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_error_t kv_map_put_bytes_copy (kv_map_t *map, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_array_tkv_map_put_array (kv_map_t *map, const char *name)
 Creates a nested array for the named field. More...
 
kv_array_tkv_map_put_sized_array (kv_map_t *map, const char *name, kv_int_t size)
 Creates a nested array with initial size for the named field. More...
 
kv_map_tkv_map_put_map (kv_map_t *map, const char *name)
 Creates a nested map for the named field. More...
 
kv_record_tkv_map_put_record (kv_map_t *map, const char *name)
 Creates a nested record for the named field. More...
 
kv_error_t kv_map_put_null (kv_map_t *map, const char *name)
 Sets a NULL value for the named field. More...
 
const char ** kv_map_get_keys (kv_map_t *map, kv_int_t *num)
 Returns all keys in the map. More...
 
kv_error_t kv_map_get_int (const kv_map_t *map, const char *name, kv_int_t *value)
 Returns an int for a named field in a map. More...
 
kv_error_t kv_map_get_long (const kv_map_t *map, const char *name, kv_long_t *value)
 Returns a long for a named field in a map. More...
 
kv_error_t kv_map_get_float (const kv_map_t *map, const char *name, kv_float_t *value)
 Returns a float for a named field in a map. More...
 
kv_error_t kv_map_get_double (const kv_map_t *map, const char *name, kv_double_t *value)
 Returns a double for a named field in a map. More...
 
kv_error_t kv_map_get_boolean (const kv_map_t *map, const char *name, kv_boolean_t *value)
 Returns a boolean for a named field in a map. More...
 
kv_error_t kv_map_get_string (const kv_map_t *map, const char *name, const char **value)
 Returns a string for a named field in a map. More...
 
kv_error_t kv_map_get_bytes (const kv_map_t *map, const char *name, const unsigned char **bytes, kv_int_t *size)
 Returns a bytes value for a named field in a map. More...
 
kv_error_t kv_map_get_array (const kv_map_t *map, const char *name, kv_array_t **value)
 Returns a nested array for a named field in a map. More...
 
kv_error_t kv_map_get_map (const kv_map_t *map, const char *name, kv_map_t **value)
 Returns a nested map for a named field in a map. More...
 
kv_error_t kv_map_get_record (const kv_map_t *map, const char *name, kv_record_t **value)
 Returns a nested record for a named field in a map. More...
 
kv_field_tkv_map_get_field (const kv_map_t *map, const char *name)
 Returns a field value for a named field in a map. More...
 
kv_error_t kv_record_put_int (kv_record_t *record, const char *name, kv_int_t value)
 Sets an int value for the named field. More...
 
kv_error_t kv_record_put_long (kv_record_t *record, const char *name, kv_long_t value)
 Sets a long value for the named field. More...
 
kv_error_t kv_record_put_float (kv_record_t *record, const char *name, kv_float_t value)
 Sets a float value for the named field. More...
 
kv_error_t kv_record_put_double (kv_record_t *record, const char *name, kv_double_t value)
 Sets a double value for the named field. More...
 
kv_error_t kv_record_put_boolean (kv_record_t *record, const char *name, kv_boolean_t value)
 Sets a boolean value for the named field. More...
 
kv_error_t kv_record_put_string (kv_record_t *record, const char *name, const char *value)
 Sets a string value for the named field. More...
 
kv_error_t kv_record_put_bytes (kv_record_t *record, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_error_t kv_record_put_bytes_copy (kv_record_t *record, const char *name, const unsigned char *bytes, kv_int_t size)
 Sets a byte array value for the named field. More...
 
kv_error_t kv_record_put_null (kv_record_t *record, const char *name)
 Sets a NULL value for the named field. More...
 
kv_array_tkv_record_put_array (kv_record_t *record, const char *name)
 Creates a nested array for the named field. More...
 
kv_array_tkv_record_put_sized_array (kv_record_t *record, const char *name, kv_int_t size)
 Creates a nested array with an initial size for the named field. More...
 
kv_map_tkv_record_put_map (kv_record_t *record, const char *name)
 Creates a nested map for the named field. More...
 
kv_record_tkv_record_put_record (kv_record_t *record, const char *name)
 Creates a nested record structure for the given record value. More...
 
kv_error_t kv_record_get_int (const kv_record_t *record, const char *name, kv_int_t *value)
 Returns a int for a named field in a record. More...
 
kv_error_t kv_record_get_long (const kv_record_t *record, const char *name, kv_long_t *value)
 Returns a long for a named field in a record. More...
 
kv_error_t kv_record_get_float (const kv_record_t *record, const char *name, kv_float_t *value)
 Returns a float for a named field in a record. More...
 
kv_error_t kv_record_get_double (const kv_record_t *record, const char *name, kv_double_t *value)
 Returns a double for a named field in a record. More...
 
kv_error_t kv_record_get_boolean (const kv_record_t *record, const char *name, kv_boolean_t *value)
 Returns a boolean for a named field in a record. More...
 
kv_error_t kv_record_get_string (const kv_record_t *record, const char *name, const char **value)
 Returns a string for a named field in a record. More...
 
kv_error_t kv_record_get_bytes (const kv_record_t *record, const char *name, const unsigned char **bytes, kv_int_t *size)
 Returns a byte array value for a named field in a record. More...
 
kv_error_t kv_record_get_array (const kv_record_t *record, const char *name, kv_array_t **value)
 Returns a nested array for a named field in a record. More...
 
kv_error_t kv_record_get_map (const kv_record_t *record, const char *name, kv_map_t **value)
 Returns a nested map for a named field in a record. More...
 
kv_error_t kv_record_get_record (const kv_record_t *record, const char *name, kv_record_t **value)
 Returns a nested record for a named field in a record. More...
 
kv_field_tkv_record_get_field (const kv_record_t *record, const char *name)
 Returns a field handle from a record by name. More...
 
kv_field_t ** kv_record_get_fields (kv_record_t *record, kv_int_t *num)
 Returns all field values in a record. More...
 
kv_error_t kv_future_get (kv_future_t *future, const kv_statement_result_t **resultp)
 Block until the command represented by this future completes. More...
 
kv_error_t kv_future_get_with_timeout (kv_future_t *future, kv_timeout_t timeout_ms, const kv_statement_result_t **resultp)
 Block until the administrative operation has finished or the timeout period is exceeded. More...
 
kv_boolean_t kv_future_cancel (kv_future_t *future, kv_boolean_t may_interrupt_if_running)
 Attempts to cancel execution of this statement. More...
 
kv_error_t kv_future_get_execution_id (kv_future_t *future, kv_execution_id_t **idp)
 Serializes the future handle. More...
 
kv_boolean_t kv_future_is_cancelled (kv_future_t *future)
 Returns KV_TRUE if the operation was cancelled. The cancellation may still be in progress, and the operation may still be running. More...
 
kv_boolean_t kv_future_is_done (kv_future_t *future)
 Returns KV_TRUE if the operation has been terminated. More...
 
const kv_statement_result_tkv_future_get_last_status (kv_future_t *future)
 Returns information about the execution of the statement. More...
 
kv_error_t kv_future_update_status (kv_future_t *future, const kv_statement_result_t **resultp)
 Returns information about the execution of the statement. More...
 
const char * kv_future_get_statement (kv_future_t *future)
 Returns the statement which has been executed. More...
 
void kv_release_future (kv_future_t **futurep)
 Releases the resource used by future structure. More...
 
void kv_release_execution_id (kv_execution_id_t **idp)
 Releases the resource used by execution id. More...
 
kv_int_t kv_statement_result_get_plan_id (const kv_statement_result_t *result)
 Returns the administrative plan id for this operation if the operation was a create or remove table, a create or remove index, or an alter table. More...
 
const char * kv_statement_result_get_error_message (const kv_statement_result_t *result)
 Returns a description of the problem if the execution is failed. More...
 
const char * kv_statement_result_get_info (const kv_statement_result_t *result)
 Returns detailed information about the execution of the statement in human readable form. More...
 
const char * kv_statement_result_get_info_as_json (const kv_statement_result_t *result)
 Returns detailed information about the execution of the statement in JSON format. More...
 
const char * kv_statement_result_get_result (const kv_statement_result_t *result)
 Returns a text result if the statement result is text and the operation was successful, otherwise returns NULL. More...
 
kv_boolean_t kv_statement_result_is_successful (const kv_statement_result_t *result)
 Identifies if the statement has finished and was successful. More...
 
kv_boolean_t kv_statement_result_is_cancelled (const kv_statement_result_t *result)
 Identifies if the statement has been cancelled, this is the equivalent of kv_future_is_cancelled(). More...
 
kv_boolean_t kv_statement_result_is_done (const kv_statement_result_t *result)
 Identifies if the statement has finished, this is the equivalent of kv_future_is_done(). More...
 
void kv_release_statement_result (kv_statement_result_t **resultp)
 Releases the resource used by statement result structure. More...
 
const char * kv_get_last_error (const kv_store_t *store)
 
const char * kv_get_open_error ()
 
void kv_set_debug_output (kv_output_func func)
 

Detailed Description

This file contains the C interface to the Oracle NoSQL Database.

Macro Definition Documentation

#define KV_ANONYMOUS   "[]"

A constant used as a map key when creating a map value to be used in a index iteration over a map index.

#define KV_DURABILITY_COMMIT_NO_SYNC   (KV_SYNC_NONE | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))

A convenience constant that defines a durability policy with COMMIT_NO_SYNC for Master and Replica commit synchronization, and a replica ack policy of simple majority.

#define KV_DURABILITY_COMMIT_SYNC   (KV_SYNC_FLUSH | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))

A convenience constant that defines a durability policy with COMMIT_SYNC for Master commit synchronization, COMMIT_NO_SYNC for replicas, and a replica ack policy of simple majority.

#define KV_DURABILITY_COMMIT_WRITE_NO_SYNC   (KV_SYNC_WRITE_NO_SYNC | (KV_SYNC_NONE << 8) | (KV_ACK_MAJORITY << 16))

A convenience constant that defines a durability policy with COMMIT_WRITE_NO_SYNC for Master commit synchronization, COMMIT_NO_SYNC for replicas, and a replica ack policy of simple majority.

Typedef Documentation

typedef struct arraylist_impl kv_array_t

Array value

typedef struct config_impl kv_config_t

Store configuration

typedef struct consistency_impl kv_consistency_t

Consistency

typedef double kv_double_t

Double type

typedef int kv_durability_t

Durability

typedef struct field_range_impl kv_field_range_t

Field range

typedef struct field_impl kv_field_t

Field value

typedef float kv_float_t

Float type

typedef struct future_impl kv_future_t

Execution future

typedef int kv_int_t

Integer type

typedef struct iterator_impl kv_iterator_t

Iterator

typedef long long kv_long_t

Long type

typedef struct hashmap_impl kv_map_t

Map value

typedef struct operation_results_impl kv_operation_results_t

Operation results

typedef struct operations_impl kv_operations_t

Operations

typedef void(* kv_output_func) (const char *)

Function to output debug information from thrift library

typedef struct proxy_config_impl kv_proxy_config_t

Store configuration

typedef struct read_options_impl kv_read_options_t

Read options

typedef struct hashmap_impl kv_record_t

Record value

typedef struct result_impl kv_result_t

Operation result

typedef struct row_impl kv_row_t

Row

typedef struct statement_result_impl kv_statement_result_t

Statement execution result

typedef struct store_impl kv_store_t

Store handle

typedef long long kv_timeout_t

Timeout

typedef struct version_impl kv_version_t

Version

typedef struct write_options_impl kv_write_options_t

Write options

Enumeration Type Documentation

Replica ack policy

Enumerator
KV_ACK_ALL 

All replicas must acknowledge that they have committed the transaction.

KV_ACK_NONE 

No transaction commit acknowledgments are required and the master will never wait for replica acknowledgments.

KV_ACK_MAJORITY 

A simple majority of replicas must acknowledge that they have committed the transaction.

boolean value

Enumerator
KV_FALSE 

FALSE

KV_TRUE 

TRUE

Consistency policy type for read operations

Enumerator
KV_CONSISTENCY_ABSOLUTE 

A consistency policy that requires a read transaction be serviced on the Master so that consistency is absolute.

KV_CONSISTENCY_NONE 

A consistency policy that allows a read transaction performed at a Replica to proceed regardless of the state of the Replica relative to the Master.

KV_CONSISTENCY_TIME 

A consistency policy which describes the amount of time the Replica is allowed to lag the Master.

KV_CONSISTENCY_VERSION 

A consistency policy which ensures that the environment on a Replica node is at least as current as that used by the Value.

KV_CONSISTENCY_NONE_NO_MASTER 

A consistency policy that requires a read operation be serviced on a replica; never the Master.

Iterator direction is used with iterator operations to specify the order that results are returned. Not all values are valid with all operations. Index iterations can accept any of these values. Normal table iterations will not accept forward or reverse values unless all of the fields in the table's shard key have values in the primary key used for the iteration.

Enumerator
KV_DIRECTION_FORWARD 

Iterate in ascending key order.

KV_DIRECTION_REVERSE 

Iterate in descending key order.

KV_DIRECTION_UNORDERED 

Iterate in no particular key order.

enum kv_error_t

Error code:

  • Success: 0
  • Warning: a positive error code
  • Error: a negative error code
Enumerator
KV_SUCCESS 

SUCCESS

KV_ROW_ALREADY_EXISTS 

The row exists

KV_ROW_NOT_FOUND 

There is no matching row

KV_VERSION_NOT_MATCH 

The versions do not match

KV_ERROR_OPEN_STORE 

Failed to open a store

KV_INVALID_ARGUMENT 

Invalid argument

KV_INVALID_STORE 

Invalid store handle

KV_NO_MEMORY 

Out of memory

KV_NO_SUCH_OBJECT 

The specified object doesn't exist

KV_FIELD_CAST_INCOMPATIBLE 

Invalid type cast

KV_FIELD_INVALID_TYPE 

The field type is not allowed for the operation

KV_FIELD_NOT_EXISTS 

The field does not exist

KV_ERROR_JSON_PARSE 

JSON parser error

KV_CANCELLATION 

Cancellation Exception

KV_CONSISTENCY 

Consistency Exception

KV_DURABILITY 

Durability Exception

KV_ERROR_THRIFT 

Thrift error

KV_EXECUTION 

Execution Exception

KV_FAULT 

Fault Exception

KV_ILLEGAL_ARGUMENT 

IllegalArgument Exception

KV_INTERRUPTTED 

Interrupted Exception

KV_INTERRUPTED 

Interrupted Exception

KV_ITERATOR_TIMEOUT 

IteratorTimeout Exception

KV_TABLE_OP_EXECUTION 

TableOpExecution Exception

KV_PROXY 

Proxy Exception

KV_REQUEST_TIMEOUT 

RequestTimeout Exception

KV_TIMEOUT 

Timeout Exception

KV_ERROR_START_PROXY 

Failed to start the local proxy

KV_ERROR_SHUTDOWN_PROXY 

Failed to shutdown the local proxy

KV_ERROR_UNKNOWN 

Unknown error

Field type

Enumerator
FIELD_TYPE_INT 

Int type

FIELD_TYPE_LONG 

Long type

FIELD_TYPE_FLOAT 

Float type

FIELD_TYPE_DOUBLE 

Double type

FIELD_TYPE_STRING 

String type

FIELD_TYPE_BOOLEAN 

Boolean type

FIELD_TYPE_BYTES 

Bytes type

FIELD_TYPE_ARRAY 

Array type

FIELD_TYPE_MAP 

Map type

FIELD_TYPE_RECORD 

Record type

FIELD_TYPE_NULL 

Null value

Operation type, used for batched update operations

Enumerator
KV_OP_DELETE 

Delete operation.

KV_OP_DELETE_IF_VERSION 

DeleteIfVersion operation

KV_OP_PUT 

Put operation.

KV_OP_PUT_IF_ABSENT 

PutIFAbsent operation

KV_OP_PUT_IF_PRESENT 

PutIFPresent operation

KV_OP_PUT_IF_VERSION 

PutIFVersion operation

Return row choice. This allows the application to get the previous state of rows during an update operation. Acquiring this state has cost and unless it is necessary for the application it is more efficient to avoid use of this information.

Enumerator
KV_RETURN_ROW_NONE 

Don't return value or version.

KV_RETURN_ROW_ALL 

Return both the value and the version.

KV_RETURN_ROW_VALUE 

Return the value only.

KV_RETURN_ROW_VERSION 

Return the version only.

Master and Replica sync policy

Enumerator
KV_SYNC_NONE 

Do not write or synchronously flush the log on transaction commit.

KV_SYNC_FLUSH 

Write and synchronously flush the log on transaction commit.

KV_SYNC_WRITE_NO_SYNC 

Write but do not synchronously flush the log on transaction commit.

TimeToLive time unit

Enumerator
HOURS 

Timeunit in hours.

DAYS 

Timeunit is days.