#include <aerospike/as_bin.h>
#include <aerospike/as_integer.h>
#include <aerospike/as_string.h>
#include <aerospike/as_bytes.h>
#include <aerospike/as_list.h>
#include <aerospike/as_map.h>
#include <aerospike/as_val.h>
Go to the source code of this file.
|
void | as_bin_destroy (as_bin *bin) |
|
as_bin * | as_bin_init (as_bin *bin, const as_bin_name name, as_bin_value *value) |
|
as_bin * | as_bin_init_int64 (as_bin *bin, const as_bin_name name, int64_t value) |
|
as_bin * | as_bin_init_nil (as_bin *bin, const as_bin_name name) |
|
as_bin * | as_bin_init_raw (as_bin *bin, const as_bin_name name, const uint8_t *value, uint32_t size, bool free) |
|
as_bin * | as_bin_init_str (as_bin *bin, const as_bin_name name, const char *value, bool free) |
|
bool | as_bins_append (as_bins *bins, as_bin_name name, as_bin_value *value) |
|
void | as_bins_destroy (as_bins *bins) |
|
as_bins * | as_bins_init (as_bins *bins, uint16_t capacity) |
|
#define as_bins_inita |
( |
|
__bins, |
|
|
|
__capacity |
|
) |
| |
Value:(__bins)->_free = false;\
(__bins)->capacity = __capacity;\
(__bins)->size = 0;\
(__bins)->entries = (
as_bin *) alloca(
sizeof(
as_bin) * __capacity);
Initializes a stack allocated as_bins
(__bins) and allocates __capacity
number of entries on the stack.
- Parameters
-
Definition at line 52 of file _bin.h.
void as_bin_destroy |
( |
as_bin * |
bin) | |
|
Destroy the given as_bin
and associated resources.
- Parameters
-
Intializes an as_bin
with the given name and value.
Use as_bin_destroy()
to free the resources allocated by this function.
- Parameters
-
bin | The as_bin to initialize. |
name | The name of the bin. |
value | The value of the bin. |
- Returns
- The initialized
as_bin
on success. Otherwsie NULL.
Initialize a stack allocated as_bin
to a int64_t value.
Use as_bin_destroy()
to release resources allocated to as_bin
.
- Parameters
-
name | The name of the bin. |
value | The value of the value. |
- Returns
- The initialized
as_bin
on success. Otherwise NULL.
Initialize a stack allocated as_key
to a an as_key_value
.
Use as_bin_destroy()
to release resources allocated to as_bin
.
- Parameters
-
name | The name of the bin. |
value | The value of the value. |
- Returns
- The initialized
as_bin
on success. Otherwise NULL.
Initialize a stack allocated as_key
to a raw bytes value.
uint8_t rgb[3] = {254,254,120};
Use as_bin_destroy()
to release resources allocated to as_bin
.
- Parameters
-
name | The name of the bin. |
value | The value of the value. |
free | If true, then the value is freed when the bin is destroyed. |
- Returns
- The initialized
as_bin
on success. Otherwise NULL.
Initialize a stack allocated as_bin
to a NULL-terminated string value.
Use as_bin_destroy()
to release resources allocated to as_bin
.
- Parameters
-
name | The name of the bin. |
value | The value of the value. |
free | If true, then the value is freed when the bin is destroyed. |
- Returns
- The initialized
as_bin
on success. Otherwise NULL.
Append a bin to the sequence of bins.
- Parameters
-
bins | The as_bins to append the bin to. |
name | The name of the bin to append. |
value | The value of the bin to append. |
- Returns
- true on success. Otherswise an error occurred.
void as_bins_destroy |
( |
as_bins * |
bins) | |
|
Destroy the as_bins
and associated resources.
- Parameters
-
Intializes a stack allocated as_bins
. The capacity specifies the number of as_bins.entries
to allocate on the heap.
Use as_bins_destroy()
to free the resources allocated by this function.
- Parameters
-
- Returns
- The initialized
as_bins
on success. Otherwsie NULL.