quasardb C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Functions
properties.h File Reference
#include "client.h"

Functions

QDB_API_LINKAGE qdb_error_t qdb_user_properties_put (qdb_handle_t handle, const char *prop, const char *value)
 Creates an user property with the provided name and value. The user property may be sent to the server alongside requests. Properties are used for debugging, diagnostics, and monitoring. More...
 
QDB_API_LINKAGE qdb_error_t qdb_user_properties_update (qdb_handle_t handle, const char *prop, const char *value)
 Updates or creates an user property with the provided name and value. The user property may be sent to the server alongside requests. Properties are used for debugging, diagnostics, and monitoring. More...
 
QDB_API_LINKAGE qdb_error_t qdb_user_properties_get (qdb_handle_t handle, const char *prop, const char **value)
 Gets the value associated to the provided user property. If the property does not exist, the function will fail and return qdb_e_alias_not_found. More...
 
QDB_API_LINKAGE qdb_error_t qdb_user_properties_remove (qdb_handle_t handle, const char *prop)
 Removes the value the specified user property. If the property does not exist, the function will fail. More...
 
QDB_API_LINKAGE qdb_error_t qdb_user_properties_remove_all (qdb_handle_t handle)
 Removes all user-defined properties. System defined properties may still be present. More...
 

Function Documentation

QDB_API_LINKAGE qdb_error_t qdb_user_properties_get ( qdb_handle_t  handle,
const char *  prop,
const char **  value 
)

Gets the value associated to the provided user property. If the property does not exist, the function will fail and return qdb_e_alias_not_found.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
propA pointer to a null-terminated UTF-8 string representing the name of the property. Cannot be longer than qdb_max_property_length.
[out]valueA pointer to a pointer that will be set to a function-allocated buffer holding the property's content. That allocated buffer must be freed using qdb_release.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_user_properties
qdb_release
QDB_API_LINKAGE qdb_error_t qdb_user_properties_put ( qdb_handle_t  handle,
const char *  prop,
const char *  value 
)

Creates an user property with the provided name and value. The user property may be sent to the server alongside requests. Properties are used for debugging, diagnostics, and monitoring.

No more than 32 different properties can exist at the same time.

The property name and value are copied into internal buffers and don't need to be maintained by the caller.

If the property does not exist, the function will create the property. If the property already exists, the function will fail.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
propA pointer to a null-terminated UTF-8 string representing the name of the property. Cannot be longer than qdb_max_property_length.
valueA pointer to a null-terminated UTF-8 string representing the value of the property. Cannot be longer than qdb_max_property_length.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_user_properties
QDB_API_LINKAGE qdb_error_t qdb_user_properties_remove ( qdb_handle_t  handle,
const char *  prop 
)

Removes the value the specified user property. If the property does not exist, the function will fail.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
propA pointer to a null-terminated UTF-8 string representing the name of the property. Cannot be longer than qdb_max_property_length.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_user_properties
QDB_API_LINKAGE qdb_error_t qdb_user_properties_remove_all ( qdb_handle_t  handle)

Removes all user-defined properties. System defined properties may still be present.

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_user_properties_update ( qdb_handle_t  handle,
const char *  prop,
const char *  value 
)

Updates or creates an user property with the provided name and value. The user property may be sent to the server alongside requests. Properties are used for debugging, diagnostics, and monitoring.

No more than 32 different properties can exist at the same time.

The property name and value are copied into internal buffers and don't need to be maintained by the caller.

If the property does not exist, the function will create the property. If the property already exists, the function will update the property value.

Parameters
handleA valid handle previously initialized by qdb_open or qdb_open_tcp.
propA pointer to a null-terminated UTF-8 string representing the name of the property. Cannot be longer than qdb_max_property_length.
valueA pointer to a null-terminated UTF-8 string representing the value of the property. Cannot be longer than qdb_max_property_length.
Returns
A qdb_error_t code indicating success or failure.
See Also
qdb_option_enable_user_properties