|
quasardb C API
|
Functions | |
| QDB_API_LINKAGE qdb_error_t | qdb_double_put (qdb_handle_t handle, const char *alias, double value, qdb_time_t expiry_time) |
| Creates a new double-precision floating point number. More... | |
| QDB_API_LINKAGE qdb_error_t | qdb_double_update (qdb_handle_t handle, const char *alias, double integer, qdb_time_t expiry_time) |
| Creates or updates a double-precision floating point number. More... | |
| QDB_API_LINKAGE qdb_error_t | qdb_double_add (qdb_handle_t handle, const char *alias, double addend, double *result) |
| Atomically increases or decreases a double-precision floating point number. More... | |
| QDB_API_LINKAGE qdb_error_t qdb_double_add | ( | qdb_handle_t | handle, |
| const char * | alias, | ||
| double | addend, | ||
| double * | result | ||
| ) |
Atomically increases or decreases a double-precision floating point number.
The specified entry will be atomically increased (or decreased) according to the given addend value:
The function return the result of the operation.
The entry must already exist. If the entry is not a double, the function will return qdb_e_incompatible_type.
| handle | A valid handle previously initialized by qdb_open or qdb_open_tcp. |
| alias | A pointer to a null-terminated UTF-8 string representing the alias of the entry. |
| addend | The value to add to the existing value. |
| result | A pointer to a double that will receive the current value of the entry, if successful. |
| QDB_API_LINKAGE qdb_error_t qdb_double_put | ( | qdb_handle_t | handle, |
| const char * | alias, | ||
| double | value, | ||
| qdb_time_t | expiry_time | ||
| ) |
Creates a new double-precision floating point number.
Atomically creates an entry of the given alias and sets it to a cross-platform double-precision floating point number. If the entry already exists, the function returns an error.
You can specify an expiry or use qdb_never_expires if you don't want the entry to expire.
If you want to create or update an entry use qdb_double_update.
The value will be correctly translated independently of the endianness of the client's platform.
| handle | A valid handle previously initialized by qdb_open or qdb_open_tcp. |
| alias | A pointer to a null-terminated UTF-8 string representing the alias of the entry. |
| value | The value to which the number must be set. |
| expiry_time | An optional absolute expiry time expressed in UTC UNIX epoch. |
| QDB_API_LINKAGE qdb_error_t qdb_double_update | ( | qdb_handle_t | handle, |
| const char * | alias, | ||
| double | integer, | ||
| qdb_time_t | expiry_time | ||
| ) |
Creates or updates a double-precision floating point number.
Atomically updates an entry of the given alias to the provided value. If the entry doesn't exist, it will be created. If the entry is not an integer, the function will return qdb_e_incompatible_type.
You can specify an expiry time or use qdb_never_expires if you don't want the entry to expire.
| handle | A valid handle previously initialized by qdb_open or qdb_open_tcp. |
| alias | A pointer to a null-terminated UTF-8 string representing the alias of the entry. |
| integer | The value to which the integer must be set. |
| expiry_time | An optional absolute expiry time expressed in UTC UNIX epoch. |
1.8.5