![]() |
#include <aerospike/as_integer.h>
#include <aerospike/as_bytes.h>
#include <aerospike/as_geojson.h>
#include <aerospike/as_list.h>
#include <aerospike/as_map.h>
#include <aerospike/as_std.h>
#include <aerospike/as_string.h>
#include <aerospike/as_util.h>
#include <aerospike/as_val.h>
Go to the source code of this file.
Data Structures | |
struct | as_rec |
struct | as_rec_hooks |
Typedefs | |
typedef void(* | as_rec_bin_names_callback) (char *bin_names, uint32_t nbins, uint16_t max_name_size, void *udata) |
typedef bool(* | as_rec_foreach_callback) (const char *name, const as_val *value, void *udata) |
Functions | |
static int | as_rec_bin_names (const as_rec *rec, as_rec_bin_names_callback callback, void *udata) |
AS_EXTERN as_rec * | as_rec_cons (as_rec *rec, bool free, void *data, const as_rec_hooks *hooks) |
static void | as_rec_destroy (as_rec *rec) |
static uint32_t | as_rec_device_size (const as_rec *rec) |
static as_bytes * | as_rec_digest (const as_rec *rec) |
static int | as_rec_drop_key (const as_rec *rec) |
static bool | as_rec_foreach (const as_rec *rec, as_rec_foreach_callback callback, void *udata) |
static as_rec * | as_rec_fromval (const as_val *v) |
static uint16_t | as_rec_gen (const as_rec *rec) |
static as_val * | as_rec_get (const as_rec *rec, const char *name) |
static as_double * | as_rec_get_as_double (const as_rec *rec, const char *name) |
static as_bytes * | as_rec_get_bytes (const as_rec *rec, const char *name) |
static double | as_rec_get_double (const as_rec *rec, const char *name) |
static as_geojson * | as_rec_get_geojson (const as_rec *rec, const char *name) |
static char * | as_rec_get_geojson_str (const as_rec *rec, const char *name) |
static int64_t | as_rec_get_int64 (const as_rec *rec, const char *name) |
static as_integer * | as_rec_get_integer (const as_rec *rec, const char *name) |
static as_list * | as_rec_get_list (const as_rec *rec, const char *name) |
static as_map * | as_rec_get_map (const as_rec *rec, const char *name) |
static char * | as_rec_get_str (const as_rec *rec, const char *name) |
static as_string * | as_rec_get_string (const as_rec *rec, const char *name) |
AS_EXTERN as_rec * | as_rec_init (as_rec *rec, void *data, const as_rec_hooks *hooks) |
static as_val * | as_rec_key (const as_rec *rec) |
static uint64_t | as_rec_last_update_time (const as_rec *rec) |
static uint32_t | as_rec_memory_size (const as_rec *rec) |
AS_EXTERN as_rec * | as_rec_new (void *data, const as_rec_hooks *hooks) |
static uint16_t | as_rec_numbins (const as_rec *rec) |
static int | as_rec_remove (const as_rec *rec, const char *name) |
static int | as_rec_set (const as_rec *rec, const char *name, const as_val *value) |
static int | as_rec_set_as_double (const as_rec *rec, const char *name, const as_double *value) |
static int | as_rec_set_bytes (const as_rec *rec, const char *name, const as_bytes *value) |
static int | as_rec_set_double (const as_rec *rec, const char *name, double value) |
static int | as_rec_set_geojson (const as_rec *rec, const char *name, const as_geojson *value) |
static int | as_rec_set_int64 (const as_rec *rec, const char *name, int64_t value) |
static int | as_rec_set_integer (const as_rec *rec, const char *name, const as_integer *value) |
static int | as_rec_set_list (const as_rec *rec, const char *name, const as_list *value) |
static int | as_rec_set_map (const as_rec *rec, const char *name, const as_map *value) |
static int | as_rec_set_str (const as_rec *rec, const char *name, const char *value) |
static int | as_rec_set_string (const as_rec *rec, const char *name, const as_string *value) |
static int | as_rec_set_ttl (const as_rec *rec, uint32_t ttl) |
static const char * | as_rec_setname (const as_rec *rec) |
static uint32_t | as_rec_size (const as_rec *rec) |
static void * | as_rec_source (const as_rec *rec) |
static as_val * | as_rec_toval (const as_rec *rec) |
static uint32_t | as_rec_ttl (const as_rec *rec) |
AS_EXTERN void | as_rec_val_destroy (as_val *) |
AS_EXTERN uint32_t | as_rec_val_hashcode (const as_val *v) |
AS_EXTERN char * | as_rec_val_tostring (const as_val *v) |
typedef void(* as_rec_bin_names_callback) (char *bin_names, uint32_t nbins, uint16_t max_name_size, void *udata) |
Callback function for as_rec_bin_names()
. Used for porting bin names to Lua.
bin_names | A string containing the (null-terminated) bin names. |
nbins | The number of bins in the record. |
max_name_size | The maximum length of a bin name. |
udata | User-provided data. |
typedef bool(* as_rec_foreach_callback) (const char *name, const as_val *value, void *udata) |
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() . |
|
inlinestatic |
|
private |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
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. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Get a bin's value as an as_geojson.
rec | The as_rec to read the bin value from. |
name | The name of the bin. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
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. |
|
inlinestatic |
AS_EXTERN 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. |
|
inlinestatic |
|
inlinestatic |
AS_EXTERN 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. |
|
inlinestatic |
|
inlinestatic |
Set bin value to nil. This will instruct the server to remove the bin when the record is written using aerospike_key_put().
rec | The record to remove the bin from. |
name | The name of the bin to remove. |
|
inlinestatic |
|
inlinestatic |
Set the bin's value to an as_geojson.
rec | The as_rec storing the bin. |
name | The name of the bin. |
value | The value of the bin. |
|
inlinestatic |
|
inlinestatic |
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. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Internal helper function for destroying an as_val.
Internal helper function for getting the hashcode of an as_val.