![]() |
Aerospike provides a key based API to access and modify data into the cluster.
The Key API is a collection of APIs that use as_key as for looking up records for accessing and modifying in the cluster.
AS_EXTERN as_status aerospike_key_apply | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_apply * | policy, | ||
const as_key * | key, | ||
const char * | module, | ||
const char * | function, | ||
as_list * | arglist, | ||
as_val ** | result ) |
Lookup a record by key, then apply the UDF.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
module | The module containing the function to execute. |
function | The function to execute. |
arglist | The arguments for the function. |
result | The return value from the function. |
AS_EXTERN as_status aerospike_key_apply_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_apply * | policy, | ||
const as_key * | key, | ||
const char * | module, | ||
const char * | function, | ||
as_list * | arglist, | ||
as_async_value_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously lookup a record by key, then apply the UDF.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
module | The module containing the function to execute. |
function | The function to execute. |
arglist | The arguments for the function. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_exists | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
as_record ** | rec ) |
Check if a record exists in the cluster via its key. The record's metadata will be populated if the record exists.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
rec | The metadata will be populated if the record exists. If the record pointer is preset to NULL, the record will be created and initialized. If the record pointer is not NULL, the record is assumed to be valid and will be reused. Either way, the record must be preset. |
AS_EXTERN as_status aerospike_key_exists_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
as_async_record_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously check if a record exists in the cluster via its key. The record's metadata will be populated if the record exists.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_get | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
as_record ** | rec ) |
Look up a record by key and return all bins.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
rec | The record to be populated with the data from request. If the record pointer is preset to NULL, the record will be created and initialized. If the record pointer is not NULL, the record is assumed to be valid and will be reused. Either way, the record must be preset. |
AS_EXTERN as_status aerospike_key_get_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
as_async_record_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously look up a record by key and return all bins.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_operate | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_operate * | policy, | ||
const as_key * | key, | ||
const as_operations * | ops, | ||
as_record ** | rec ) |
Lookup a record by key, then perform specified operations.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
ops | The operations to perform on the record. |
rec | The record to be populated with the data from AS_OPERATOR_READ operations. |
AS_EXTERN as_status aerospike_key_operate_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_operate * | policy, | ||
const as_key * | key, | ||
const as_operations * | ops, | ||
as_async_record_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously lookup a record by key, then perform specified operations.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
ops | The operations to perform on the record. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_put | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_write * | policy, | ||
const as_key * | key, | ||
as_record * | rec ) |
Store a record in the cluster.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
rec | The record containing the data to be written. |
AS_EXTERN as_status aerospike_key_put_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_write * | policy, | ||
const as_key * | key, | ||
as_record * | rec, | ||
as_async_write_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously store a record in the cluster.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
rec | The record containing the data to be written. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_remove | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_remove * | policy, | ||
const as_key * | key ) |
Remove a record from the cluster.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
AS_EXTERN as_status aerospike_key_remove_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_remove * | policy, | ||
const as_key * | key, | ||
as_async_write_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously remove a record from the cluster.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
AS_EXTERN as_status aerospike_key_select | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
const char * | bins[], | ||
as_record ** | rec ) |
Read a record's bins given the NULL terminated bins array argument.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
bins | The bins to select. A NULL terminated array of NULL terminated strings. |
rec | The record to be populated with the data from request. If the record pointer is preset to NULL, the record will be created and initialized. If the record pointer is not NULL, the record is assumed to be valid and will be reused. Either way, the record must be preset. |
AS_EXTERN as_status aerospike_key_select_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
const char * | bins[], | ||
as_async_record_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously read a record's bins given the NULL terminated bins array argument.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
bins | The bins to select. A NULL terminated array of NULL terminated strings. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |
as_status aerospike_key_select_bins | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
const char * | bins[], | ||
uint32_t | n_bins, | ||
as_record ** | rec ) |
Read a record's bins given the bins array argument and the n_bins count.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
bins | The array of bins to select. The array does not need a final NULL entry. |
n_bins | The count of bins to select. |
rec | The record to be populated with the data from request. If the record pointer is preset to NULL, the record will be created and initialized. If the record pointer is not NULL, the record is assumed to be valid and will be reused. Either way, the record must be preset. |
as_status aerospike_key_select_bins_async | ( | aerospike * | as, |
as_error * | err, | ||
const as_policy_read * | policy, | ||
const as_key * | key, | ||
const char * | bins[], | ||
uint32_t | n_bins, | ||
as_async_record_listener | listener, | ||
void * | udata, | ||
as_event_loop * | event_loop, | ||
as_pipe_listener | pipe_listener ) |
Asynchronously read a record's bins given the bins array argument and the n_bins count.
as | The aerospike instance to use for this operation. |
err | The as_error to be populated if an error occurs. |
policy | The policy to use for this operation. If NULL, then the default policy will be used. |
key | The key of the record. |
bins | The bins to select. A NULL terminated array of NULL terminated strings. |
n_bins | The count of bins to select. |
listener | User function to be called with command results. |
udata | User data to be forwarded to user callback. |
event_loop | Event loop assigned to run this command. If NULL, an event loop will be chosen by round-robin. |
pipe_listener | Enables command pipelining, if not NULL. The given callback is invoked after the current command has been sent to the server. This allows for issuing the next command even before receiving a result for the current command. |