Go to the source code of this file.
|
| enum | grn_proc_type {
GRN_PROC_INVALID = 0
, GRN_PROC_TOKENIZER
, GRN_PROC_COMMAND
, GRN_PROC_FUNCTION
,
GRN_PROC_HOOK
, GRN_PROC_NORMALIZER
, GRN_PROC_TOKEN_FILTER
, GRN_PROC_SCORER
,
GRN_PROC_WINDOW_FUNCTION
, GRN_PROC_AGGREGATOR
, GRN_PROC_EXTRACTOR
} |
| |
| enum | grn_proc_option_value_type {
GRN_PROC_OPTION_VALUE_RAW
, GRN_PROC_OPTION_VALUE_MODE
, GRN_PROC_OPTION_VALUE_OPERATOR
, GRN_PROC_OPTION_VALUE_EXPR_FLAGS
,
GRN_PROC_OPTION_VALUE_INT32
, GRN_PROC_OPTION_VALUE_UINT32
, GRN_PROC_OPTION_VALUE_INT64
, GRN_PROC_OPTION_VALUE_BOOL
,
GRN_PROC_OPTION_VALUE_FUNC
, GRN_PROC_OPTION_VALUE_TOKENIZE_MODE
, GRN_PROC_OPTION_VALUE_TOKEN_CURSOR_FLAGS
, GRN_PROC_OPTION_VALUE_DOUBLE
,
GRN_PROC_OPTION_VALUE_RAW_STRING
} |
| |
|
| GRN_API 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) |
| | Create the procedure in the database handled by ctx.
|
| |
| GRN_API grn_obj * | grn_proc_get_info (grn_ctx *ctx, grn_user_data *user_data, grn_expr_var **vars, unsigned int *nvars, grn_obj **caller) |
| | Get information on procedure and expression that use user_data.
|
| |
| GRN_API grn_proc_type | grn_proc_get_type (grn_ctx *ctx, grn_obj *proc) |
| |
| GRN_API grn_rc | grn_proc_prefixed_options_parse (grn_ctx *ctx, grn_obj *options, const char *prefix, const char *tag, const char *name,...) |
| |
| GRN_API grn_rc | grn_proc_prefixed_options_parsev (grn_ctx *ctx, grn_obj *options, const char *prefix, const char *tag, const char *name, va_list args) |
| |
| GRN_API grn_rc | grn_proc_options_parse (grn_ctx *ctx, grn_obj *options, const char *tag, const char *name,...) |
| |
| GRN_API grn_rc | grn_proc_options_parsev (grn_ctx *ctx, grn_obj *options, const char *tag, const char *name, va_list args) |
| |
| GRN_API grn_rc | grn_proc_func_generate_cache_key (grn_ctx *ctx, const char *function_name, grn_obj **args, int n_args, grn_obj *cache_key) |
| |
◆ grn_proc_option_value_parse_func
| typedef grn_rc(* grn_proc_option_value_parse_func) (grn_ctx *ctx, const char *name, grn_obj *value, const char *tag, void *user_data) |
◆ grn_proc_option_value_type
| Enumerator |
|---|
| GRN_PROC_OPTION_VALUE_RAW | |
| GRN_PROC_OPTION_VALUE_MODE | |
| GRN_PROC_OPTION_VALUE_OPERATOR | |
| GRN_PROC_OPTION_VALUE_EXPR_FLAGS | |
| GRN_PROC_OPTION_VALUE_INT32 | |
| GRN_PROC_OPTION_VALUE_UINT32 | |
| GRN_PROC_OPTION_VALUE_INT64 | |
| GRN_PROC_OPTION_VALUE_BOOL | |
| GRN_PROC_OPTION_VALUE_FUNC | |
| GRN_PROC_OPTION_VALUE_TOKENIZE_MODE | |
| GRN_PROC_OPTION_VALUE_TOKEN_CURSOR_FLAGS | |
| GRN_PROC_OPTION_VALUE_DOUBLE | |
| GRN_PROC_OPTION_VALUE_RAW_STRING | |
◆ grn_proc_type
| Enumerator |
|---|
| GRN_PROC_INVALID | |
| GRN_PROC_TOKENIZER | |
| GRN_PROC_COMMAND | |
| GRN_PROC_FUNCTION | |
| GRN_PROC_HOOK | |
| GRN_PROC_NORMALIZER | |
| GRN_PROC_TOKEN_FILTER | |
| GRN_PROC_SCORER | |
| GRN_PROC_WINDOW_FUNCTION | |
| GRN_PROC_AGGREGATOR | |
| GRN_PROC_EXTRACTOR | |
◆ grn_proc_create()
Create the procedure in the database handled by ctx.
- Parameters
-
| ctx | The context object. |
| name | Name of procedure. |
| name_size | The number of bytes of name parameter. If negative value is specified, name parameter is assumed that NULL-terminated string. |
| type | Type of procedure. |
| init | Initialization callback function. |
| next | Main callback function. |
| fin | Finalization callback function. |
| nvars | The number of vars. |
| vars | Variables used in callback functions. |
- Returns
- The procedure object on success,
NULL on error.
◆ grn_proc_func_generate_cache_key()
◆ grn_proc_get_info()
Get information on procedure and expression that use user_data.
- Parameters
-
| ctx | The context object. |
| user_data | The user data passed to grn_proc_func. |
| vars | The buffer to store defined variables. |
| nvars | The buffer to store the number of vars. |
| caller | The buffer to store calling expression. |
- Returns
- The procedure object. It may be
NULL.
◆ grn_proc_get_type()
◆ grn_proc_options_parse()
◆ grn_proc_options_parsev()
◆ grn_proc_prefixed_options_parse()
| GRN_API grn_rc grn_proc_prefixed_options_parse |
( |
grn_ctx * |
ctx, |
|
|
grn_obj * |
options, |
|
|
const char * |
prefix, |
|
|
const char * |
tag, |
|
|
const char * |
name, |
|
|
|
... |
|
) |
| |
◆ grn_proc_prefixed_options_parsev()
| GRN_API grn_rc grn_proc_prefixed_options_parsev |
( |
grn_ctx * |
ctx, |
|
|
grn_obj * |
options, |
|
|
const char * |
prefix, |
|
|
const char * |
tag, |
|
|
const char * |
name, |
|
|
va_list |
args |
|
) |
| |