Groonga
Loading...
Searching...
No Matches
array.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GRN_ARRAY_EACH(ctx, array, head, tail, id, value, block)
#define GRN_ARRAY_EACH_BEGIN(ctx, array, cursor, head, tail, id)
#define GRN_ARRAY_EACH_END(ctx, cursor)

Typedefs

typedef struct _grn_array grn_array
typedef struct _grn_array_cursor grn_array_cursor

Functions

GRN_API grn_array * grn_array_create (grn_ctx *ctx, const char *path, unsigned int value_size, unsigned int flags)
GRN_API grn_array * grn_array_open (grn_ctx *ctx, const char *path)
GRN_API grn_rc grn_array_close (grn_ctx *ctx, grn_array *array)
GRN_API grn_id grn_array_add (grn_ctx *ctx, grn_array *array, void **value)
GRN_API int grn_array_get_value (grn_ctx *ctx, grn_array *array, grn_id id, void *valuebuf)
GRN_API grn_rc grn_array_set_value (grn_ctx *ctx, grn_array *array, grn_id id, const void *value, int flags)
GRN_API grn_array_cursor * grn_array_cursor_open (grn_ctx *ctx, grn_array *array, grn_id min, grn_id max, int offset, int limit, int flags)
GRN_API grn_id grn_array_cursor_next (grn_ctx *ctx, grn_array_cursor *cursor)
GRN_API int grn_array_cursor_get_value (grn_ctx *ctx, grn_array_cursor *cursor, void **value)
GRN_API grn_rc grn_array_cursor_set_value (grn_ctx *ctx, grn_array_cursor *cursor, const void *value, int flags)
GRN_API grn_rc grn_array_cursor_delete (grn_ctx *ctx, grn_array_cursor *cursor, grn_table_delete_optarg *optarg)
GRN_API void grn_array_cursor_close (grn_ctx *ctx, grn_array_cursor *cursor)
GRN_API grn_rc grn_array_delete_by_id (grn_ctx *ctx, grn_array *array, grn_id id, grn_table_delete_optarg *optarg)
GRN_API grn_id grn_array_next (grn_ctx *ctx, grn_array *array, grn_id id)
GRN_API void * _grn_array_get_value (grn_ctx *ctx, grn_array *array, grn_id id)

Macro Definition Documentation

◆ GRN_ARRAY_EACH

#define GRN_ARRAY_EACH ( ctx,
array,
head,
tail,
id,
value,
block )
Value:
do {\
grn_array_cursor *_sc = grn_array_cursor_open(ctx, array, head, tail, 0, -1, 0); \
if (_sc) {\
grn_id id;\
while ((id = grn_array_cursor_next(ctx, _sc))) {\
grn_array_cursor_get_value(ctx, _sc, (void **)(value));\
block\
}\
grn_array_cursor_close(ctx, _sc); \
}\
} while (0)
GRN_API grn_id grn_array_cursor_next(grn_ctx *ctx, grn_array_cursor *cursor)
GRN_API grn_array_cursor * grn_array_cursor_open(grn_ctx *ctx, grn_array *array, grn_id min, grn_id max, int offset, int limit, int flags)
struct _grn_array_cursor grn_array_cursor
Definition array.h:26
uint32_t grn_id
Definition groonga.h:44

◆ GRN_ARRAY_EACH_BEGIN

#define GRN_ARRAY_EACH_BEGIN ( ctx,
array,
cursor,
head,
tail,
id )
Value:
do {\
grn_array_cursor *cursor;\
cursor = grn_array_cursor_open((ctx), (array), (head), (tail), 0, -1, 0);\
if (cursor) {\
grn_id id;\
while ((id = grn_array_cursor_next(ctx, cursor))) {

◆ GRN_ARRAY_EACH_END

#define GRN_ARRAY_EACH_END ( ctx,
cursor )
Value:
}\
grn_array_cursor_close(ctx, cursor);\
}\
} while (0)

Typedef Documentation

◆ grn_array

typedef struct _grn_array grn_array

◆ grn_array_cursor

typedef struct _grn_array_cursor grn_array_cursor

Function Documentation

◆ _grn_array_get_value()

GRN_API void * _grn_array_get_value ( grn_ctx * ctx,
grn_array * array,
grn_id id )

◆ grn_array_add()

GRN_API grn_id grn_array_add ( grn_ctx * ctx,
grn_array * array,
void ** value )

◆ grn_array_close()

GRN_API grn_rc grn_array_close ( grn_ctx * ctx,
grn_array * array )

◆ grn_array_create()

GRN_API grn_array * grn_array_create ( grn_ctx * ctx,
const char * path,
unsigned int value_size,
unsigned int flags )

◆ grn_array_cursor_close()

GRN_API void grn_array_cursor_close ( grn_ctx * ctx,
grn_array_cursor * cursor )

◆ grn_array_cursor_delete()

GRN_API grn_rc grn_array_cursor_delete ( grn_ctx * ctx,
grn_array_cursor * cursor,
grn_table_delete_optarg * optarg )

◆ grn_array_cursor_get_value()

GRN_API int grn_array_cursor_get_value ( grn_ctx * ctx,
grn_array_cursor * cursor,
void ** value )

◆ grn_array_cursor_next()

GRN_API grn_id grn_array_cursor_next ( grn_ctx * ctx,
grn_array_cursor * cursor )

◆ grn_array_cursor_open()

GRN_API grn_array_cursor * grn_array_cursor_open ( grn_ctx * ctx,
grn_array * array,
grn_id min,
grn_id max,
int offset,
int limit,
int flags )

◆ grn_array_cursor_set_value()

GRN_API grn_rc grn_array_cursor_set_value ( grn_ctx * ctx,
grn_array_cursor * cursor,
const void * value,
int flags )

◆ grn_array_delete_by_id()

GRN_API grn_rc grn_array_delete_by_id ( grn_ctx * ctx,
grn_array * array,
grn_id id,
grn_table_delete_optarg * optarg )

◆ grn_array_get_value()

GRN_API int grn_array_get_value ( grn_ctx * ctx,
grn_array * array,
grn_id id,
void * valuebuf )

◆ grn_array_next()

GRN_API grn_id grn_array_next ( grn_ctx * ctx,
grn_array * array,
grn_id id )

◆ grn_array_open()

GRN_API grn_array * grn_array_open ( grn_ctx * ctx,
const char * path )

◆ grn_array_set_value()

GRN_API grn_rc grn_array_set_value ( grn_ctx * ctx,
grn_array * array,
grn_id id,
const void * value,
int flags )