quasardb C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Typedefs | Enumerations | Functions
Options

Typedefs

typedef enum qdb_compression_t qdb_compression_t
 An enumeration of compression parameters. More...
 
typedef enum qdb_encryption_t qdb_encryption_t
 An enumeration of encryption parameters. More...
 

Enumerations

enum  qdb_compression_t { qdb_comp_none = 0, qdb_comp_fast = 1, qdb_comp_best = 2, qdb_comp_balanced = 3 }
 An enumeration of compression parameters. More...
 
enum  qdb_encryption_t { qdb_crypt_none = 0, qdb_crypt_aes_gcm_256, qdb_crypt_aegis_256 = 2 }
 An enumeration of encryption parameters. More...
 

Functions

QDB_API_LINKAGE qdb_error_t qdb_option_set_timeout (qdb_handle_t handle, int timeout_ms)
 Sets the timeout of all network operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_timeout (qdb_handle_t handle, int *timeout_ms)
 Gets the timeout of all network operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_in_buf_size (qdb_handle_t handle, size_t max_size)
 Sets the maximum incoming buffer size for all network operations of the client. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_in_buf_size (qdb_handle_t handle, size_t *max_size)
 Gets the maximum incoming buffer size for all network operations of the client. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_cluster_max_in_buf_size (qdb_handle_t handle, size_t *max_size)
 Gets the maximum incoming buffer size for all network operations of the remote cluster. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_stabilization_max_wait (qdb_handle_t handle, int wait_ms)
 Sets the maximum stabilization waiting time for operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_stabilization_max_wait (qdb_handle_t handle, int *wait_ms)
 Gets the maximum stabilization waiting time for operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_transaction_max_wait (qdb_handle_t handle, int wait_ms)
 Sets the maximum transaction retry time for operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_transaction_max_wait (qdb_handle_t handle, int *wait_ms)
 Gets the maximum transaction retry time for operations. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_max_cardinality (qdb_handle_t handle, qdb_uint_t max_cardinality)
 Sets the maximum allowed cardinality of a quasardb query. The default value is 100'003. The minimum allowed value is 100. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_parallelism (qdb_handle_t handle, qdb_size_t thread_count)
 Sets the number of threads that can be used by the client to parallelize processing. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_parallelism (qdb_handle_t handle, qdb_size_t *thread_count)
 Sets the number of threads that can be used by the client to parallelize processing. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_batch_load (qdb_handle_t handle, qdb_size_t shard_count)
 Sets the maximum load per batch sent while executing queries by the current handle. This is a soft limit and is not strictly enforced. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_batch_load (qdb_handle_t handle, qdb_size_t *thread_count)
 Gets the maximum load per batch sent while executing executing queries by the current handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_load_balancing (qdb_handle_t handle, int *is_enabled)
 Gets the state of the load-balancing. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_enable_client_load_balancing (qdb_handle_t handle)
 Enables load-balancing for all threads using the handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_disable_client_load_balancing (qdb_handle_t handle)
 Disables load-balancing for all threads using the handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_enable_user_properties (qdb_handle_t handle)
 Enables user properties for all threads using the handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_disable_user_properties (qdb_handle_t handle)
 Disables user properties for all threads using the handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_compression (qdb_handle_t handle, qdb_compression_t comp_level)
 Set the compression level for all future messages emitted by the specified handle. Regardless of this parameter, the API will be able to read whatever compression the server uses. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_encryption (qdb_handle_t handle, qdb_encryption_t encryption)
 Set the encryption method for all future messages emitted by the specified handle. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_cluster_public_key (qdb_handle_t handle, const char *public_key)
 Set the public key of the cluster used for authentification of nodes on connection. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_user_credentials (qdb_handle_t handle, const char *user_name, const char *private_key)
 Set the user credentials (name and private key) used for authentification of the user on connection. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_load_security_files (qdb_handle_t handle, const char *cluster_public_key_file, const char *user_credentials_file)
 Set the user credentials and cluster public key used for authentification of the user on connection. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_ts_batch_push_async_timeout (qdb_handle_t handle, int timeout_ms)
 Sets the timeout of qdb_ts_batch_push_async operation. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_ts_batch_push_async_timeout (qdb_handle_t handle, int *timeout_ms)
 Gets the timeout of qdb_ts_batch_push_async operation. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_cluster_enable_auto_compaction (qdb_handle_t handle)
 Enables automatic compactions in the cluster's persistence. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_cluster_disable_auto_compaction (qdb_handle_t handle)
 Disables automatic compactions in the cluster's persistence. Manual compaction is still possible. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_query_max_length (qdb_handle_t handle, qdb_size_t max_query_length)
 Sets the maximum length of query strings. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_query_max_length (qdb_handle_t handle, qdb_size_t *max_query_length)
 Gets the maximum length of query strings. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_timezone (qdb_handle_t handle, const char *timezone)
 Sets the timezone of the client. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_timezone (qdb_handle_t handle, const char **timezone)
 Gets the timezone of the client. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_set_connection_per_address_soft_limit (qdb_handle_t handle, qdb_size_t max_count)
 Sets the maximum number of connections for a given IP address that this handle should have. The value is not strictly enforced and may be temporarily exceeded. More...
 
QDB_API_LINKAGE qdb_error_t qdb_option_get_connection_per_address_soft_limit (qdb_handle_t handle, qdb_size_t *max_count)
 Gets the current the maximum number of connections for a given IP address that this handle should have. More...
 

Detailed Description

Typedef Documentation

An enumeration of compression parameters.

See Also
qdb_option_set_compression

An enumeration of encryption parameters.

See Also
qdb_option_set_encryption

Enumeration Type Documentation

An enumeration of compression parameters.

See Also
qdb_option_set_compression
Enumerator
qdb_comp_none 

No compression This is currently the default.

qdb_comp_fast 

Maximum compression speed, potentially minimum compression ratio. This is no longer available.

qdb_comp_best 

Maximum compression ratio, potentially minimum compression speed. This is currently not implemented.

qdb_comp_balanced 

Balanced compression for speed and efficiency, recommended value. Not enabled by default for backward compatibility reasons.

An enumeration of encryption parameters.

See Also
qdb_option_set_encryption
Enumerator
qdb_crypt_none 

No encryption.

qdb_crypt_aes_gcm_256 

AEC-GCM 256-bit encryption (deprecated as of 3.14.2).

qdb_crypt_aegis_256 

AEGIS 256-bit encryption.

Function Documentation

QDB_API_LINKAGE qdb_error_t qdb_option_cluster_disable_auto_compaction ( qdb_handle_t  handle)

Disables automatic compactions in the cluster's persistence. Manual compaction is still possible.

Returns
A qdb_error_t code indicating success or failure.
See Also
A qdb_option_cluster_enable_auto_compaction
QDB_API_LINKAGE qdb_error_t qdb_option_cluster_enable_auto_compaction ( qdb_handle_t  handle)

Enables automatic compactions in the cluster's persistence.

Returns
A qdb_error_t code indicating success or failure.
See Also
A qdb_option_cluster_disable_auto_compaction
QDB_API_LINKAGE qdb_error_t qdb_option_disable_client_load_balancing ( qdb_handle_t  handle)

Disables load-balancing for all threads using the handle.

By default the client will not use automatic load-balancing.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_client_load_balancing
QDB_API_LINKAGE qdb_error_t qdb_option_disable_user_properties ( qdb_handle_t  handle)

Disables user properties for all threads using the handle.

By default the client will not be sending any user properties to the server. User properties are used to give more context to the server for debugging purposes.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_user_properties
QDB_API_LINKAGE qdb_error_t qdb_option_enable_client_load_balancing ( qdb_handle_t  handle)

Enables load-balancing for all threads using the handle.

By default the client will not use automatic load-balancing.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_disable_client_load_balancing
QDB_API_LINKAGE qdb_error_t qdb_option_enable_user_properties ( qdb_handle_t  handle)

Enables user properties for all threads using the handle.

By default the client will not be sending any user properties to the server. User properties are used to give more context to the server for debugging purposes.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_disable_user_properties
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_load_balancing ( qdb_handle_t  handle,
int *  is_enabled 
)

Gets the state of the load-balancing.

By default the client will not use automatic load-balancing.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
[out]is_enabledA pointer to variable that will receive an integer indicating whether the load-balacing is enabled (positive) or disabled (zero).
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_disable_client_load_balancing
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_batch_load ( qdb_handle_t  handle,
qdb_size_t thread_count 
)

Gets the maximum load per batch sent while executing executing queries by the current handle.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp
[out]thread_countA pointer to variable that will receive the number of threads.
Returns
A qdb_error_t code indicating success or failure.
Remarks
Improper usage of this function may cause performance issues.
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_in_buf_size ( qdb_handle_t  handle,
size_t *  max_size 
)

Gets the maximum incoming buffer size for all network operations of the client.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
max_sizeA pointer that will receive the current maximum incoming buffer size.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_client_max_parallelism ( qdb_handle_t  handle,
qdb_size_t thread_count 
)

Sets the number of threads that can be used by the client to parallelize processing.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp
[out]thread_countA pointer to variable that will receive the number of threads.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_cluster_max_in_buf_size ( qdb_handle_t  handle,
size_t *  max_size 
)

Gets the maximum incoming buffer size for all network operations of the remote cluster.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
max_sizeA pointer that will receive the current maximum incoming buffer size.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_connection_per_address_soft_limit ( qdb_handle_t  handle,
qdb_size_t max_count 
)

Gets the current the maximum number of connections for a given IP address that this handle should have.

Parameters
handleThe handle on which to get the limit.
[out]max_countA pointer to an integer that will receive the current value of the maximum number of connections for a given IP address.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_query_max_length ( qdb_handle_t  handle,
qdb_size_t max_query_length 
)

Gets the maximum length of query strings.

Parameters
handleThe handle on which to get the maximum query length
[out]max_query_lengthA pointer to the maximum length of query strings
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_stabilization_max_wait ( qdb_handle_t  handle,
int *  wait_ms 
)

Gets the maximum stabilization waiting time for operations.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
[out]wait_msA pointer to the variable that will receive the waiting value, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_timeout ( qdb_handle_t  handle,
int *  timeout_ms 
)

Gets the timeout of all network operations.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
[out]timeout_msA pointer to the variable that will receive the timeout value, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_timezone ( qdb_handle_t  handle,
const char **  timezone 
)

Gets the timezone of the client.

Parameters
handleThe handle on which to get the timezone
[out]timezoneA pointer to a pointer that will be API allocated and point to a null terminated string representing the timezone name. The buffer will need to be released by the caller with qdb_release.
Returns
A qdb_error_t code indicating success or failure.
Remarks
The timezone is in the format "Continent/City".
QDB_API_LINKAGE qdb_error_t qdb_option_get_transaction_max_wait ( qdb_handle_t  handle,
int *  wait_ms 
)

Gets the maximum transaction retry time for operations.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
[out]wait_msA pointer to the variable that will receive the waiting value, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_get_ts_batch_push_async_timeout ( qdb_handle_t  handle,
int *  timeout_ms 
)

Gets the timeout of qdb_ts_batch_push_async operation.

Parameters
handleThe handle on which to get the batch async push timeout
[out]timeout_msA pointer to the timeout, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_ts_batch_push_async.
QDB_API_LINKAGE qdb_error_t qdb_option_load_security_files ( qdb_handle_t  handle,
const char *  cluster_public_key_file,
const char *  user_credentials_file 
)

Set the user credentials and cluster public key used for authentification of the user on connection.

Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_batch_load ( qdb_handle_t  handle,
qdb_size_t  shard_count 
)

Sets the maximum load per batch sent while executing queries by the current handle. This is a soft limit and is not strictly enforced.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp
shard_countNumber of shards. Value of 0 means no maximum.
Returns
A qdb_error_t code indicating success or failure.
Remarks
Improper usage of this function may cause performance issues.
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_in_buf_size ( qdb_handle_t  handle,
size_t  max_size 
)

Sets the maximum incoming buffer size for all network operations of the client.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
max_sizeThe maximum input size in bytes
Returns
A qdb_error_t code indicating success or failure.
Remarks
Only modify this setting if you expect to receive very large answers from the server.
QDB_API_LINKAGE qdb_error_t qdb_option_set_client_max_parallelism ( qdb_handle_t  handle,
qdb_size_t  thread_count 
)

Sets the number of threads that can be used by the client to parallelize processing.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp
thread_countNumber of threads. Value of 0 means the number of logical processor cores divided by two.
Returns
A qdb_error_t code indicating success or failure.
Remarks
Improper usage of this function may cause performance issues. This function is NOT thread-safe and MUST be called before calling qdb_connect.

No guarantee is made that processing will be parallelized to the number of specified threads .

QDB_API_LINKAGE qdb_error_t qdb_option_set_cluster_public_key ( qdb_handle_t  handle,
const char *  public_key 
)

Set the public key of the cluster used for authentification of nodes on connection.

Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_set_compression ( qdb_handle_t  handle,
qdb_compression_t  comp_level 
)

Set the compression level for all future messages emitted by the specified handle. Regardless of this parameter, the API will be able to read whatever compression the server uses.

Parameters
handleThe handle on which to set the compression level
comp_levelThe compression level to use
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_compression_t
Remarks
For better performance, consider disabling compression if your data is already compressed.
QDB_API_LINKAGE qdb_error_t qdb_option_set_connection_per_address_soft_limit ( qdb_handle_t  handle,
qdb_size_t  max_count 
)

Sets the maximum number of connections for a given IP address that this handle should have. The value is not strictly enforced and may be temporarily exceeded.

Parameters
handleThe handle on which to set the limit.
max_countThe maximum number of connections for a given IP address.
Returns
A qdb_error_t code indicating success or failure.
Remarks
This is an advanced network configuration setting that needs to be touched only in very specific cases.
QDB_API_LINKAGE qdb_error_t qdb_option_set_encryption ( qdb_handle_t  handle,
qdb_encryption_t  encryption 
)

Set the encryption method for all future messages emitted by the specified handle.

See Also
qdb_encryption_t
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_set_max_cardinality ( qdb_handle_t  handle,
qdb_uint_t  max_cardinality 
)

Sets the maximum allowed cardinality of a quasardb query. The default value is 100'003. The minimum allowed value is 100.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp
max_cardinalityThe maximum cardinality of a query.
Returns
A qdb_error_t code indicating success or failure.
Remarks
Improper usage of this function may cause a denial of service on the client.
QDB_API_LINKAGE qdb_error_t qdb_option_set_query_max_length ( qdb_handle_t  handle,
qdb_size_t  max_query_length 
)

Sets the maximum length of query strings.

Parameters
handleThe handle on which to set the maximum query length
max_query_lengthThe maximum length of query strings
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_set_stabilization_max_wait ( qdb_handle_t  handle,
int  wait_ms 
)

Sets the maximum stabilization waiting time for operations.

This value has no impact for operations on a stable cluster. It must higher than the timeout value.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
wait_msThe maximum amount of time to wait, in ms.
Returns
A qdb_error_t code indicating success or failure.
Remarks
The lower the value, the higher the chance of having "cluster unstable" errors
QDB_API_LINKAGE qdb_error_t qdb_option_set_timeout ( qdb_handle_t  handle,
int  timeout_ms 
)

Sets the timeout of all network operations.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
timeout_msThe timeout of network operation, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
Remarks
The lower the timeout, the higher the risk of having timeout errors.
QDB_API_LINKAGE qdb_error_t qdb_option_set_timezone ( qdb_handle_t  handle,
const char *  timezone 
)

Sets the timezone of the client.

Parameters
handleThe handle on which to set the timezone.
timezoneA pointer to a null terminated string representing the timezone to set.
Returns
A qdb_error_t code indicating success or failure.
QDB_API_LINKAGE qdb_error_t qdb_option_set_transaction_max_wait ( qdb_handle_t  handle,
int  wait_ms 
)

Sets the maximum transaction retry time for operations.

This value has no impact when transaction do not conflict.

Parameters
handleThe qdb_handle_t that was initialized with qdb_open or qdb_open_tcp.
wait_msThe maximum amount of time to wait, in ms.
Returns
A qdb_error_t code indicating success or failure.
Remarks
The lower the value, the higher the chance of having "conflicting transactions" errors.
QDB_API_LINKAGE qdb_error_t qdb_option_set_ts_batch_push_async_timeout ( qdb_handle_t  handle,
int  timeout_ms 
)

Sets the timeout of qdb_ts_batch_push_async operation.

Parameters
handleThe handle on which to set the batch async push timeout
timeout_msThe timeout to set, in milliseconds.
Returns
A qdb_error_t code indicating success or failure.
Remarks
The lower the timeout, the higher the risk of having timeout errors.
See Also
qdb_ts_batch_push_async.
QDB_API_LINKAGE qdb_error_t qdb_option_set_user_credentials ( qdb_handle_t  handle,
const char *  user_name,
const char *  private_key 
)

Set the user credentials (name and private key) used for authentification of the user on connection.

Returns
A qdb_error_t code indicating success or failure.