Groonga
Loading...
Searching...
No Matches
proc.h
Go to the documentation of this file.
1/*
2 Copyright(C) 2009-2018 Brazil
3 Copyright(C) 2020-2023 Sutou Kouhei <kou@clear-code.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19
20#pragma once
21
22#include <groonga.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
41
61 const char *name,
62 int name_size,
63 grn_proc_type type,
64 grn_proc_func *init,
65 grn_proc_func *next,
66 grn_proc_func *fin,
67 unsigned int nvars,
68 grn_expr_var *vars);
82 grn_user_data *user_data,
83 grn_expr_var **vars,
84 unsigned int *nvars,
85 grn_obj **caller);
88
90 const char *name,
91 grn_obj *value,
92 const char *tag,
93 void *user_data);
94
110
113 grn_obj *options,
114 const char *prefix,
115 const char *tag,
116 const char *name,
117 ...);
118
121 grn_obj *options,
122 const char *prefix,
123 const char *tag,
124 const char *name,
125 va_list args);
126
129 grn_ctx *ctx, grn_obj *options, const char *tag, const char *name, ...);
130
133 grn_obj *options,
134 const char *tag,
135 const char *name,
136 va_list args);
137
140 const char *function_name,
141 grn_obj **args,
142 int n_args,
143 grn_obj *cache_key);
144
145#ifdef __cplusplus
146}
147#endif
grn_rc
Definition groonga.h:61
grn_obj * grn_proc_func(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
Definition groonga.h:346
#define GRN_API
Definition groonga.h:39
grn_proc_option_value_type
Definition proc.h:95
@ GRN_PROC_OPTION_VALUE_INT64
Definition proc.h:102
@ GRN_PROC_OPTION_VALUE_TOKEN_CURSOR_FLAGS
Definition proc.h:106
@ GRN_PROC_OPTION_VALUE_DOUBLE
Definition proc.h:107
@ GRN_PROC_OPTION_VALUE_OPERATOR
Definition proc.h:98
@ GRN_PROC_OPTION_VALUE_FUNC
Definition proc.h:104
@ GRN_PROC_OPTION_VALUE_RAW
Definition proc.h:96
@ GRN_PROC_OPTION_VALUE_TOKENIZE_MODE
Definition proc.h:105
@ GRN_PROC_OPTION_VALUE_RAW_STRING
Definition proc.h:108
@ GRN_PROC_OPTION_VALUE_INT32
Definition proc.h:100
@ GRN_PROC_OPTION_VALUE_EXPR_FLAGS
Definition proc.h:99
@ GRN_PROC_OPTION_VALUE_UINT32
Definition proc.h:101
@ GRN_PROC_OPTION_VALUE_MODE
Definition proc.h:97
@ GRN_PROC_OPTION_VALUE_BOOL
Definition proc.h:103
grn_rc(* grn_proc_option_value_parse_func)(grn_ctx *ctx, const char *name, grn_obj *value, const char *tag, void *user_data)
Definition proc.h:89
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_proc_type grn_proc_get_type(grn_ctx *ctx, grn_obj *proc)
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_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_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_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_rc grn_proc_options_parsev(grn_ctx *ctx, grn_obj *options, const char *tag, const char *name, va_list args)
grn_proc_type
Definition proc.h:28
@ GRN_PROC_AGGREGATOR
Definition proc.h:38
@ GRN_PROC_COMMAND
Definition proc.h:31
@ GRN_PROC_INVALID
Definition proc.h:29
@ GRN_PROC_FUNCTION
Definition proc.h:32
@ GRN_PROC_EXTRACTOR
Definition proc.h:39
@ GRN_PROC_SCORER
Definition proc.h:36
@ GRN_PROC_HOOK
Definition proc.h:33
@ GRN_PROC_TOKENIZER
Definition proc.h:30
@ GRN_PROC_NORMALIZER
Definition proc.h:34
@ GRN_PROC_TOKEN_FILTER
Definition proc.h:35
@ GRN_PROC_WINDOW_FUNCTION
Definition proc.h:37
GRN_API grn_rc grn_proc_options_parse(grn_ctx *ctx, grn_obj *options, const char *tag, const char *name,...)
Definition groonga.h:351
Definition groonga.h:919
Definition groonga.h:1139
Definition groonga.h:339