![]() |
#include <aerospike/as_integer.h>
#include <aerospike/as_bytes.h>
#include <aerospike/as_list.h>
#include <aerospike/as_map.h>
#include <aerospike/as_string.h>
#include <aerospike/as_util.h>
#include <aerospike/as_val.h>
#include <stdbool.h>
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | as_rec |
struct | as_rec_hooks |
Typedefs | |
typedef bool(* | as_rec_foreach_callback )(const char *name, const as_val *value, void *udata) |
Functions | |
as_rec * | as_rec_cons (as_rec *rec, bool free, void *data, const as_rec_hooks *hooks) |
void | as_rec_destroy (as_rec *rec) |
as_bytes * | as_rec_digest (const as_rec *rec) |
bool | as_rec_foreach (const as_rec *rec, as_rec_foreach_callback callback, void *udata) |
as_rec * | as_rec_fromval (const as_val *v) |
uint16_t | as_rec_gen (const as_rec *rec) |
as_val * | as_rec_get (const as_rec *rec, const char *name) |
as_bytes * | as_rec_get_bytes (const as_rec *rec, const char *name) |
int64_t | as_rec_get_int64 (const as_rec *rec, const char *name) |
as_integer * | as_rec_get_integer (const as_rec *rec, const char *name) |
as_list * | as_rec_get_list (const as_rec *rec, const char *name) |
as_map * | as_rec_get_map (const as_rec *rec, const char *name) |
char * | as_rec_get_str (const as_rec *rec, const char *name) |
as_string * | as_rec_get_string (const as_rec *rec, const char *name) |
as_rec * | as_rec_init (as_rec *rec, void *data, const as_rec_hooks *hooks) |
as_rec * | as_rec_new (void *data, const as_rec_hooks *hooks) |
uint16_t | as_rec_numbins (const as_rec *rec) |
int | as_rec_remove (const as_rec *rec, const char *name) |
int | as_rec_set (const as_rec *rec, const char *name, const as_val *value) |
int | as_rec_set_bytes (const as_rec *rec, const char *name, const as_bytes *value) |
int | as_rec_set_flags (const as_rec *rec, const char *name, uint8_t flags) |
int | as_rec_set_int64 (const as_rec *rec, const char *name, int64_t value) |
int | as_rec_set_integer (const as_rec *rec, const char *name, const as_integer *value) |
int | as_rec_set_list (const as_rec *rec, const char *name, const as_list *value) |
int | as_rec_set_map (const as_rec *rec, const char *name, const as_map *value) |
int | as_rec_set_str (const as_rec *rec, const char *name, const char *value) |
int | as_rec_set_string (const as_rec *rec, const char *name, const as_string *value) |
int | as_rec_set_type (const as_rec *rec, uint8_t rec_type) |
void * | as_rec_source (const as_rec *rec) |
as_val * | as_rec_toval (const as_rec *rec) |
uint32_t | as_rec_ttl (const as_rec *rec) |
void | as_rec_val_destroy (as_val *) |
uint32_t | as_rec_val_hashcode (const as_val *v) |
char * | as_rec_val_tostring (const as_val *v) |
Callback function for as_rec_foreach()
. Called for each bin in the record.
name | The name of the current bin. |
value | The value of the current bin. |
udata | The user-data provided to the as_rec_foreach() . |
Definition at line 53 of file target/Linux-x86_64/include/aerospike/as_rec.h.
|
private |
|
inline |
Destroy the record.
Definition at line 205 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_val_destroy.
Get the digest of the record.
Definition at line 274 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Call the callback function for each bin in the record.
rec | The as_rec containing the bins to iterate over. |
callback | The function to call for each entry. |
udata | User-data to be passed to the callback. |
Definition at line 579 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Convert from an as_val.
Definition at line 603 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References AS_REC, and as_util_fromval.
|
inline |
Get the generation of the record
Definition at line 254 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Get a bin's value.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 313 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Get a bin's value as an as_bytes.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 394 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_bytes::as_bytes_fromval(), and as_util_hook.
|
inline |
Get a bin's value as an int64_t.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 328 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_integer::as_integer_fromval(), as_integer::as_integer_toint(), and as_util_hook.
|
inline |
Get a bin's value as an as_integer.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 362 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_integer::as_integer_fromval(), and as_util_hook.
Get a bin's value as an as_list.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 410 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_list::as_list_fromval(), and as_util_hook.
Get a bin's value as an as_map.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 426 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_map::as_map_fromval(), and as_util_hook.
|
inline |
Get a bin's value as a NULL terminated string.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 345 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_string::as_string_fromval(), as_string::as_string_tostring(), and as_util_hook.
Get a bin's value as an as_string.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
Definition at line 378 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_string::as_string_fromval(), and as_util_hook.
as_rec* as_rec_init | ( | as_rec * | rec, |
void * | data, | ||
const as_rec_hooks * | hooks | ||
) |
Initialize a stack allocated record.
rec | Stack allocated record to initialize. |
data | Data for the record. |
hooks | Implementation for the record interface. |
as_rec* as_rec_new | ( | void * | data, |
const as_rec_hooks * | hooks | ||
) |
Create and initialize a new heap allocated record.
data | Data for the record. |
hooks | Implementation for the record interface. |
|
inline |
Get the number of bins in the record.
Definition at line 264 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Remove a bin from a record.
rec | The record to remove the bin from. |
name | The name of the bin to remove. |
Definition at line 234 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Set the bin's value to an as_val.
rec | The as_rec to write the bin value to - CONSUMES REFERENCE |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 447 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Set the bin's value to an as_bytes.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 527 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Set flags on a bin.
Definition at line 284 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Set the bin's value to an int64_t.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 463 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_integer::as_integer_new(), and as_util_hook.
|
inline |
Set the bin's value to an as_integer.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 495 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Set the bin's value to an as_list.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 543 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
Set the bin's value to an as_map.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 559 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Set the bin's value to a NULL terminated string.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 479 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_string_new_strdup(), and as_util_hook.
Set the bin's value to an as_string.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
Definition at line 511 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Set the record type.
Definition at line 294 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
inline |
Get the data source for the record.
Definition at line 219 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_rec::data.
Convert to an as_val.
Definition at line 593 of file target/Linux-x86_64/include/aerospike/as_rec.h.
|
inline |
Get the ttl for the record.
Definition at line 244 of file target/Linux-x86_64/include/aerospike/as_rec.h.
References as_util_hook.
|
private |
Internal helper function for getting the hashcode of an as_val.