#include <aerospike/as_bin.h>
#include <aerospike/as_key.h>
#include <aerospike/as_record.h>
#include <aerospike/as_status.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
#define as_batch_inita |
( |
|
__batch, |
|
|
|
__size |
|
) |
| |
|
related |
Value:if ( (__batch) != NULL ) {\
(__batch)->_free = false;\
(__batch)->keys.entries = (
as_key *) alloca(
sizeof(
as_key) * __size);\
if ( (__batch)->keys.entries ) { \
(__batch)->keys._free = false;\
(__batch)->keys.size = __size;\
}\
}
Initializes as_batch
with specified capacity using alloca().
For heap allocation, use as_batch_new()
.
as_key_init(as_batch_get(&batch, 0),
"ns",
"set",
"key1");
as_key_init(as_batch_get(&batch, 1),
"ns",
"set",
"key2");
When the batch is no longer needed, then use as_batch_destroy() to release the batch and associated resources.
- Parameters
-
__batch | The query to initialize. |
__capacity | The number of keys to allocate. |
Definition at line 128 of file target/Linux-x86_64/include/aerospike/as_batch.h.