All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
as_batch Struct Reference

Detailed Description

A collection of keys to be batch processed.

Definition at line 35 of file as_batch.h.

#include "as_batch.h"

+ Collaboration diagram for as_batch:

Data Fields

struct { 
 
   as_key *   entries 
 
   uint32_t   size 
 
keys 
 

Related Symbols

(Note that these are not member symbols.)

AS_EXTERN void as_batch_destroy (as_batch *batch)
 
AS_EXTERN as_batchas_batch_init (as_batch *batch, uint32_t size)
 
#define as_batch_inita(__batch, __size)
 
static as_keyas_batch_keyat (const as_batch *batch, uint32_t i)
 
AS_EXTERN as_batchas_batch_new (uint32_t size)
 

Friends And Related Symbol Documentation

◆ as_batch_inita

#define as_batch_inita ( __batch,
__size )
related
Value:
do {\
(__batch)->keys.entries = (as_key*) alloca(sizeof(as_key) * (__size));\
if ((__batch)->keys.entries) { \
(__batch)->keys.size = (__size);\
(__batch)->keys._free = false;\
}\
(__batch)->_free = false;\
} while(0)
struct as_batch::@0 keys

Initializes as_batch with specified capacity using alloca().

For heap allocation, use as_batch_new().

as_batch batch;
as_batch_inita(&batch, 2);
as_key_init(as_batch_get(&batch, 0), "ns", "set", "key1");
as_key_init(as_batch_get(&batch, 1), "ns", "set", "key2");
#define as_batch_inita(__batch, __size)
Definition as_batch.h:127

When the batch is no longer needed, then use as_batch_destroy() to release the batch and associated resources.

Parameters
__batchThe query to initialize.
__sizeThe number of keys to allocate.

Definition at line 127 of file as_batch.h.

Field Documentation

◆ entries

as_key* as_batch::entries

The keys contained by this batch.

Definition at line 45 of file as_batch.h.

◆ [struct]

struct { ... } as_batch::keys

Sequence of keys in the batch.

◆ size

uint32_t as_batch::size

The number of keys this structure contains.

Definition at line 50 of file as_batch.h.


The documentation for this struct was generated from the following file: