![]() |
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_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_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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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. |
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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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. |
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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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_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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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_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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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_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, | ||
bool | pipeline | ||
) |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |
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 | ||
) |
Lookup a record by key, then return specified 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. |
bins | The bins to select. A NULL terminated array of NULL terminated strings. |
rec | The record to be populated with the data from request. |
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, | ||
bool | pipeline | ||
) |
Asynchronously lookup a record by key, then return specified 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. |
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 choosen by round-robin. |
pipeline | Should responses be combined with other responses before sending back to client. |