Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Enumerations | Functions
db.c File Reference
#include "groonga_in.h"
#include "db.h"
#include "hash.h"
#include "pat.h"
#include "dat.h"
#include "ii.h"
#include "ctx_impl.h"
#include "token.h"
#include "proc.h"
#include "plugin_in.h"
#include "geo.h"
#include "snip.h"
#include "string_in.h"
#include "normalizer_in.h"
#include "util.h"
#include <string.h>
#include <float.h>
Include dependency graph for db.c:

Go to the source code of this file.

Data Structures

struct  db_value
struct  default_set_value_hook_data
struct  _grn_hook
struct  grn_index_cursor
struct  sort_entry

Macros

#define NEXT_ADDR(p)   (((byte *)(p)) + sizeof(*(p)))
#define GRN_TABLE_GROUPED   (0x01<<0)
#define GRN_TABLE_IS_GROUPED(table)   ((table)->header.impl_flags & GRN_TABLE_GROUPED)
#define GRN_TABLE_GROUPED_ON(table)   ((table)->header.impl_flags |= GRN_TABLE_GROUPED)
#define WITH_NORMALIZE(table, key, key_size, block)
#define REPORT_CAST_ERROR(column, range, element)
#define IS_TEMP(obj)   (DB_OBJ(obj)->id & GRN_OBJ_TMP_OBJECT)
#define GRN_TYPE_SIZE(type)   ((type)->range)
#define GRN_TABLE_GROUP_BY_KEY   0
#define GRN_TABLE_GROUP_BY_VALUE   1
#define GRN_TABLE_GROUP_BY_COLUMN_VALUE   2
#define GRN_TABLE_GROUP_FILTER_PREFIX   0
#define GRN_TABLE_GROUP_FILTER_SUFFIX   (1L<<2)
#define W_SECTIONS_UNIT   8
#define S_SECTIONS_UNIT   (1 << W_SECTIONS_UNIT)
#define M_SECTIONS_UNIT   (S_SECTIONS_UNIT - 1)
#define SRC2RECORD()
#define NUM2DEST(getvalue, totext, tobool, totime, tofloat)
#define TEXT2DEST(type, tonum, setvalue)
#define NUM2BOOL(ctx, dest, value)   GRN_BOOL_SET(ctx, dest, value != 0)
#define FLOAT2BOOL(ctx, dest, value)
#define NUM2TIME(ctx, dest, value)   GRN_TIME_SET(ctx, dest, (long long int)(value) * GRN_TIME_USEC_PER_SEC);
#define TIME2TIME(ctx, dest, value)   GRN_TIME_SET(ctx, dest, value);
#define FLOAT2TIME(ctx, dest, value)   GRN_TIME_SET(ctx, dest, (long long int)(value * GRN_TIME_USEC_PER_SEC));
#define NUM2FLOAT(ctx, dest, value)   GRN_FLOAT_SET(ctx, dest, value);
#define TIME2FLOAT(ctx, dest, value)   GRN_FLOAT_SET(ctx, dest, (double)(value) / GRN_TIME_USEC_PER_SEC);
#define FLOAT2FLOAT(ctx, dest, value)   GRN_FLOAT_SET(ctx, dest, value);
#define INCRDECR(op)
#define N_HOOK_ENTRIES   5
#define GET_PATH(spec, buffer, s, id)
#define UNPACK_INFO()
#define VECTOR_CLEAR(ctx, obj)
#define CMPNUM(type)
#define MULTI_COLUMN_INDEXP(i)   (DB_OBJ(i)->source_size > sizeof(grn_id))
#define OPEN_BRACKET   0x40000000
#define OPEN_BRACE   0x40000001
#define JSON_READ_OPEN_BRACKET()
#define JSON_READ_OPEN_BRACE()

Enumerations

enum  {
  KEY_ID = 0, KEY_BULK, KEY_INT8, KEY_INT16,
  KEY_INT32, KEY_INT64, KEY_UINT8, KEY_UINT16,
  KEY_UINT32, KEY_UINT64, KEY_FLOAT32, KEY_FLOAT64
}

Functions

grn_objgrn_db_create (grn_ctx *ctx, const char *path, grn_db_create_optarg *optarg)
grn_objgrn_db_open (grn_ctx *ctx, const char *path)
grn_rc grn_db_close (grn_ctx *ctx, grn_obj *db)
grn_objgrn_ctx_get (grn_ctx *ctx, const char *name, int name_size)
grn_objgrn_ctx_db (grn_ctx *ctx)
grn_objgrn_db_keys (grn_obj *s)
uint32_t grn_db_lastmod (grn_obj *s)
void grn_db_touch (grn_ctx *ctx, grn_obj *s)
void grn_obj_touch (grn_ctx *ctx, grn_obj *obj, grn_timeval *tv)
grn_rc grn_db_check_name (grn_ctx *ctx, const char *name, unsigned int name_size)
grn_objgrn_type_create (grn_ctx *ctx, const char *name, unsigned int name_size, grn_obj_flags flags, unsigned int size)
grn_objgrn_proc_create (grn_ctx *ctx, const char *name, int name_size, grn_proc_type type, grn_proc_func *init, grn_proc_func *next, grn_proc_func *fin, unsigned int nvars, grn_expr_var *vars)
grn_objgrn_table_create (grn_ctx *ctx, const char *name, unsigned int name_size, const char *path, grn_obj_flags flags, grn_obj *key_type, grn_obj *value_type)
grn_objgrn_table_create_for_group (grn_ctx *ctx, const char *name, unsigned int name_size, const char *path, grn_obj *group_key, grn_obj *value_type, unsigned int max_n_subrecs)
unsigned int grn_table_get_subrecs (grn_ctx *ctx, grn_obj *table, grn_id id, grn_id *subrecbuf, int *scorebuf, int buf_size)
grn_objgrn_table_open (grn_ctx *ctx, const char *name, unsigned int name_size, const char *path)
grn_id grn_table_lcp_search (grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size)
grn_id grn_table_add (grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size, int *added)
grn_id grn_table_get_by_key (grn_ctx *ctx, grn_obj *table, grn_obj *key)
grn_id grn_table_add_by_key (grn_ctx *ctx, grn_obj *table, grn_obj *key, int *added)
grn_id grn_table_get (grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size)
grn_id grn_table_at (grn_ctx *ctx, grn_obj *table, grn_id id)
grn_id grn_table_add_v (grn_ctx *ctx, grn_obj *table, const void *key, int key_size, void **value, int *added)
grn_id grn_table_get_v (grn_ctx *ctx, grn_obj *table, const void *key, int key_size, void **value)
int grn_table_get_key (grn_ctx *ctx, grn_obj *table, grn_id id, void *keybuf, int buf_size)
int grn_table_get_key2 (grn_ctx *ctx, grn_obj *table, grn_id id, grn_obj *bulk)
grn_rc grn_table_delete (grn_ctx *ctx, grn_obj *table, const void *key, unsigned int key_size)
grn_rc _grn_table_delete_by_id (grn_ctx *ctx, grn_obj *table, grn_id id, grn_table_delete_optarg *optarg)
grn_rc grn_table_delete_by_id (grn_ctx *ctx, grn_obj *table, grn_id id)
grn_rc grn_ii_truncate (grn_ctx *ctx, grn_ii *ii)
grn_rc grn_ja_truncate (grn_ctx *ctx, grn_ja *ja)
grn_rc grn_ra_truncate (grn_ctx *ctx, grn_ra *ra)
grn_rc grn_column_truncate (grn_ctx *ctx, grn_obj *column)
grn_rc grn_table_truncate (grn_ctx *ctx, grn_obj *table)
grn_rc grn_table_get_info (grn_ctx *ctx, grn_obj *table, grn_obj_flags *flags, grn_encoding *encoding, grn_obj **tokenizer, grn_obj **normalizer)
unsigned int grn_table_size (grn_ctx *ctx, grn_obj *table)
void grn_table_add_subrec (grn_obj *table, grn_rset_recinfo *ri, int score, grn_rset_posinfo *pi, int dir)
grn_table_cursorgrn_table_cursor_open (grn_ctx *ctx, grn_obj *table, const void *min, unsigned int min_size, const void *max, unsigned int max_size, int offset, int limit, int flags)
grn_table_cursorgrn_table_cursor_open_by_id (grn_ctx *ctx, grn_obj *table, grn_id min, grn_id max, int flags)
grn_rc grn_table_cursor_close (grn_ctx *ctx, grn_table_cursor *tc)
grn_id grn_table_cursor_next (grn_ctx *ctx, grn_table_cursor *tc)
int grn_table_cursor_get_key (grn_ctx *ctx, grn_table_cursor *tc, void **key)
int grn_table_cursor_get_value (grn_ctx *ctx, grn_table_cursor *tc, void **value)
grn_rc grn_table_cursor_set_value (grn_ctx *ctx, grn_table_cursor *tc, const void *value, int flags)
grn_rc grn_table_cursor_delete (grn_ctx *ctx, grn_table_cursor *tc)
grn_objgrn_table_cursor_table (grn_ctx *ctx, grn_table_cursor *tc)
grn_objgrn_index_cursor_open (grn_ctx *ctx, grn_table_cursor *tc, grn_obj *index, grn_id rid_min, grn_id rid_max, int flags)
grn_postinggrn_index_cursor_next (grn_ctx *ctx, grn_obj *c, grn_id *tid)
grn_rc grn_table_search (grn_ctx *ctx, grn_obj *table, const void *key, uint32_t key_size, grn_operator mode, grn_obj *res, grn_operator op)
grn_id grn_table_next (grn_ctx *ctx, grn_obj *table, grn_id id)
grn_rc grn_accessor_resolve (grn_ctx *ctx, grn_obj *accessor, int deep, grn_obj *base_res, grn_obj *res, grn_operator op, grn_search_optarg *optarg)
grn_rc grn_obj_search (grn_ctx *ctx, grn_obj *obj, grn_obj *query, grn_obj *res, grn_operator op, grn_search_optarg *optarg)
grn_rc grn_table_group_with_range_gap (grn_ctx *ctx, grn_obj *table, grn_table_sort_key *group_key, grn_obj *res, uint32_t range_gap)
grn_rc grn_table_group (grn_ctx *ctx, grn_obj *table, grn_table_sort_key *keys, int n_keys, grn_table_group_result *results, int n_results)
grn_rc grn_table_setoperation (grn_ctx *ctx, grn_obj *table1, grn_obj *table2, grn_obj *res, grn_operator op)
grn_rc grn_table_difference (grn_ctx *ctx, grn_obj *table1, grn_obj *table2, grn_obj *res1, grn_obj *res2)
grn_objgrn_obj_column (grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size)
int grn_table_columns (grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size, grn_obj *res)
const char * _grn_table_key (grn_ctx *ctx, grn_obj *table, grn_id id, uint32_t *key_size)
grn_objgrn_column_create (grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size, const char *path, grn_obj_flags flags, grn_obj *type)
grn_objgrn_column_open (grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size, const char *path, grn_obj *type)
unsigned int grn_vector_size (grn_ctx *ctx, grn_obj *vector)
unsigned int grn_vector_get_element (grn_ctx *ctx, grn_obj *vector, unsigned int offset, const char **str, unsigned int *weight, grn_id *domain)
unsigned int grn_vector_pop_element (grn_ctx *ctx, grn_obj *vector, const char **str, unsigned int *weight, grn_id *domain)
grn_rc grn_vector_delimit (grn_ctx *ctx, grn_obj *v, unsigned int weight, grn_id domain)
grn_rc grn_vector_decode (grn_ctx *ctx, grn_obj *v, const char *data, uint32_t data_size)
grn_rc grn_vector_add_element (grn_ctx *ctx, grn_obj *vector, const char *str, unsigned int str_len, unsigned int weight, grn_id domain)
grn_id grn_obj_get_range (grn_ctx *ctx, grn_obj *obj)
int grn_obj_is_persistent (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_cast (grn_ctx *ctx, grn_obj *src, grn_obj *dest, grn_bool addp)
const char * grn_accessor_get_value_ (grn_ctx *ctx, grn_accessor *a, grn_id id, uint32_t *size)
uint32_t grn_obj_size (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_set_value (grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value, int flags)
const char * grn_obj_get_value_ (grn_ctx *ctx, grn_obj *obj, grn_id id, uint32_t *size)
grn_objgrn_obj_get_value (grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj *value)
int grn_obj_get_values (grn_ctx *ctx, grn_obj *obj, grn_id offset, void **values)
grn_rc grn_column_index_update (grn_ctx *ctx, grn_obj *column, grn_id id, unsigned int section, grn_obj *oldvalue, grn_obj *newvalue)
grn_objgrn_column_table (grn_ctx *ctx, grn_obj *column)
grn_objgrn_obj_get_info (grn_ctx *ctx, grn_obj *obj, grn_info_type type, grn_obj *valuebuf)
grn_rc grn_hook_pack (grn_ctx *ctx, grn_db_obj *obj, grn_obj *buf)
void grn_obj_spec_save (grn_ctx *ctx, grn_db_obj *obj)
grn_rc grn_obj_set_info (grn_ctx *ctx, grn_obj *obj, grn_info_type type, grn_obj *value)
grn_objgrn_obj_get_element_info (grn_ctx *ctx, grn_obj *obj, grn_id id, grn_info_type type, grn_obj *valuebuf)
grn_rc grn_obj_set_element_info (grn_ctx *ctx, grn_obj *obj, grn_id id, grn_info_type type, grn_obj *value)
grn_bool grn_obj_is_builtin (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_add_hook (grn_ctx *ctx, grn_obj *obj, grn_hook_entry entry, int offset, grn_obj *proc, grn_obj *hld)
int grn_obj_get_nhooks (grn_ctx *ctx, grn_obj *obj, grn_hook_entry entry)
grn_objgrn_obj_get_hook (grn_ctx *ctx, grn_obj *obj, grn_hook_entry entry, int offset, grn_obj *hldbuf)
grn_rc grn_obj_delete_hook (grn_ctx *ctx, grn_obj *obj, grn_hook_entry entry, int offset)
grn_rc grn_obj_remove (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_table_update_by_id (grn_ctx *ctx, grn_obj *table, grn_id id, const void *dest_key, unsigned int dest_key_size)
grn_rc grn_table_update (grn_ctx *ctx, grn_obj *table, const void *src_key, unsigned int src_key_size, const void *dest_key, unsigned int dest_key_size)
grn_rc grn_obj_rename (grn_ctx *ctx, grn_obj *obj, const char *name, unsigned int name_size)
grn_rc grn_table_rename (grn_ctx *ctx, grn_obj *table, const char *name, unsigned int name_size)
grn_rc grn_column_rename (grn_ctx *ctx, grn_obj *column, const char *name, unsigned int name_size)
grn_rc grn_obj_path_rename (grn_ctx *ctx, const char *old_path, const char *new_path)
grn_id grn_obj_register (grn_ctx *ctx, grn_obj *db, const char *name, unsigned int name_size)
grn_rc grn_obj_delete_by_id (grn_ctx *ctx, grn_obj *db, grn_id id, grn_bool removep)
grn_rc grn_obj_path_by_id (grn_ctx *ctx, grn_obj *db, grn_id id, char *buffer)
grn_rc grn_db_obj_init (grn_ctx *ctx, grn_obj *db, grn_id id, grn_db_obj *obj)
grn_objgrn_ctx_at (grn_ctx *ctx, grn_id id)
grn_objgrn_obj_open (grn_ctx *ctx, unsigned char type, grn_obj_flags flags, grn_id domain)
grn_objgrn_obj_graft (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_close (grn_ctx *ctx, grn_obj *obj)
void grn_obj_unlink (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_reinit (grn_ctx *ctx, grn_obj *obj, grn_id domain, unsigned char flags)
grn_rc grn_obj_reinit_for (grn_ctx *ctx, grn_obj *obj, grn_obj *domain_obj)
const char * grn_obj_path (grn_ctx *ctx, grn_obj *obj)
int grn_obj_name (grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size)
int grn_column_name (grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size)
grn_rc grn_column_name_ (grn_ctx *ctx, grn_obj *obj, grn_obj *buf)
int grn_obj_expire (grn_ctx *ctx, grn_obj *obj, int threshold)
int grn_obj_check (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_lock (grn_ctx *ctx, grn_obj *obj, grn_id id, int timeout)
grn_rc grn_obj_unlock (grn_ctx *ctx, grn_obj *obj, grn_id id)
grn_user_datagrn_obj_user_data (grn_ctx *ctx, grn_obj *obj)
grn_rc grn_obj_set_finalizer (grn_ctx *ctx, grn_obj *obj, grn_proc_func *func)
grn_rc grn_obj_clear_lock (grn_ctx *ctx, grn_obj *obj)
unsigned int grn_obj_is_locked (grn_ctx *ctx, grn_obj *obj)
grn_objgrn_obj_db (grn_ctx *ctx, grn_obj *obj)
grn_id grn_obj_id (grn_ctx *ctx, grn_obj *obj)
int grn_obj_defrag (grn_ctx *ctx, grn_obj *obj, int threshold)
int grn_table_sort (grn_ctx *ctx, grn_obj *table, int offset, int limit, grn_obj *result, grn_table_sort_key *keys, int n_keys)
grn_rc grn_db_init_builtin_types (grn_ctx *ctx)
int grn_column_index (grn_ctx *ctx, grn_obj *obj, grn_operator op, grn_obj **indexbuf, int buf_size, int *section)
grn_rc grn_obj_columns (grn_ctx *ctx, grn_obj *table, const char *str, unsigned int str_size, grn_obj *res)
grn_table_sort_keygrn_table_sort_key_from_str (grn_ctx *ctx, const char *str, unsigned int str_size, grn_obj *table, unsigned int *nkeys)
grn_rc grn_table_sort_key_close (grn_ctx *ctx, grn_table_sort_key *keys, unsigned int nkeys)
grn_bool grn_table_is_grouped (grn_ctx *ctx, grn_obj *table)
unsigned int grn_table_max_n_subrecs (grn_ctx *ctx, grn_obj *table)
grn_objgrn_table_tokenize (grn_ctx *ctx, grn_obj *table, const char *str, unsigned int str_len, grn_obj *buf, grn_bool addp)
void grn_load_ (grn_ctx *ctx, grn_content_type input_type, const char *table, unsigned int table_len, const char *columns, unsigned int columns_len, const char *values, unsigned int values_len, const char *ifexists, unsigned int ifexists_len, const char *each, unsigned int each_len, uint32_t emit_level)
grn_rc grn_load (grn_ctx *ctx, grn_content_type input_type, const char *table, unsigned int table_len, const char *columns, unsigned int columns_len, const char *values, unsigned int values_len, const char *ifexists, unsigned int ifexists_len, const char *each, unsigned int each_len)

Macro Definition Documentation

#define CMPNUM (   type)
Value:
do {\
if (as) {\
if (bs) {\
type va = *((type *)(ap));\
type vb = *((type *)(bp));\
if (va != vb) { return va > vb; }\
} else {\
return 1;\
}\
} else {\
if (bs) { return 0; }\
}\
} while (0)

Definition at line 8295 of file db.c.

#define FLOAT2BOOL (   ctx,
  dest,
  value 
)
Value:
do {\
double value_ = value;\
GRN_BOOL_SET(ctx, dest, value_ < -DBL_EPSILON || DBL_EPSILON < value_);\
} while (0)

Definition at line 4615 of file db.c.

#define FLOAT2FLOAT (   ctx,
  dest,
  value 
)    GRN_FLOAT_SET(ctx, dest, value);

Definition at line 4631 of file db.c.

#define FLOAT2TIME (   ctx,
  dest,
  value 
)    GRN_TIME_SET(ctx, dest, (long long int)(value * GRN_TIME_USEC_PER_SEC));

Definition at line 4624 of file db.c.

#define GET_PATH (   spec,
  buffer,
  s,
  id 
)
Value:
do {\
if (spec->header.flags & GRN_OBJ_CUSTOM_NAME) {\
const char *path;\
unsigned int size = grn_vector_get_element(ctx, &v, 1, &path, NULL, NULL); \
if (size > PATH_MAX) { ERR(GRN_FILENAME_TOO_LONG, "too long path"); }\
memcpy(buffer, path, size);\
buffer[size] = '\0';\
} else {\
gen_pathname(grn_obj_io(s->keys)->path, buffer, id); \
}\
} while (0)

Definition at line 7424 of file db.c.

#define GRN_TABLE_GROUP_BY_COLUMN_VALUE   2

Definition at line 2911 of file db.c.

#define GRN_TABLE_GROUP_BY_KEY   0

Definition at line 2909 of file db.c.

#define GRN_TABLE_GROUP_BY_VALUE   1

Definition at line 2910 of file db.c.

#define GRN_TABLE_GROUP_FILTER_PREFIX   0

Definition at line 2913 of file db.c.

#define GRN_TABLE_GROUP_FILTER_SUFFIX   (1L<<2)

Definition at line 2914 of file db.c.

#define GRN_TABLE_GROUPED   (0x01<<0)

Definition at line 37 of file db.c.

#define GRN_TABLE_GROUPED_ON (   table)    ((table)->header.impl_flags |= GRN_TABLE_GROUPED)

Definition at line 40 of file db.c.

#define GRN_TABLE_IS_GROUPED (   table)    ((table)->header.impl_flags & GRN_TABLE_GROUPED)

Definition at line 38 of file db.c.

#define GRN_TYPE_SIZE (   type)    ((type)->range)

Definition at line 501 of file db.c.

#define INCRDECR (   op)

Definition at line 5100 of file db.c.

#define IS_TEMP (   obj)    (DB_OBJ(obj)->id & GRN_OBJ_TMP_OBJECT)

Definition at line 446 of file db.c.

#define JSON_READ_OPEN_BRACE ( )
Value:
do {\
GRN_UINT32_PUT(ctx, &loader->level, loader->values_size);\
values_add(ctx, loader);\
loader->last->header.domain = OPEN_BRACE;\
loader->stat = GRN_LOADER_TOKEN;\
str++;\
} while (0)

Definition at line 9812 of file db.c.

#define JSON_READ_OPEN_BRACKET ( )
Value:
do {\
GRN_UINT32_PUT(ctx, &loader->level, loader->values_size);\
values_add(ctx, loader);\
loader->last->header.domain = OPEN_BRACKET;\
loader->stat = GRN_LOADER_TOKEN;\
str++;\
} while (0)

Definition at line 9804 of file db.c.

#define M_SECTIONS_UNIT   (S_SECTIONS_UNIT - 1)

Definition at line 3889 of file db.c.

#define MULTI_COLUMN_INDEXP (   i)    (DB_OBJ(i)->source_size > sizeof(grn_id))

Definition at line 8746 of file db.c.

#define N_HOOK_ENTRIES   5

Definition at line 6192 of file db.c.

#define NEXT_ADDR (   p)    (((byte *)(p)) + sizeof(*(p)))

Definition at line 35 of file db.c.

#define NUM2BOOL (   ctx,
  dest,
  value 
)    GRN_BOOL_SET(ctx, dest, value != 0)

Definition at line 4614 of file db.c.

#define NUM2DEST (   getvalue,
  totext,
  tobool,
  totime,
  tofloat 
)

Definition at line 4545 of file db.c.

#define NUM2FLOAT (   ctx,
  dest,
  value 
)    GRN_FLOAT_SET(ctx, dest, value);

Definition at line 4627 of file db.c.

#define NUM2TIME (   ctx,
  dest,
  value 
)    GRN_TIME_SET(ctx, dest, (long long int)(value) * GRN_TIME_USEC_PER_SEC);

Definition at line 4620 of file db.c.

#define OPEN_BRACE   0x40000001

Definition at line 9400 of file db.c.

#define OPEN_BRACKET   0x40000000

Definition at line 9399 of file db.c.

#define REPORT_CAST_ERROR (   column,
  range,
  element 
)
Value:
do {\
grn_obj inspected;\
char column_name[GRN_TABLE_MAX_KEY_SIZE];\
int column_name_size;\
char range_name[GRN_TABLE_MAX_KEY_SIZE];\
int range_name_size;\
GRN_TEXT_INIT(&inspected, 0);\
grn_inspect(ctx, &inspected, element);\
column_name_size = grn_obj_name(ctx, column, column_name,\
range_name_size = grn_obj_name(ctx, range, range_name,\
ERR(GRN_INVALID_ARGUMENT, "<%.*s>: failed to cast to <%.*s>: <%.*s>",\
column_name_size, column_name,\
range_name_size, range_name,\
(int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected));\
GRN_OBJ_FIN(ctx, &inspected);\
} while (0)

Definition at line 59 of file db.c.

#define S_SECTIONS_UNIT   (1 << W_SECTIONS_UNIT)

Definition at line 3888 of file db.c.

#define SRC2RECORD ( )

Definition at line 4454 of file db.c.

#define TEXT2DEST (   type,
  tonum,
  setvalue 
)
Value:
do {\
const char *cur, *str = GRN_TEXT_VALUE(src);\
const char *str_end = GRN_BULK_CURR(src);\
type i = tonum(str, str_end, &cur);\
if (cur == str_end) {\
setvalue(ctx, dest, i);\
} else if (cur != str) {\
const char *rest;\
grn_obj buf;\
GRN_VOID_INIT(&buf);\
rc = grn_aton(ctx, str, str_end, &rest, &buf);\
if (!rc) {\
rc = grn_obj_cast(ctx, &buf, dest, addp);\
}\
GRN_OBJ_FIN(ctx, &buf);\
} else {\
}\
} while (0)

Definition at line 4594 of file db.c.

#define TIME2FLOAT (   ctx,
  dest,
  value 
)    GRN_FLOAT_SET(ctx, dest, (double)(value) / GRN_TIME_USEC_PER_SEC);

Definition at line 4629 of file db.c.

#define TIME2TIME (   ctx,
  dest,
  value 
)    GRN_TIME_SET(ctx, dest, value);

Definition at line 4622 of file db.c.

#define UNPACK_INFO ( )
Value:
do {\
if (vp->ptr) {\
grn_db_obj *r = DB_OBJ(vp->ptr);\
r->header = spec->header;\
r->id = id;\
r->range = spec->range;\
r->db = (grn_obj *)s;\
size = grn_vector_get_element(ctx, &v, 2, &p, NULL, NULL);\
if (size) {\
if ((r->source = GRN_MALLOC(size))) {\
memcpy(r->source, p, size);\
r->source_size = size;\
}\
}\
size = grn_vector_get_element(ctx, &v, 3, &p, NULL, NULL);\
grn_hook_unpack(ctx, r, p, size);\
}\
} while (0)

Definition at line 7436 of file db.c.

#define VECTOR_CLEAR (   ctx,
  obj 
)
Value:
do {\
if ((obj)->u.v.body && !((obj)->header.impl_flags & GRN_OBJ_REFER)) {\
grn_obj_close((ctx), (obj)->u.v.body);\
}\
if ((obj)->u.v.sections) { GRN_FREE((obj)->u.v.sections); }\
(obj)->header.impl_flags &= ~GRN_OBJ_DO_SHALLOW_COPY;\
(obj)->u.b.head = NULL;\
(obj)->u.b.curr = NULL;\
(obj)->u.b.tail = NULL;\
} while (0)

Definition at line 7813 of file db.c.

#define W_SECTIONS_UNIT   8

Definition at line 3887 of file db.c.

#define WITH_NORMALIZE (   table,
  key,
  key_size,
  block 
)
Value:
do {\
if ((table)->normalizer && key && key_size > 0) {\
grn_obj *nstr;\
if ((nstr = grn_string_open(ctx, key, key_size,\
(table)->normalizer, 0))) {\
const char *key;\
unsigned int key_size;\
grn_string_get_normalized(ctx, nstr, &key, &key_size, NULL);\
grn_obj_close(ctx, nstr);\
}\
} else {\
block\
}\
} while (0)

Definition at line 43 of file db.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
KEY_ID 
KEY_BULK 
KEY_INT8 
KEY_INT16 
KEY_INT32 
KEY_INT64 
KEY_UINT8 
KEY_UINT16 
KEY_UINT32 
KEY_UINT64 
KEY_FLOAT32 
KEY_FLOAT64 

Definition at line 8280 of file db.c.

Function Documentation

grn_rc _grn_table_delete_by_id ( grn_ctx ctx,
grn_obj table,
grn_id  id,
grn_table_delete_optarg optarg 
)

Definition at line 1738 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* _grn_table_key ( grn_ctx ctx,
grn_obj table,
grn_id  id,
uint32_t *  key_size 
)

Definition at line 3432 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* grn_accessor_get_value_ ( grn_ctx ctx,
grn_accessor a,
grn_id  id,
uint32_t *  size 
)

Definition at line 4896 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_accessor_resolve ( grn_ctx ctx,
grn_obj accessor,
int  deep,
grn_obj base_res,
grn_obj res,
grn_operator  op,
grn_search_optarg optarg 
)

Definition at line 2642 of file db.c.

Here is the call graph for this function:

grn_obj* grn_column_create ( grn_ctx ctx,
grn_obj table,
const char *  name,
unsigned int  name_size,
const char *  path,
grn_obj_flags  flags,
grn_obj type 
)

Definition at line 3463 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_column_index ( grn_ctx ctx,
grn_obj obj,
grn_operator  op,
grn_obj **  indexbuf,
int  buf_size,
int *  section 
)

Definition at line 9014 of file db.c.

Here is the caller graph for this function:

grn_rc grn_column_index_update ( grn_ctx ctx,
grn_obj column,
grn_id  id,
unsigned int  section,
grn_obj oldvalue,
grn_obj newvalue 
)

Definition at line 5896 of file db.c.

Here is the call graph for this function:

int grn_column_name ( grn_ctx ctx,
grn_obj obj,
char *  namebuf,
int  buf_size 
)

Definition at line 7972 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_column_name_ ( grn_ctx ctx,
grn_obj obj,
grn_obj buf 
)

Definition at line 8032 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_column_open ( grn_ctx ctx,
grn_obj table,
const char *  name,
unsigned int  name_size,
const char *  path,
grn_obj type 
)

Definition at line 3652 of file db.c.

Here is the call graph for this function:

grn_rc grn_column_rename ( grn_ctx ctx,
grn_obj column,
const char *  name,
unsigned int  name_size 
)

Definition at line 7281 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_column_table ( grn_ctx ctx,
grn_obj column 
)

Definition at line 5911 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_column_truncate ( grn_ctx ctx,
grn_obj column 
)

Definition at line 1800 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_ctx_at ( grn_ctx ctx,
grn_id  id 
)

Definition at line 7456 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_ctx_db ( grn_ctx ctx)

Definition at line 388 of file db.c.

Here is the caller graph for this function:

grn_obj* grn_ctx_get ( grn_ctx ctx,
const char *  name,
int  name_size 
)

Definition at line 366 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_db_check_name ( grn_ctx ctx,
const char *  name,
unsigned int  name_size 
)

Definition at line 477 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_db_close ( grn_ctx ctx,
grn_obj db 
)

Definition at line 310 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_db_create ( grn_ctx ctx,
const char *  path,
grn_db_create_optarg optarg 
)

Definition at line 154 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_db_init_builtin_types ( grn_ctx ctx)

Definition at line 8663 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_db_keys ( grn_obj s)

Definition at line 394 of file db.c.

uint32_t grn_db_lastmod ( grn_obj s)

Definition at line 433 of file db.c.

Here is the caller graph for this function:

grn_rc grn_db_obj_init ( grn_ctx ctx,
grn_obj db,
grn_id  id,
grn_db_obj obj 
)

Definition at line 7389 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_db_open ( grn_ctx ctx,
const char *  path 
)

Definition at line 228 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_db_touch ( grn_ctx ctx,
grn_obj s 
)

Definition at line 439 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_hook_pack ( grn_ctx ctx,
grn_db_obj obj,
grn_obj buf 
)

Definition at line 6195 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_ii_truncate ( grn_ctx ctx,
grn_ii ii 
)

Definition at line 3533 of file ii.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_posting* grn_index_cursor_next ( grn_ctx ctx,
grn_obj c,
grn_id tid 
)

Definition at line 2456 of file db.c.

Here is the call graph for this function:

grn_obj* grn_index_cursor_open ( grn_ctx ctx,
grn_table_cursor tc,
grn_obj index,
grn_id  rid_min,
grn_id  rid_max,
int  flags 
)

Definition at line 2431 of file db.c.

Here is the call graph for this function:

grn_rc grn_ja_truncate ( grn_ctx ctx,
grn_ja ja 
)

Definition at line 402 of file store.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_load ( grn_ctx ctx,
grn_content_type  input_type,
const char *  table,
unsigned int  table_len,
const char *  columns,
unsigned int  columns_len,
const char *  values,
unsigned int  values_len,
const char *  ifexists,
unsigned int  ifexists_len,
const char *  each,
unsigned int  each_len 
)

Definition at line 10254 of file db.c.

Here is the call graph for this function:

void grn_load_ ( grn_ctx ctx,
grn_content_type  input_type,
const char *  table,
unsigned int  table_len,
const char *  columns,
unsigned int  columns_len,
const char *  values,
unsigned int  values_len,
const char *  ifexists,
unsigned int  ifexists_len,
const char *  each,
unsigned int  each_len,
uint32_t  emit_level 
)

Definition at line 10158 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_add_hook ( grn_ctx ctx,
grn_obj obj,
grn_hook_entry  entry,
int  offset,
grn_obj proc,
grn_obj hld 
)

Definition at line 6579 of file db.c.

Here is the call graph for this function:

grn_rc grn_obj_cast ( grn_ctx ctx,
grn_obj src,
grn_obj dest,
grn_bool  addp 
)

Definition at line 4635 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_obj_check ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8093 of file db.c.

grn_rc grn_obj_clear_lock ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8132 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_close ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 7639 of file db.c.

Here is the call graph for this function:

grn_obj* grn_obj_column ( grn_ctx ctx,
grn_obj table,
const char *  name,
unsigned int  name_size 
)

Definition at line 3392 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_columns ( grn_ctx ctx,
grn_obj table,
const char *  str,
unsigned int  str_size,
grn_obj res 
)

Definition at line 9122 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_obj_db ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8203 of file db.c.

int grn_obj_defrag ( grn_ctx ctx,
grn_obj obj,
int  threshold 
)

Definition at line 8223 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_delete_by_id ( grn_ctx ctx,
grn_obj db,
grn_id  id,
grn_bool  removep 
)

Definition at line 7337 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_delete_hook ( grn_ctx ctx,
grn_obj obj,
grn_hook_entry  entry,
int  offset 
)

Definition at line 6648 of file db.c.

Here is the call graph for this function:

int grn_obj_expire ( grn_ctx ctx,
grn_obj obj,
int  threshold 
)

Definition at line 8086 of file db.c.

grn_obj* grn_obj_get_element_info ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
grn_info_type  type,
grn_obj valuebuf 
)

Definition at line 6538 of file db.c.

grn_obj* grn_obj_get_hook ( grn_ctx ctx,
grn_obj obj,
grn_hook_entry  entry,
int  offset,
grn_obj hldbuf 
)

Definition at line 6629 of file db.c.

Here is the call graph for this function:

grn_obj* grn_obj_get_info ( grn_ctx ctx,
grn_obj obj,
grn_info_type  type,
grn_obj valuebuf 
)

Definition at line 5923 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_obj_get_nhooks ( grn_ctx ctx,
grn_obj obj,
grn_hook_entry  entry 
)

Definition at line 6614 of file db.c.

grn_id grn_obj_get_range ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 4415 of file db.c.

Here is the caller graph for this function:

grn_obj* grn_obj_get_value ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
grn_obj value 
)

Definition at line 5718 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

const char* grn_obj_get_value_ ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
uint32_t *  size 
)

Definition at line 5674 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_obj_get_values ( grn_ctx ctx,
grn_obj obj,
grn_id  offset,
void **  values 
)

Definition at line 5861 of file db.c.

Here is the call graph for this function:

grn_obj* grn_obj_graft ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 7623 of file db.c.

Here is the call graph for this function:

grn_id grn_obj_id ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8212 of file db.c.

Here is the caller graph for this function:

grn_bool grn_obj_is_builtin ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 6554 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int grn_obj_is_locked ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8194 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_obj_is_persistent ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 4426 of file db.c.

Here is the caller graph for this function:

grn_rc grn_obj_lock ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
int  timeout 
)

Definition at line 8100 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_obj_name ( grn_ctx ctx,
grn_obj obj,
char *  namebuf,
int  buf_size 
)

Definition at line 7956 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_obj_open ( grn_ctx ctx,
unsigned char  type,
grn_obj_flags  flags,
grn_id  domain 
)

Definition at line 7612 of file db.c.

Here is the caller graph for this function:

const char* grn_obj_path ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 7941 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_path_by_id ( grn_ctx ctx,
grn_obj db,
grn_id  id,
char *  buffer 
)

Definition at line 7375 of file db.c.

grn_rc grn_obj_path_rename ( grn_ctx ctx,
const char *  old_path,
const char *  new_path 
)

grn_obj_path_rename: : 旧ファイルパス : 新ファイルパス

old_pathに該当するオブジェクトのファイル名をnew_pathに変更する。

Definition at line 7308 of file db.c.

grn_id grn_obj_register ( grn_ctx ctx,
grn_obj db,
const char *  name,
unsigned int  name_size 
)

Definition at line 7316 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_reinit ( grn_ctx ctx,
grn_obj obj,
grn_id  domain,
unsigned char  flags 
)

Definition at line 7839 of file db.c.

Here is the call graph for this function:

grn_rc grn_obj_reinit_for ( grn_ctx ctx,
grn_obj obj,
grn_obj domain_obj 
)

Definition at line 7916 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_remove ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 7158 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_rename ( grn_ctx ctx,
grn_obj obj,
const char *  name,
unsigned int  name_size 
)

Definition at line 7211 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_search ( grn_ctx ctx,
grn_obj obj,
grn_obj query,
grn_obj res,
grn_operator  op,
grn_search_optarg optarg 
)

Definition at line 2879 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_set_element_info ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
grn_info_type  type,
grn_obj value 
)

Definition at line 6546 of file db.c.

grn_rc grn_obj_set_finalizer ( grn_ctx ctx,
grn_obj obj,
grn_proc_func func 
)

Definition at line 8124 of file db.c.

grn_rc grn_obj_set_info ( grn_ctx ctx,
grn_obj obj,
grn_info_type  type,
grn_obj value 
)

Definition at line 6471 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_set_value ( grn_ctx ctx,
grn_obj obj,
grn_id  id,
grn_obj value,
int  flags 
)

Definition at line 5622 of file db.c.

Here is the caller graph for this function:

uint32_t grn_obj_size ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 5181 of file db.c.

void grn_obj_spec_save ( grn_ctx ctx,
grn_db_obj obj 
)

Definition at line 6254 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_obj_touch ( grn_ctx ctx,
grn_obj obj,
grn_timeval tv 
)

Definition at line 449 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void grn_obj_unlink ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 7772 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_obj_unlock ( grn_ctx ctx,
grn_obj obj,
grn_id  id 
)

Definition at line 8109 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_user_data* grn_obj_user_data ( grn_ctx ctx,
grn_obj obj 
)

Definition at line 8117 of file db.c.

grn_obj* grn_proc_create ( grn_ctx ctx,
const char *  name,
int  name_size,
grn_proc_type  type,
grn_proc_func init,
grn_proc_func next,
grn_proc_func fin,
unsigned int  nvars,
grn_expr_var vars 
)

Definition at line 552 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_ra_truncate ( grn_ctx ctx,
grn_ra ra 
)

Definition at line 127 of file store.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_id grn_table_add ( grn_ctx ctx,
grn_obj table,
const void *  key,
unsigned int  key_size,
int *  added 
)

Definition at line 1106 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_id grn_table_add_by_key ( grn_ctx ctx,
grn_obj table,
grn_obj key,
int *  added 
)

Definition at line 1241 of file db.c.

Here is the call graph for this function:

void grn_table_add_subrec ( grn_obj table,
grn_rset_recinfo ri,
int  score,
grn_rset_posinfo pi,
int  dir 
)

Definition at line 2048 of file db.c.

grn_id grn_table_add_v ( grn_ctx ctx,
grn_obj table,
const void *  key,
int  key_size,
void **  value,
int *  added 
)

Definition at line 1355 of file db.c.

grn_id grn_table_at ( grn_ctx ctx,
grn_obj table,
grn_id  id 
)

Definition at line 1292 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_table_columns ( grn_ctx ctx,
grn_obj table,
const char *  name,
unsigned int  name_size,
grn_obj res 
)

Definition at line 3408 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_table_create ( grn_ctx ctx,
const char *  name,
unsigned int  name_size,
const char *  path,
grn_obj_flags  flags,
grn_obj key_type,
grn_obj value_type 
)

Definition at line 907 of file db.c.

Here is the caller graph for this function:

grn_obj* grn_table_create_for_group ( grn_ctx ctx,
const char *  name,
unsigned int  name_size,
const char *  path,
grn_obj group_key,
grn_obj value_type,
unsigned int  max_n_subrecs 
)

Definition at line 919 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_cursor_close ( grn_ctx ctx,
grn_table_cursor tc 
)

Definition at line 2183 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_cursor_delete ( grn_ctx ctx,
grn_table_cursor tc 
)

Definition at line 2362 of file db.c.

Here is the call graph for this function:

int grn_table_cursor_get_key ( grn_ctx ctx,
grn_table_cursor tc,
void **  key 
)

Definition at line 2268 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_table_cursor_get_value ( grn_ctx ctx,
grn_table_cursor tc,
void **  value 
)

Definition at line 2323 of file db.c.

Here is the caller graph for this function:

grn_id grn_table_cursor_next ( grn_ctx ctx,
grn_table_cursor tc 
)

Definition at line 2259 of file db.c.

Here is the caller graph for this function:

grn_table_cursor* grn_table_cursor_open ( grn_ctx ctx,
grn_obj table,
const void *  min,
unsigned int  min_size,
const void *  max,
unsigned int  max_size,
int  offset,
int  limit,
int  flags 
)

Definition at line 2055 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_table_cursor* grn_table_cursor_open_by_id ( grn_ctx ctx,
grn_obj table,
grn_id  min,
grn_id  max,
int  flags 
)

Definition at line 2154 of file db.c.

Here is the call graph for this function:

grn_rc grn_table_cursor_set_value ( grn_ctx ctx,
grn_table_cursor tc,
const void *  value,
int  flags 
)

Definition at line 2332 of file db.c.

Here is the call graph for this function:

grn_obj* grn_table_cursor_table ( grn_ctx ctx,
grn_table_cursor tc 
)

Definition at line 2391 of file db.c.

Here is the caller graph for this function:

grn_rc grn_table_delete ( grn_ctx ctx,
grn_obj table,
const void *  key,
unsigned int  key_size 
)

Definition at line 1672 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_delete_by_id ( grn_ctx ctx,
grn_obj table,
grn_id  id 
)

Definition at line 1778 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_difference ( grn_ctx ctx,
grn_obj table1,
grn_obj table2,
grn_obj res1,
grn_obj res2 
)

Definition at line 3342 of file db.c.

Here is the call graph for this function:

grn_id grn_table_get ( grn_ctx ctx,
grn_obj table,
const void *  key,
unsigned int  key_size 
)

Definition at line 1261 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_id grn_table_get_by_key ( grn_ctx ctx,
grn_obj table,
grn_obj key 
)

Definition at line 1221 of file db.c.

Here is the call graph for this function:

grn_rc grn_table_get_info ( grn_ctx ctx,
grn_obj table,
grn_obj_flags flags,
grn_encoding encoding,
grn_obj **  tokenizer,
grn_obj **  normalizer 
)

Definition at line 1897 of file db.c.

Here is the caller graph for this function:

int grn_table_get_key ( grn_ctx ctx,
grn_obj table,
grn_id  id,
void *  keybuf,
int  buf_size 
)

Definition at line 1392 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_table_get_key2 ( grn_ctx ctx,
grn_obj table,
grn_id  id,
grn_obj bulk 
)

Definition at line 1425 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int grn_table_get_subrecs ( grn_ctx ctx,
grn_obj table,
grn_id  id,
grn_id subrecbuf,
int *  scorebuf,
int  buf_size 
)

Definition at line 939 of file db.c.

Here is the call graph for this function:

grn_id grn_table_get_v ( grn_ctx ctx,
grn_obj table,
const void *  key,
int  key_size,
void **  value 
)

Definition at line 1364 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_group ( grn_ctx ctx,
grn_obj table,
grn_table_sort_key keys,
int  n_keys,
grn_table_group_result results,
int  n_results 
)

Definition at line 3106 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_group_with_range_gap ( grn_ctx ctx,
grn_obj table,
grn_table_sort_key group_key,
grn_obj res,
uint32_t  range_gap 
)

Definition at line 3003 of file db.c.

Here is the call graph for this function:

grn_bool grn_table_is_grouped ( grn_ctx ctx,
grn_obj table 
)

Definition at line 9330 of file db.c.

grn_id grn_table_lcp_search ( grn_ctx ctx,
grn_obj table,
const void *  key,
unsigned int  key_size 
)

Definition at line 1033 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int grn_table_max_n_subrecs ( grn_ctx ctx,
grn_obj table 
)

Definition at line 9339 of file db.c.

grn_id grn_table_next ( grn_ctx ctx,
grn_obj table,
grn_id  id 
)

Definition at line 2618 of file db.c.

Here is the call graph for this function:

grn_obj* grn_table_open ( grn_ctx ctx,
const char *  name,
unsigned int  name_size,
const char *  path 
)

Definition at line 982 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_rename ( grn_ctx ctx,
grn_obj table,
const char *  name,
unsigned int  name_size 
)

Definition at line 7224 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_search ( grn_ctx ctx,
grn_obj table,
const void *  key,
uint32_t  key_size,
grn_operator  mode,
grn_obj res,
grn_operator  op 
)

Definition at line 2494 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_setoperation ( grn_ctx ctx,
grn_obj table1,
grn_obj table2,
grn_obj res,
grn_operator  op 
)

Definition at line 3228 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int grn_table_size ( grn_ctx ctx,
grn_obj table 
)

Definition at line 1939 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

int grn_table_sort ( grn_ctx ctx,
grn_obj table,
int  offset,
int  limit,
grn_obj result,
grn_table_sort_key keys,
int  n_keys 
)

Definition at line 8500 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_sort_key_close ( grn_ctx ctx,
grn_table_sort_key keys,
unsigned int  nkeys 
)

Definition at line 9317 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_table_sort_key* grn_table_sort_key_from_str ( grn_ctx ctx,
const char *  str,
unsigned int  str_size,
grn_obj table,
unsigned int *  nkeys 
)

Definition at line 9261 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_table_tokenize ( grn_ctx ctx,
grn_obj table,
const char *  str,
unsigned int  str_len,
grn_obj buf,
grn_bool  addp 
)

Definition at line 9348 of file db.c.

Here is the call graph for this function:

grn_rc grn_table_truncate ( grn_ctx ctx,
grn_obj table 
)

Definition at line 1835 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_table_update ( grn_ctx ctx,
grn_obj table,
const void *  src_key,
unsigned int  src_key_size,
const void *  dest_key,
unsigned int  dest_key_size 
)

Definition at line 7196 of file db.c.

Here is the call graph for this function:

grn_rc grn_table_update_by_id ( grn_ctx ctx,
grn_obj table,
grn_id  id,
const void *  dest_key,
unsigned int  dest_key_size 
)

Definition at line 7174 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_obj* grn_type_create ( grn_ctx ctx,
const char *  name,
unsigned int  name_size,
grn_obj_flags  flags,
unsigned int  size 
)

Definition at line 504 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_vector_add_element ( grn_ctx ctx,
grn_obj vector,
const char *  str,
unsigned int  str_len,
unsigned int  weight,
grn_id  domain 
)

Definition at line 3958 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_vector_decode ( grn_ctx ctx,
grn_obj v,
const char *  data,
uint32_t  data_size 
)

Definition at line 3914 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

grn_rc grn_vector_delimit ( grn_ctx ctx,
grn_obj v,
unsigned int  weight,
grn_id  domain 
)

Definition at line 3892 of file db.c.

Here is the caller graph for this function:

unsigned int grn_vector_get_element ( grn_ctx ctx,
grn_obj vector,
unsigned int  offset,
const char **  str,
unsigned int *  weight,
grn_id domain 
)

Definition at line 3833 of file db.c.

Here is the caller graph for this function:

unsigned int grn_vector_pop_element ( grn_ctx ctx,
grn_obj vector,
const char **  str,
unsigned int *  weight,
grn_id domain 
)

Definition at line 3860 of file db.c.

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int grn_vector_size ( grn_ctx ctx,
grn_obj vector 
)

Definition at line 3785 of file db.c.

Here is the caller graph for this function: