Debian Codegraph @

lib/proc.c

raw symbols SCIP
1 /*
2 Copyright (C) 2009-2018 Brazil
3 Copyright (C) 2018-2026 Sutou Kouhei <[email protected]>
4 Copyright (C) 2021 Horimoto Yasuhiro <[email protected]>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Lesser General Public
8 License as published by the Free Software Foundation; either
9 version 2.1 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public
17 License along with this library; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21 #include "grn_cache.h"cxx . . $ `<file>/lib/grn_cache.h`/
22 #include "grn_ctx.h"cxx . . $ `<file>/lib/grn_ctx.h`/
23 #include "grn_ctx_impl.h"cxx . . $ `<file>/lib/grn_ctx_impl.h`/
24 #include "grn_db.h"cxx . . $ `<file>/lib/grn_db.h`/
25 #include "grn_expr.h"cxx . . $ `<file>/lib/grn_expr.h`/
26 #include "grn_float.h"cxx . . $ `<file>/lib/grn_float.h`/
27 #include "grn_geo.h"cxx . . $ `<file>/lib/grn_geo.h`/
28 #include "grn_ii.h"cxx . . $ `<file>/lib/grn_ii.h`/
29 #include "grn_load.h"cxx . . $ `<file>/lib/grn_load.h`/
30 #include "grn_output.h"cxx . . $ `<file>/lib/grn_output.h`/
31 #include "grn_pat.h"cxx . . $ `<file>/lib/grn_pat.h`/
32 #include "grn_posting.h"cxx . . $ `<file>/lib/grn_posting.h`/
33 #include "grn_proc.h"cxx . . $ `<file>/lib/grn_proc.h`/
34 #include "grn_report.h"cxx . . $ `<file>/lib/grn_report.h`/
35 #include "grn_str.h"cxx . . $ `<file>/lib/grn_str.h`/
36 #include "grn_util.h"cxx . . $ `<file>/lib/grn_util.h`/
37
38 #include <string.h>
39 #include <stdlib.h>
40 #include <fcntl.h>
41 #include <sys/stat.h>
42
43 #ifdef WIN32
44 # include <io.h>
45 # include <share.h>
46 #endif /* WIN32 */
47
48 #ifdef GRN_WITH_APACHE_ARROW
49 # include <arrow/util/config.h>
50 #endif
51
52 #ifndef O_NOFOLLOWcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:141:10`!
53 # define O_NOFOLLOW 0
54 #endif
55
56 /**** globals for procs ****/
57 const char *grn_document_rootcxx . . $ grn_document_root. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
58
59 #define VARcxx . . $ `lib/proc.c:59:9`! GRN_PROC_GET_VAR_BY_OFFSETcxx . . $ `lib/grn_db.h:485:9`!
60
61 static double grn_between_too_many_index_match_ratiocxx . . $ grn_between_too_many_index_match_ratio. = 0.01;
62 static double grn_in_values_too_many_index_match_ratiocxx . . $ grn_in_values_too_many_index_match_ratio. = 0.01;
63 static int32_tcxx . . $ int32_t# grn_sub_filter_pre_filter_thresholdcxx . . $ grn_sub_filter_pre_filter_threshold. = 10;
64
65 void
66 grn_proc_init_from_envcxx . . $ grn_proc_init_from_env(49f6e7a06ebc5aa8).(void)
67 {
68 {
69 char grn_between_too_many_index_match_ratio_env[GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!];
70 grn_getenvcxx . . $ `include/groonga/portability.h:58:11`!("GRN_BETWEEN_TOO_MANY_INDEX_MATCH_RATIO",
71 grn_between_too_many_index_match_ratio_env,
72 GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!);
73 if (grn_between_too_many_index_match_ratio_env[0]) {
74 grn_between_too_many_index_match_ratiocxx . . $ grn_between_too_many_index_match_ratio. =
75 atofcxx . . $ atof(9a18bdb0e56c1bc2).(grn_between_too_many_index_match_ratio_env);
76 }
77 }
78
79 {
80 char grn_in_values_too_many_index_match_ratio_env[GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!];
81 grn_getenvcxx . . $ `include/groonga/portability.h:58:11`!("GRN_IN_VALUES_TOO_MANY_INDEX_MATCH_RATIO",
82 grn_in_values_too_many_index_match_ratio_env,
83 GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!);
84 if (grn_in_values_too_many_index_match_ratio_env[0]) {
85 grn_in_values_too_many_index_match_ratiocxx . . $ grn_in_values_too_many_index_match_ratio. =
86 atofcxx . . $ atof(9a18bdb0e56c1bc2).(grn_in_values_too_many_index_match_ratio_env);
87 }
88 }
89
90 {
91 char env[GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!];
92 grn_getenvcxx . . $ `include/groonga/portability.h:58:11`!("GRN_SUB_FILTER_PRE_FILTER_THRESHOLD", env, GRN_ENV_BUFFER_SIZEcxx . . $ `include/groonga/portability.h:42:9`!);
93 if (env[0]) {
94 grn_sub_filter_pre_filter_thresholdcxx . . $ grn_sub_filter_pre_filter_threshold. =
95 grn_atoicxx . . $ grn_atoi(adf3ff2c2b114929).(env, env + strlencxx . . $ strlen(751346f8406fd082).(env), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
96 }
97 }
98 }
99
100 /* bulk must be initialized grn_bulk or grn_msg */
101 static int
102 grn_bulk_put_from_filecxx . . $ grn_bulk_put_from_file(3331204c8ace718d).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *bulk, const char *path)
103 {
104 /* FIXME: implement more smartly with grn_bulk */
105 int fd, ret = 0;
106 struct statcxx . . $ stat# stat;
107 grn_opencxx . . $ `include/groonga/portability.h:172:11`!(fd, path, O_RDONLYcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:43:9`! | O_NOFOLLOWcxx . . $ `<external>/14578502075116107718/fcntl-linux.h:141:10`! | GRN_OPEN_FLAG_BINARYcxx . . $ `include/groonga/portability.h:171:11`!);
108 if (fd == -1) {
109 switch (errnocxx . . $ `<external>/17633486526465735210/errno.h:38:10`!) {
110 case EACCEScxx . . $ `<external>/8987895939074593727/errno-base.h:17:9`!:
111 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_OPERATION_NOT_PERMITTED, "request is not allowed: <%s>", path);
112 break;
113 case ENOENTcxx . . $ `<external>/8987895939074593727/errno-base.h:6:9`!:
114 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_NO_SUCH_FILE_OR_DIRECTORY, "no such file: <%s>", path);
115 break;
116 #ifndef WIN32
117 case ELOOPcxx . . $ `<external>/17922322188510340118/errno.h:21:9`!:
118 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_NO_SUCH_FILE_OR_DIRECTORY,
119 "symbolic link is not allowed: <%s>",
120 path);
121 break;
122 #endif /* WIN32 */
123 default:
124 ERRNO_ERRcxx . . $ `lib/grn_error.h:569:11`!("failed to open file: <%s>", path);
125 break;
126 }
127 return 0;
128 }
129 if (fstatcxx . . $ fstat(a43660ce2f600cb5).(fd, &stat) != -1) {
130 char *buf, *bp;
131 off_tcxx . . $ off_t# rest = stat.st_sizecxx . . $ stat#st_size.;
132 if ((buf = GRN_MALLOCcxx . . $ `lib/grn_alloc.h:41:9`!(rest))) {
133 ssize_tcxx . . $ ssize_t# ss;
134 for (bp = buf; rest; rest -= ss, bp += ss) {
135 if ((ss = grn_readcxx . . $ `include/groonga/portability.h:161:11`!(fd, bp, rest)) == -1) {
136 goto exit;
137 }
138 }
139 GRN_TEXT_PUTcxx . . $ `include/groonga/groonga.h:2773:9`!(ctx, bulk, buf, stat.st_size);
140 ret = 1;
141 }
142 GRN_FREEcxx . . $ `lib/grn_alloc.h:49:9`!(buf);
143 } else {
144 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "cannot stat file: <%s>", path);
145 }
146 exit:
147 grn_closecxx . . $ `include/groonga/portability.h:179:11`!(fd);
148 return ret;
149 }
150
151 #ifdef stat
152 # undef stat
153 #endif /* stat */
154
155 grn_rccxx . . $ grn_rc#
156 grn_proc_prefixed_options_parsecxx . . $ grn_proc_prefixed_options_parse(1f3a898237d3ba1a).(grn_ctxcxx . . $ grn_ctx# *ctx,
157 grn_objcxx . . $ grn_obj# *options,
158 const char *prefix,
159 const char *tag,
160 const char *name,
161 ...)
162 {
163 va_listcxx . . $ va_list# args;
164
165 va_startcxx . . $ `<external>/8293021631987149590/stdarg.h:51:9`!(args, name);
166 grn_rccxx . . $ grn_rc# rc =
167 grn_proc_prefixed_options_parsevcxx . . $ grn_proc_prefixed_options_parsev(ff1bdbb2c6bc79eb).(ctx, options, prefix, tag, name, args);
168 va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(args);
169
170 return rc;
171 }
172
173 grn_rccxx . . $ grn_rc#
174 grn_proc_prefixed_options_parsevcxx . . $ grn_proc_prefixed_options_parsev(ff1bdbb2c6bc79eb).(grn_ctxcxx . . $ grn_ctx# *ctx,
175 grn_objcxx . . $ grn_obj# *options,
176 const char *prefix,
177 const char *tag,
178 const char *name,
179 va_listcxx . . $ va_list# args)
180 {
181 GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!;
182
183 grn_objcxx . . $ grn_obj# func_tag_buffer;
184 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&func_tag_buffer, 0);
185 grn_text_printfcxx . . $ grn_text_printf(34596149d4dc0292).(ctx, &func_tag_buffer, "%s[options][parse]", tag);
186 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, &func_tag_buffer, '\0');
187 const char *func_tag = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&func_tag_buffer);
188
189 grn_objcxx . . $ grn_obj# full_name;
190 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&full_name, 0);
191
192 grn_objcxx . . $ grn_obj# used_ids;
193 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&used_ids, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!, GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!);
194
195 if (options->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. != GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!) {
196 grn_objcxx . . $ grn_obj# inspected;
197 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
198 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, options);
199 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
200 GRN_INVALID_ARGUMENT,
201 "%s options must be a hash table: %.*s",
202 func_tag,
203 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
204 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
205 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
206 goto exit;
207 }
208
209 const size_t n_specified_options = grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, options);
210 while (name && GRN_RECORD_VECTOR_SIZEcxx . . $ `include/groonga/groonga.h:3264:9`!(&used_ids) < n_specified_options) {
211 grn_proc_option_value_typecxx . . $ grn_proc_option_value_type# type = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_proc_option_value_type);
212 void *value_raw = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
213 GRN_TEXT_SETScxx . . $ `include/groonga/groonga.h:2783:9`!(ctx, &full_name, prefix);
214 GRN_TEXT_PUTScxx . . $ `include/groonga/groonga.h:2781:9`!(ctx, &full_name, name);
215 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, &full_name, '\0');
216 grn_idcxx . . $ grn_id# id = grn_hash_getcxx . . $ grn_hash_get(4e868e5367e71b67).(ctx,
217 (grn_hashcxx . . $ grn_hash# *)options,
218 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&full_name),
219 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&full_name) - 1,
220 &value_raw);
221 grn_objcxx . . $ grn_obj# *value = value_raw;
222 switch (type) {
223 case GRN_PROC_OPTION_VALUE_RAWcxx . . $ GRN_PROC_OPTION_VALUE_RAW.:
224 {
225 grn_objcxx . . $ grn_obj# **raw = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_obj **);
226 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
227 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
228 *raw = value;
229 }
230 }
231 break;
232 case GRN_PROC_OPTION_VALUE_MODEcxx . . $ GRN_PROC_OPTION_VALUE_MODE.:
233 {
234 grn_operatorcxx . . $ grn_operator# *mode = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_operator *);
235 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
236 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
237 *mode = grn_proc_get_value_modecxx . . $ grn_proc_get_value_mode(db52f52f4dd070c1).(ctx, value, *mode, func_tag);
238 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
239 goto exit;
240 }
241 }
242 }
243 break;
244 case GRN_PROC_OPTION_VALUE_OPERATORcxx . . $ GRN_PROC_OPTION_VALUE_OPERATOR.:
245 {
246 grn_operatorcxx . . $ grn_operator# *op = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_operator *);
247 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
248 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
249 *op = grn_proc_get_value_operatorcxx . . $ grn_proc_get_value_operator(db52f52f4dd070c1).(ctx, value, *op, func_tag);
250 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
251 goto exit;
252 }
253 }
254 }
255 break;
256 case GRN_PROC_OPTION_VALUE_EXPR_FLAGScxx . . $ GRN_PROC_OPTION_VALUE_EXPR_FLAGS.:
257 {
258 grn_expr_flagscxx . . $ grn_expr_flags# *flags = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_expr_flags *);
259 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
260 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
261 *flags = grn_proc_expr_query_flags_parsecxx . . $ grn_proc_expr_query_flags_parse(5a2d2f6494518303).(ctx, value, func_tag);
262 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
263 goto exit;
264 }
265 }
266 }
267 break;
268 case GRN_PROC_OPTION_VALUE_INT32cxx . . $ GRN_PROC_OPTION_VALUE_INT32.:
269 {
270 int32_tcxx . . $ int32_t# *number = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, int32_t *);
271 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
272 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
273 *number = grn_proc_get_value_int32cxx . . $ grn_proc_get_value_int32(398b30e9dc37a61b).(ctx, value, *number, func_tag);
274 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
275 goto exit;
276 }
277 }
278 }
279 break;
280 case GRN_PROC_OPTION_VALUE_UINT32cxx . . $ GRN_PROC_OPTION_VALUE_UINT32.:
281 {
282 uint32_tcxx . . $ uint32_t# *number = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, uint32_t *);
283 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
284 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
285 *number = grn_proc_get_value_uint32cxx . . $ grn_proc_get_value_uint32(edee37734fa14a15).(ctx, value, *number, func_tag);
286 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
287 goto exit;
288 }
289 }
290 }
291 break;
292 case GRN_PROC_OPTION_VALUE_INT64cxx . . $ GRN_PROC_OPTION_VALUE_INT64.:
293 {
294 int64_tcxx . . $ int64_t# *number = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, int64_t *);
295 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
296 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
297 *number = grn_proc_get_value_int64cxx . . $ grn_proc_get_value_int64(7238b57f8c735d17).(ctx, value, *number, func_tag);
298 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
299 goto exit;
300 }
301 }
302 }
303 break;
304 case GRN_PROC_OPTION_VALUE_BOOLcxx . . $ GRN_PROC_OPTION_VALUE_BOOL.:
305 {
306 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! *b = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! *);
307 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
308 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
309 *b = grn_proc_get_value_boolcxx . . $ grn_proc_get_value_bool(d6418eb1362f7a09).(ctx, value, *b, func_tag);
310 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
311 goto exit;
312 }
313 }
314 }
315 break;
316 case GRN_PROC_OPTION_VALUE_FUNCcxx . . $ GRN_PROC_OPTION_VALUE_FUNC.:
317 {
318 grn_proc_option_value_parse_funccxx . . $ grn_proc_option_value_parse_func# func =
319 va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_proc_option_value_parse_func);
320 void *user_data = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, void *);
321 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
322 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
323 grn_rccxx . . $ grn_rc# rc =
324 func(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&full_name), value, func_tag, user_data);
325 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
326 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
327 grn_objcxx . . $ grn_obj# inspected;
328 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
329 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
330 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
331 rc,
332 "%s[%s] failed to parse: <%.*s>",
333 func_tag,
334 name,
335 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
336 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
337 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
338 }
339 goto exit;
340 }
341 }
342 }
343 break;
344 case GRN_PROC_OPTION_VALUE_TOKENIZE_MODEcxx . . $ GRN_PROC_OPTION_VALUE_TOKENIZE_MODE.:
345 {
346 grn_tokenize_modecxx . . $ grn_tokenize_mode# *mode = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_tokenize_mode *);
347 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
348 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
349 *mode = grn_proc_get_value_tokenize_modecxx . . $ grn_proc_get_value_tokenize_mode(c059d05b18bb04e9).(ctx, value, *mode, func_tag);
350 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
351 goto exit;
352 }
353 }
354 }
355 break;
356 case GRN_PROC_OPTION_VALUE_TOKEN_CURSOR_FLAGScxx . . $ GRN_PROC_OPTION_VALUE_TOKEN_CURSOR_FLAGS.:
357 {
358 uint32_tcxx . . $ uint32_t# *flags = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, uint32_t *);
359 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
360 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
361 *flags =
362 grn_proc_get_value_token_cursor_flagscxx . . $ grn_proc_get_value_token_cursor_flags(edee37734fa14a15).(ctx, value, *flags, func_tag);
363 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
364 goto exit;
365 }
366 }
367 }
368 break;
369 case GRN_PROC_OPTION_VALUE_DOUBLEcxx . . $ GRN_PROC_OPTION_VALUE_DOUBLE.:
370 {
371 double *number = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, double *);
372 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
373 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
374 *number = grn_proc_get_value_doublecxx . . $ grn_proc_get_value_double(29f41cb7e20a0e4c).(ctx, value, *number, func_tag);
375 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
376 goto exit;
377 }
378 }
379 }
380 break;
381 case GRN_PROC_OPTION_VALUE_RAW_STRINGcxx . . $ GRN_PROC_OPTION_VALUE_RAW_STRING.:
382 {
383 grn_raw_stringcxx . . $ grn_raw_string# *string = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, grn_raw_string *);
384 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
385 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &used_ids, id);
386 *string = grn_proc_get_value_raw_stringcxx . . $ grn_proc_get_value_raw_string(dd6f5cf4618a8970).(ctx, value, string, func_tag);
387 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
388 goto exit;
389 }
390 }
391 }
392 break;
393 default:
394 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
395 GRN_INVALID_ARGUMENT,
396 "%s[%s] invalid option value type: %d",
397 func_tag,
398 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&full_name),
399 type);
400 goto exit;
401 }
402 name = va_argcxx . . $ `<external>/8293021631987149590/stdarg.h:54:9`!(args, const char *);
403 }
404
405 const size_t n_used_options = GRN_RECORD_VECTOR_SIZEcxx . . $ `include/groonga/groonga.h:3264:9`!(&used_ids);
406 if (n_used_options == n_specified_options) {
407 goto exit;
408 }
409
410 {
411 grn_objcxx . . $ grn_obj# message;
412 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&message, 0);
413 GRN_HASH_EACH_BEGINcxx . . $ `include/groonga/hash.h:141:9`!(ctx, (grn_hash *)options, cursor, id)
414 {
415 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! is_used_option = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
416 size_t i;
417 for (i = 0; i < n_used_options; i++) {
418 if (GRN_RECORD_VALUE_ATcxx . . $ `include/groonga/groonga.h:3148:9`!(&used_ids, i) == id) {
419 is_used_option = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
420 break;
421 }
422 }
423 if (is_used_option) {
424 continue;
425 }
426
427 void *key;
428 int key_size = grn_hash_cursor_get_keycxx . . $ grn_hash_cursor_get_key(248c0d78df691c42).(ctx, cursor, &key);
429 grn_raw_stringcxx . . $ grn_raw_string# key_string;
430 key_string.valuecxx . . $ $anonymous_type_7f733dd816802915_0#value. = key;
431 key_string.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length. = key_size;
432 if (!GRN_RAW_STRING_START_WITH_CSTRINGcxx . . $ `include/groonga/raw_string.h:69:9`!(key_string, prefix)) {
433 continue;
434 }
435 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&message) > 0) {
436 GRN_TEXT_PUTScxx . . $ `include/groonga/groonga.h:2781:9`!(ctx, &message, ", ");
437 }
438 grn_text_printfcxx . . $ grn_text_printf(34596149d4dc0292).(ctx, &message, "<%.*s>", key_size, (char *)key);
439 }
440 GRN_HASH_EACH_ENDcxx . . $ `include/groonga/hash.h:159:9`!(ctx, cursor);
441 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&message) > 0) {
442 grn_objcxx . . $ grn_obj# inspected;
443 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
444 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, options);
445 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
446 GRN_INVALID_ARGUMENT,
447 "%s unknown option names: %.*s: %.*s",
448 func_tag,
449 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&message),
450 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&message),
451 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
452 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
453 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
454 }
455 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &message);
456 }
457
458 exit:
459 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &used_ids);
460 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &full_name);
461 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &func_tag_buffer);
462 GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc);
463 }
464
465 grn_rccxx . . $ grn_rc#
466 grn_proc_options_parsecxx . . $ grn_proc_options_parse(b3b87877968531ef).(
467 grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *options, const char *tag, const char *name, ...)
468 {
469 va_listcxx . . $ va_list# args;
470
471 va_startcxx . . $ `<external>/8293021631987149590/stdarg.h:51:9`!(args, name);
472 grn_rccxx . . $ grn_rc# rc = grn_proc_options_parsevcxx . . $ grn_proc_options_parsev(7a6241e3c65fad2f).(ctx, options, tag, name, args);
473 va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(args);
474
475 return rc;
476 }
477
478 grn_rccxx . . $ grn_rc#
479 grn_proc_options_parsevcxx . . $ grn_proc_options_parsev(7a6241e3c65fad2f).(grn_ctxcxx . . $ grn_ctx# *ctx,
480 grn_objcxx . . $ grn_obj# *options,
481 const char *tag,
482 const char *name,
483 va_listcxx . . $ va_list# args)
484 {
485 return grn_proc_prefixed_options_parsevcxx . . $ grn_proc_prefixed_options_parsev(ff1bdbb2c6bc79eb).(ctx, options, "", tag, name, args);
486 }
487
488 static void
489 grn_proc_func_generate_cache_key_addcxx . . $ grn_proc_func_generate_cache_key_add(99eba0d3a8372d65).(grn_ctxcxx . . $ grn_ctx# *ctx,
490 grn_objcxx . . $ grn_obj# *cache_key,
491 grn_objcxx . . $ grn_obj# *arg)
492 {
493 switch (arg->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
494 case GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!:
495 GRN_HASH_EACH_BEGINcxx . . $ `include/groonga/hash.h:141:9`!(ctx, (grn_hash *)arg, cursor, id)
496 {
497 void *key;
498 unsigned int key_size;
499 void *value;
500 int value_size =
501 grn_hash_cursor_get_key_valuecxx . . $ grn_hash_cursor_get_key_value(c02614ac44805bc8).(ctx, cursor, &key, &key_size, &value);
502 GRN_TEXT_PUTcxx . . $ `include/groonga/groonga.h:2773:9`!(ctx, cache_key, key, key_size);
503 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, cache_key, '\1');
504 if (value_size == sizeof(grn_objcxx . . $ grn_obj#)) {
505 grn_proc_func_generate_cache_key_addcxx . . $ grn_proc_func_generate_cache_key_add(99eba0d3a8372d65).(ctx, cache_key, (grn_objcxx . . $ grn_obj# *)value);
506 }
507 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, cache_key, '\2');
508 }
509 GRN_HASH_EACH_ENDcxx . . $ `include/groonga/hash.h:159:9`!(ctx, cursor);
510 break;
511 default:
512 GRN_TEXT_PUTcxx . . $ `include/groonga/groonga.h:2773:9`!(ctx, cache_key, GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(arg), GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(arg));
513 break;
514 }
515 }
516
517 grn_rccxx . . $ grn_rc#
518 grn_proc_func_generate_cache_keycxx . . $ grn_proc_func_generate_cache_key(1f5c90cc9be2f095).(grn_ctxcxx . . $ grn_ctx# *ctx,
519 const char *function_name,
520 grn_objcxx . . $ grn_obj# **args,
521 int n_args,
522 grn_objcxx . . $ grn_obj# *cache_key)
523 {
524 GRN_API_ENTERcxx . . $ `lib/grn_ctx.h:41:9`!;
525 GRN_TEXT_PUTScxx . . $ `include/groonga/groonga.h:2781:9`!(ctx, cache_key, function_name);
526 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, cache_key, '\0');
527 int i;
528 for (i = 0; i < n_args; i++) {
529 grn_proc_func_generate_cache_key_addcxx . . $ grn_proc_func_generate_cache_key_add(99eba0d3a8372d65).(ctx, cache_key, args[i]);
530 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, cache_key, '\0');
531 }
532 GRN_API_RETURNcxx . . $ `lib/grn_ctx.h:56:9`!(ctx->rc);
533 }
534
535 /**** procs ****/
536
537 static grn_objcxx . . $ grn_obj# *
538 proc_loadcxx . . $ proc_load(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
539 {
540 grn_load_inputcxx . . $ grn_load_input# input;
541
542 input.typecxx . . $ grn_load_input_#type. = grn_plugin_proc_get_var_content_typecxx . . $ grn_plugin_proc_get_var_content_type(ae804eec47fca811).(ctx,
543 user_data,
544 "input_type",
545 -1,
546 GRN_CONTENT_JSONcxx . . $ GRN_CONTENT_JSON.);
547 #define INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(member_name, arg_name) \
548 input.member_name.value = \
549 grn_plugin_proc_get_var_string(ctx, \
550 user_data, \
551 arg_name, \
552 -1, \
553 &(input.member_name.length))
554
555 INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(table, "table");
556 INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(columns, "columns");
557 INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(values, "values");
558 INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(if_exists, "ifexists");
559 INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!(each, "each");
560
561 #undef INIT_STRING_ARGUMENTcxx . . $ `lib/proc.c:547:9`!
562
563 input.output_idscxx . . $ grn_load_input_#output_ids. =
564 grn_plugin_proc_get_var_boolcxx . . $ grn_plugin_proc_get_var_bool(544c966dc918f81a).(ctx, user_data, "output_ids", -1, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
565 input.output_errorscxx . . $ grn_load_input_#output_errors. =
566 grn_plugin_proc_get_var_boolcxx . . $ grn_plugin_proc_get_var_bool(544c966dc918f81a).(ctx, user_data, "output_errors", -1, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
567 input.lock_tablecxx . . $ grn_load_input_#lock_table. =
568 grn_plugin_proc_get_var_boolcxx . . $ grn_plugin_proc_get_var_bool(544c966dc918f81a).(ctx, user_data, "lock_table", -1, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
569 input.emit_levelcxx . . $ grn_load_input_#emit_level. = 1;
570
571 grn_load_internalcxx . . $ grn_load_internal(31cfdf7af6a9a4ca).(ctx, &input);
572 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
573 ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..statcxx . . $ $anonymous_type_504cda2014046ec0_2#stat. = GRN_LOADER_ENDcxx . . $ GRN_LOADER_END.;
574 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_CANCELcxx . . $ GRN_CANCEL.) {
575 ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..rccxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#rc. = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
576 }
577 }
578 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! accept_more_data = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
579 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..statcxx . . $ $anonymous_type_504cda2014046ec0_2#stat. == GRN_LOADER_ENDcxx . . $ GRN_LOADER_END.) {
580 accept_more_data = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
581 }
582 if (ctx->implcxx . . $ _grn_ctx#impl.->commandcxx . . $ _grn_ctx_impl#command..flagscxx . . $ _grn_ctx_impl#$anonymous_type_3#flags. & GRN_CTX_TAILcxx . . $ `include/groonga/groonga.h:3294:9`!) {
583 accept_more_data = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
584 }
585 if (accept_more_data) {
586 grn_objcxx . . $ grn_obj# *command = grn_proc_get_infocxx . . $ grn_proc_get_info(760bc9a52c80d02a).(ctx, user_data, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
587 grn_ctx_set_keep_commandcxx . . $ grn_ctx_set_keep_command(cda3a5f3c2e53c6b).(ctx, command);
588 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
589 }
590
591 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..rccxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
592 ctx->rccxx . . $ _grn_ctx#rc. = ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..rccxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#rc.;
593 grn_strcpycxx . . $ `include/groonga/portability.h:101:11`!(ctx->errbuf, GRN_CTX_MSGSIZE, ctx->impl->loader.error.buffer);
594 ctx->errlinecxx . . $ _grn_ctx#errline. = ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..linecxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#line.;
595 ctx->errfilecxx . . $ _grn_ctx#errfile. = ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..filecxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#file.;
596 ctx->errfunccxx . . $ _grn_ctx#errfunc. = ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..errorcxx . . $ $anonymous_type_504cda2014046ec0_2#error..funccxx . . $ $anonymous_type_504cda2014046ec0_2#$anonymous_type_3#func.;
597 }
598 {
599 unsigned int n_records;
600 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..tablecxx . . $ $anonymous_type_504cda2014046ec0_2#table.) {
601 n_records = grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..tablecxx . . $ $anonymous_type_504cda2014046ec0_2#table.);
602 } else {
603 n_records = 0;
604 }
605 GRN_QUERY_LOGcxx . . $ `include/groonga/groonga.h:2585:9`!(ctx,
606 GRN_QUERY_LOG_SIZEcxx . . $ `include/groonga/groonga.h:216:9`!,
607 ":",
608 "load(%d): [%d][%d][%d]",
609 ctx->impl->loader.n_records,
610 ctx->impl->loader.n_record_errors,
611 ctx->impl->loader.n_column_errors,
612 n_records);
613 }
614 if (grn_ctx_get_command_versioncxx . . $ grn_ctx_get_command_version(13d588302524a02f).(ctx) >= GRN_COMMAND_VERSION_3cxx . . $ GRN_COMMAND_VERSION_3.) {
615 int n_elements = 1;
616 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..output_idscxx . . $ $anonymous_type_504cda2014046ec0_2#output_ids.) {
617 n_elements++;
618 }
619 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..output_errorscxx . . $ $anonymous_type_504cda2014046ec0_2#output_errors.) {
620 n_elements++;
621 }
622 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("result", n_elements);
623 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("n_loaded_records");
624 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(ctx->impl->loader.n_records);
625 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..output_idscxx . . $ $anonymous_type_504cda2014046ec0_2#output_ids.) {
626 grn_objcxx . . $ grn_obj# *ids = &(ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..idscxx . . $ $anonymous_type_504cda2014046ec0_2#ids.);
627 int i, n_ids;
628
629 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("loaded_ids");
630 n_ids = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(ids) / sizeof(uint32_tcxx . . $ uint32_t#);
631 GRN_OUTPUT_ARRAY_OPENcxx . . $ `lib/grn_output.h:93:9`!("loaded_ids", n_ids);
632 for (i = 0; i < n_ids; i++) {
633 GRN_OUTPUT_UINT64cxx . . $ `lib/grn_output.h:103:9`!(GRN_UINT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3136:9`!(ids, i));
634 }
635 GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `lib/grn_output.h:95:9`!();
636 }
637 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..output_errorscxx . . $ $anonymous_type_504cda2014046ec0_2#output_errors.) {
638 grn_objcxx . . $ grn_obj# *return_codes = &(ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..return_codescxx . . $ $anonymous_type_504cda2014046ec0_2#return_codes.);
639 grn_objcxx . . $ grn_obj# *error_messages = &(ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..error_messagescxx . . $ $anonymous_type_504cda2014046ec0_2#error_messages.);
640 int i, n;
641
642 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("errors");
643 n = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(return_codes) / sizeof(int32_tcxx . . $ int32_t#);
644 GRN_OUTPUT_ARRAY_OPENcxx . . $ `lib/grn_output.h:93:9`!("errors", n);
645 for (i = 0; i < n; i++) {
646 const char *message;
647 unsigned int message_size;
648
649 message_size =
650 grn_vector_get_elementcxx . . $ grn_vector_get_element(744613554bd9830c).(ctx, error_messages, i, &message, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
651
652 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("error", 2);
653 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("return_code");
654 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(GRN_INT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3134:9`!(return_codes, i));
655 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("message");
656 if (message_size == 0) {
657 GRN_OUTPUT_NULLcxx . . $ `lib/grn_output.h:99:9`!();
658 } else {
659 GRN_OUTPUT_STRcxx . . $ `lib/grn_output.h:106:9`!(message, message_size);
660 }
661 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
662 }
663 GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `lib/grn_output.h:95:9`!();
664 }
665 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
666 } else {
667 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(ctx->impl->loader.n_records);
668 }
669 if (ctx->implcxx . . $ _grn_ctx#impl.->loadercxx . . $ _grn_ctx_impl#loader..tablecxx . . $ $anonymous_type_504cda2014046ec0_2#table.) {
670 grn_db_touchcxx . . $ grn_db_touch(cda3a5f3c2e53c6b).(ctx, DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(ctx->impl->loader.table)->dbcxx . . $ $anonymous_type_4a7c1014017e4c5d_0#db.);
671 }
672 grn_ctx_loader_clearcxx . . $ grn_ctx_loader_clear(b578cd6e53d5fe91).(ctx);
673
674 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
675 }
676
677 static grn_objcxx . . $ grn_obj# *
678 proc_statuscxx . . $ proc_status(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
679 {
680 grn_timevalcxx . . $ grn_timeval# now;
681 grn_cachecxx . . $ grn_cache# *cache;
682 grn_cache_statisticscxx . . $ grn_cache_statistics# statistics;
683 int n_elements = 17;
684 #ifdef GRN_WITH_APACHE_ARROW
685 n_elements++;
686 #endif
687
688 grn_timeval_nowcxx . . $ grn_timeval_now(b116eeadcb699bd1).(ctx, &now);
689 cache = grn_cache_current_getcxx . . $ grn_cache_current_get(ef516a6d4bcbf29d).(ctx);
690 grn_cache_get_statisticscxx . . $ grn_cache_get_statistics(dcaf1d9c443b9507).(ctx, cache, &statistics);
691 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("RESULT", n_elements);
692 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("alloc_count");
693 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(grn_alloc_count());
694 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("starttime");
695 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(grn_starttime.tv_sec);
696 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("start_time");
697 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(grn_starttime.tv_sec);
698 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("uptime");
699 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(now.tv_sec - grn_starttime.tv_sec);
700 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("version");
701 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!(grn_get_version());
702 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("n_queries");
703 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(statistics.nfetches);
704 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("cache_hit_rate");
705 if (statistics.nfetchescxx . . $ $anonymous_type_ec0490bd338ef9cc_0#nfetches. == 0) {
706 GRN_OUTPUT_FLOATcxx . . $ `lib/grn_output.h:104:9`!(0.0);
707 } else {
708 double cache_hit_rate;
709 cache_hit_rate = (double)statistics.nhitscxx . . $ $anonymous_type_ec0490bd338ef9cc_0#nhits. / (double)statistics.nfetchescxx . . $ $anonymous_type_ec0490bd338ef9cc_0#nfetches.;
710 GRN_OUTPUT_FLOATcxx . . $ `lib/grn_output.h:104:9`!(cache_hit_rate * 100.0);
711 }
712 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("command_version");
713 GRN_OUTPUT_INT32cxx . . $ `lib/grn_output.h:100:9`!(grn_ctx_get_command_version(ctx));
714 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("default_command_version");
715 GRN_OUTPUT_INT32cxx . . $ `lib/grn_output.h:100:9`!(grn_get_default_command_version());
716 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max_command_version");
717 GRN_OUTPUT_INT32cxx . . $ `lib/grn_output.h:100:9`!(GRN_COMMAND_VERSION_MAXcxx . . $ `include/groonga/groonga.h:190:9`!);
718 {
719 grn_com_queuecxx . . $ grn_com_queue# *job_queue;
720 job_queue = grn_job_queue_current_getcxx . . $ grn_job_queue_current_get(ec93e435676a5e1b).(ctx);
721 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("n_jobs");
722 if (job_queue) {
723 GRN_OUTPUT_UINT64cxx . . $ `lib/grn_output.h:103:9`!(grn_com_queue_size(ctx, job_queue));
724 } else {
725 GRN_OUTPUT_UINT64cxx . . $ `lib/grn_output.h:103:9`!(0);
726 }
727 }
728 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("features");
729 {
730 const int n_features = 23;
731 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("features", n_features);
732
733 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("nfkc");
734 #ifndef NO_NFKC
735 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
736 #else
737 GRN_OUTPUT_BOOL(false);
738 #endif
739
740 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("mecab");
741 #ifdef GRN_WITH_MECABcxx . . $ `build/config.h:107:9`!
742 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
743 #else
744 GRN_OUTPUT_BOOL(false);
745 #endif
746
747 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("message_pack");
748 #ifdef GRN_WITH_MESSAGE_PACKcxx . . $ `build/config.h:108:9`!
749 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
750 #else
751 GRN_OUTPUT_BOOL(false);
752 #endif
753
754 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("mruby");
755 #ifdef GRN_WITH_MRUBY
756 GRN_OUTPUT_BOOL(true);
757 #else
758 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
759 #endif
760
761 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("onigmo");
762 #ifdef GRN_WITH_ONIGMOcxx . . $ `build/config.h:111:9`!
763 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
764 #else
765 GRN_OUTPUT_BOOL(false);
766 #endif
767
768 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("zlib");
769 #ifdef GRN_WITH_ZLIBcxx . . $ `build/config.h:121:9`!
770 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
771 #else
772 GRN_OUTPUT_BOOL(false);
773 #endif
774
775 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("lz4");
776 #ifdef GRN_WITH_LZ4cxx . . $ `build/config.h:106:9`!
777 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
778 #else
779 GRN_OUTPUT_BOOL(false);
780 #endif
781
782 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("zstandard");
783 #ifdef GRN_WITH_ZSTDcxx . . $ `build/config.h:122:9`!
784 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
785 #else
786 GRN_OUTPUT_BOOL(false);
787 #endif
788
789 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("kqueue");
790 #ifdef USE_KQUEUE
791 GRN_OUTPUT_BOOL(true);
792 #else
793 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
794 #endif
795
796 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("epoll");
797 #ifdef USE_EPOLLcxx . . $ `build/config.h:62:9`!
798 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
799 #else
800 GRN_OUTPUT_BOOL(false);
801 #endif
802
803 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("poll");
804 #ifdef USE_POLL
805 GRN_OUTPUT_BOOL(true);
806 #else
807 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
808 #endif
809
810 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("rapidjson");
811 #ifdef GRN_WITH_RAPIDJSON
812 GRN_OUTPUT_BOOL(true);
813 #else
814 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
815 #endif
816
817 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("apache_arrow");
818 #ifdef GRN_WITH_APACHE_ARROW
819 GRN_OUTPUT_BOOL(true);
820 #else
821 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
822 #endif
823
824 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("xxhash");
825 #ifdef GRN_WITH_XXHASHcxx . . $ `build/config.h:119:9`!
826 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
827 #else
828 GRN_OUTPUT_BOOL(false);
829 #endif
830
831 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("blosc");
832 #ifdef GRN_WITH_BLOSC
833 GRN_OUTPUT_BOOL(true);
834 #else
835 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
836 #endif
837
838 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("bfloat16");
839 #ifdef GRN_HAVE_BFLOAT16
840 GRN_OUTPUT_BOOL(true);
841 #else
842 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
843 #endif
844
845 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("h3");
846 #ifdef GRN_WITH_H3cxx . . $ `build/config.h:99:9`!
847 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
848 #else
849 GRN_OUTPUT_BOOL(false);
850 #endif
851
852 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("simdjson");
853 #ifdef GRN_WITH_SIMDJSONcxx . . $ `build/config.h:115:9`!
854 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
855 #else
856 GRN_OUTPUT_BOOL(false);
857 #endif
858
859 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("llama.cpp");
860 #ifdef GRN_WITH_LLAMA_CPPcxx . . $ `build/config.h:104:9`!
861 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
862 #else
863 GRN_OUTPUT_BOOL(false);
864 #endif
865
866 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("faiss");
867 #ifdef GRN_WITH_FAISScxx . . $ `build/config.h:98:9`!
868 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
869 #else
870 GRN_OUTPUT_BOOL(false);
871 #endif
872
873 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("openzl");
874 #ifdef GRN_WITH_OPENZLcxx . . $ `build/config.h:112:9`!
875 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
876 #else
877 GRN_OUTPUT_BOOL(false);
878 #endif
879
880 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("jsoncons");
881 #ifdef GRN_WITH_JSONCONScxx . . $ `build/config.h:101:9`!
882 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
883 #else
884 GRN_OUTPUT_BOOL(false);
885 #endif
886
887 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("back_trace");
888 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(grn_is_back_trace_enable());
889
890 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("reference_count");
891 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(grn_is_reference_count_enable());
892
893 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
894 }
895 #ifdef GRN_WITH_APACHE_ARROW
896 GRN_OUTPUT_CSTR("apache_arrow");
897 {
898 const int n_apache_arrow_elements = 4;
899 GRN_OUTPUT_MAP_OPEN("apache_arrow", n_apache_arrow_elements);
900
901 GRN_OUTPUT_CSTR("version_major");
902 GRN_OUTPUT_INT32(ARROW_VERSION_MAJOR);
903
904 GRN_OUTPUT_CSTR("version_minor");
905 GRN_OUTPUT_INT32(ARROW_VERSION_MINOR);
906
907 GRN_OUTPUT_CSTR("version_patch");
908 GRN_OUTPUT_INT32(ARROW_VERSION_PATCH);
909
910 GRN_OUTPUT_CSTR("version");
911 GRN_OUTPUT_CSTR(ARROW_VERSION_STRING);
912
913 GRN_OUTPUT_MAP_CLOSE();
914 }
915 #endif
916 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("memory_map_size");
917 GRN_OUTPUT_UINT64cxx . . $ `lib/grn_output.h:103:9`!(grn_get_memory_map_size());
918 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("n_workers");
919 GRN_OUTPUT_INT32cxx . . $ `lib/grn_output.h:100:9`!(grn_ctx_get_n_workers(ctx));
920 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("default_n_workers");
921 GRN_OUTPUT_INT32cxx . . $ `lib/grn_output.h:100:9`!(grn_get_default_n_workers());
922 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("os");
923 #ifdef HOST_OScxx . . $ `build/config.h:5:9`!
924 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!(HOST_OScxx . . $ `build/config.h:5:9`!);
925 #else
926 GRN_OUTPUT_CSTR("Unknown");
927 #endif
928 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("cpu");
929 #ifdef HOST_CPUcxx . . $ `build/config.h:4:9`!
930 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!(HOST_CPUcxx . . $ `build/config.h:4:9`!);
931 #else
932 GRN_OUTPUT_CSTR("unknown");
933 #endif
934 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
935
936 #ifdef GRN_WITH_MEMORY_DEBUG
937 if (grn_plugin_proc_get_var_bool(ctx,
938 user_data,
939 "dump_alloc_info",
940 -1,
941 false)) {
942 grn_alloc_info_dump(&grn_gctx);
943 }
944 #endif
945
946 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
947 }
948
949 #define GRN_STRLENcxx . . $ `lib/proc.c:949:9`!(s) ((s) ? strlen(s) : 0)
950
951 void
952 grn_proc_output_object_namecxx . . $ grn_proc_output_object_name(cda3a5f3c2e53c6b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *obj)
953 {
954 grn_objcxx . . $ grn_obj# bulk;
955 int name_len;
956 char name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!];
957
958 if (obj) {
959 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&bulk, GRN_OBJ_DO_SHALLOW_COPYcxx . . $ `include/groonga/groonga.h:2732:9`!);
960 name_len = grn_obj_namecxx . . $ grn_obj_name(a51d1bff955f2f21).(ctx, obj, name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!);
961 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, &bulk, name, name_len);
962 } else {
963 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&bulk);
964 }
965
966 GRN_OUTPUT_OBJcxx . . $ `lib/grn_output.h:109:9`!(&bulk, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
967 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &bulk);
968 }
969
970 void
971 grn_proc_output_object_id_namecxx . . $ grn_proc_output_object_id_name(969b9cdb234920c4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_idcxx . . $ grn_id# id)
972 {
973 grn_objcxx . . $ grn_obj# *obj = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
974
975 if (id != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
976 obj = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, id);
977 }
978
979 grn_proc_output_object_namecxx . . $ grn_proc_output_object_name(cda3a5f3c2e53c6b).(ctx, obj);
980 }
981
982 static grn_objcxx . . $ grn_obj# *
983 proc_missingcxx . . $ proc_missing(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
984 {
985 uint32_tcxx . . $ uint32_t# plen;
986 grn_objcxx . . $ grn_obj# *outbuf = ctx->implcxx . . $ _grn_ctx#impl.->outputcxx . . $ _grn_ctx_impl#output..bufcxx . . $ _grn_ctx_impl#$anonymous_type_0#buf.;
987 static int grn_document_root_len = -1;
988 if (!grn_document_rootcxx . . $ grn_document_root.) {
989 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
990 }
991 if (grn_document_root_len < 0) {
992 size_t l;
993 if ((l = strlencxx . . $ strlen(751346f8406fd082).(grn_document_rootcxx . . $ grn_document_root.)) > PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`!) {
994 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
995 }
996 grn_document_root_len = (int)l;
997 if (l > 0 && grn_document_rootcxx . . $ grn_document_root.[l - 1] == '/') {
998 grn_document_root_len--;
999 }
1000 }
1001 if ((plen = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0))) + grn_document_root_len < PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`!) {
1002 char path[PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`!];
1003 grn_memcpycxx . . $ `include/groonga/portability.h:32:13`!(path, grn_document_root, grn_document_root_len);
1004 path[grn_document_root_len] = '/';
1005 grn_str_url_path_normalizecxx . . $ grn_str_url_path_normalize(cc67929d906e7f3e).(ctx,
1006 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)),
1007 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)),
1008 path + grn_document_root_len + 1,
1009 PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`! - grn_document_root_len - 1);
1010 grn_bulk_put_from_filecxx . . $ grn_bulk_put_from_file(3331204c8ace718d).(ctx, outbuf, path);
1011 } else {
1012 uint32_tcxx . . $ uint32_t# abbrlen = 32;
1013 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
1014 "too long path name: <%s/%.*s...> %u(%u)",
1015 grn_document_root,
1016 abbrlen < plen ? abbrlen : plen,
1017 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)),
1018 plen + grn_document_root_len,
1019 PATH_MAXcxx . . $ `<external>/6347054901304145714/limits.h:13:9`!);
1020 }
1021 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1022 }
1023
1024 static grn_objcxx . . $ grn_obj# *
1025 proc_quitcxx . . $ proc_quit(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
1026 {
1027 ctx->statcxx . . $ _grn_ctx#stat. = GRN_CTX_QUITTINGcxx . . $ `lib/grn_ctx_impl.h:49:9`!;
1028 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
1029 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1030 }
1031
1032 static grn_objcxx . . $ grn_obj# *
1033 proc_shutdowncxx . . $ proc_shutdown(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
1034 {
1035 const char *mode;
1036 size_t mode_size;
1037
1038 mode = grn_plugin_proc_get_var_stringcxx . . $ grn_plugin_proc_get_var_string(b6763965d55cfbc).(ctx, user_data, "mode", -1, &mode_size);
1039 #define MODE_EQUALcxx . . $ `lib/proc.c:1039:9`!(name) \
1040 (mode_size == strlen(name) && memcmp(mode, name, mode_size) == 0)
1041 if (mode_size == 0 || MODE_EQUALcxx . . $ `lib/proc.c:1039:9`!("graceful")) {
1042 /* Do nothing. This is the default. */
1043 } else if (MODE_EQUALcxx . . $ `lib/proc.c:1039:9`!("immediate")) {
1044 grn_request_canceler_cancel_allcxx . . $ grn_request_canceler_cancel_all(c9857a73d68e59ba).();
1045 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_INTERRUPTED_FUNCTION_CALLcxx . . $ GRN_INTERRUPTED_FUNCTION_CALL.) {
1046 ctx->rccxx . . $ _grn_ctx#rc. = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
1047 }
1048 } else {
1049 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
1050 "[shutdown] mode must be <graceful> or <immediate>: <%.*s>",
1051 (int)mode_size,
1052 mode);
1053 }
1054 #undef MODE_EQUALcxx . . $ `lib/proc.c:1039:9`!
1055
1056 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1057 grn_gctxcxx . . $ grn_gctx..statcxx . . $ _grn_ctx#stat. = GRN_CTX_QUITcxx . . $ `include/groonga/groonga.h:3297:9`!;
1058 ctx->statcxx . . $ _grn_ctx#stat. = GRN_CTX_QUITTINGcxx . . $ `lib/grn_ctx_impl.h:49:9`!;
1059 }
1060
1061 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
1062
1063 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1064 }
1065
1066 static grn_objcxx . . $ grn_obj# *
1067 proc_defragcxx . . $ proc_defrag(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
1068 {
1069 grn_objcxx . . $ grn_obj# *obj;
1070 int olen, threshold;
1071 olen = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
1072
1073 if (olen) {
1074 obj = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)), olen);
1075 } else {
1076 obj = ctx->implcxx . . $ _grn_ctx#impl.->dbcxx . . $ _grn_ctx_impl#db.;
1077 }
1078
1079 threshold = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(1))
1080 ? grn_atoicxx . . $ grn_atoi(adf3ff2c2b114929).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(1)), GRN_BULK_CURRcxx . . $ `include/groonga/groonga.h:2650:9`!(VARcxx . . $ `lib/proc.c:59:9`!(1)), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!)
1081 : 0;
1082
1083 if (obj) {
1084 grn_obj_defragcxx . . $ grn_obj_defrag(c79c5701849140b5).(ctx, obj, threshold);
1085 } else {
1086 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "defrag object not found");
1087 }
1088 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
1089 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1090 }
1091
1092 static grn_rccxx . . $ grn_rc#
1093 proc_delete_validate_selectorcxx . . $ proc_delete_validate_selector(43d51b45ab32a50a).(grn_ctxcxx . . $ grn_ctx# *ctx,
1094 grn_objcxx . . $ grn_obj# *table,
1095 grn_objcxx . . $ grn_obj# *table_name,
1096 grn_objcxx . . $ grn_obj# *key,
1097 grn_objcxx . . $ grn_obj# *id,
1098 grn_objcxx . . $ grn_obj# *filter)
1099 {
1100 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
1101
1102 if (!table) {
1103 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1104 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1105 "[table][record][delete] table doesn't exist: <%.*s>",
1106 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1107 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name));
1108 return rc;
1109 }
1110
1111 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key) == 0 && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) == 0 &&
1112 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter) == 0) {
1113 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1114 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1115 "[table][record][delete] either key, id or filter must be specified: "
1116 "table: <%.*s>",
1117 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1118 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name));
1119 return rc;
1120 }
1121
1122 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter)) {
1123 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1124 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1125 "[table][record][delete] "
1126 "record selector must be one of key, id and filter: "
1127 "table: <%.*s>, key: <%.*s>, id: <%.*s>, filter: <%.*s>",
1128 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1129 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1130 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key),
1131 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(key),
1132 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id),
1133 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id),
1134 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
1135 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter));
1136 return rc;
1137 }
1138
1139 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter) == 0) {
1140 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1141 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1142 "[table][record][delete] "
1143 "can't use both key and id: table: <%.*s>, key: <%.*s>, id: <%.*s>",
1144 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1145 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1146 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key),
1147 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(key),
1148 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id),
1149 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id));
1150 return rc;
1151 }
1152
1153 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) == 0 && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter)) {
1154 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1155 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1156 "[table][record][delete] "
1157 "can't use both key and filter: "
1158 "table: <%.*s>, key: <%.*s>, filter: <%.*s>",
1159 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1160 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1161 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key),
1162 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(key),
1163 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
1164 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter));
1165 return rc;
1166 }
1167
1168 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key) == 0 && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) && GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter)) {
1169 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1170 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1171 "[table][record][delete] "
1172 "can't use both id and filter: "
1173 "table: <%.*s>, id: <%.*s>, filter: <%.*s>",
1174 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1175 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1176 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id),
1177 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id),
1178 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
1179 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter));
1180 return rc;
1181 }
1182
1183 return rc;
1184 }
1185
1186 static grn_objcxx . . $ grn_obj# *
1187 proc_deletecxx . . $ proc_delete(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
1188 {
1189 grn_rccxx . . $ grn_rc# rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1190 grn_objcxx . . $ grn_obj# *table_name = VARcxx . . $ `lib/proc.c:59:9`!(0);
1191 grn_objcxx . . $ grn_obj# *key = VARcxx . . $ `lib/proc.c:59:9`!(1);
1192 grn_objcxx . . $ grn_obj# *id = VARcxx . . $ `lib/proc.c:59:9`!(2);
1193 grn_objcxx . . $ grn_obj# *filter = VARcxx . . $ `lib/proc.c:59:9`!(3);
1194 grn_objcxx . . $ grn_obj# *table = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1195 uint32_tcxx . . $ uint32_t# n_deleted = 0;
1196 uint32_tcxx . . $ uint32_t# n_errors = 0;
1197 int32_tcxx . . $ int32_t# limit;
1198
1199 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name) == 0) {
1200 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1201 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc, "[table][record][delete] table name isn't specified");
1202 goto exit;
1203 }
1204
1205 table =
1206 grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name));
1207 rc = proc_delete_validate_selectorcxx . . $ proc_delete_validate_selector(43d51b45ab32a50a).(ctx, table, table_name, key, id, filter);
1208 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1209 goto exit;
1210 }
1211
1212 limit = grn_plugin_proc_get_var_int32cxx . . $ grn_plugin_proc_get_var_int32(15a79c06634e1698).(ctx, user_data, "limit", -1, -1);
1213 if (limit == 0) {
1214 goto exit;
1215 }
1216
1217 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(key)) {
1218 grn_objcxx . . $ grn_obj# casted_key;
1219 if (key->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != table->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.) {
1220 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&casted_key, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, table->header.domain);
1221 grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, key, &casted_key, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1222 key = &casted_key;
1223 }
1224 if (ctx->rccxx . . $ _grn_ctx#rc.) {
1225 rc = ctx->rccxx . . $ _grn_ctx#rc.;
1226 } else {
1227 if (limit < 0) {
1228 const int32_tcxx . . $ int32_t# n_records = 1;
1229 limit += n_records + 1;
1230 }
1231 if (limit >= 1) {
1232 rc =
1233 grn_table_deletecxx . . $ grn_table_delete(e105391b8a53b2cf).(ctx, table, GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(key), GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(key));
1234 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1235 n_deleted++;
1236 } else {
1237 n_errors++;
1238 }
1239 }
1240 }
1241 if (key == &casted_key) {
1242 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &casted_key);
1243 }
1244 } else if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id)) {
1245 const char *end;
1246 grn_idcxx . . $ grn_id# parsed_id = grn_atouicxx . . $ grn_atoui(2da3fe788a18ce64).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id), GRN_BULK_CURRcxx . . $ `include/groonga/groonga.h:2650:9`!(id), &end);
1247 if (end == GRN_BULK_CURRcxx . . $ `include/groonga/groonga.h:2650:9`!(id)) {
1248 if (limit < 0) {
1249 const int32_tcxx . . $ int32_t# n_records = 1;
1250 limit += n_records + 1;
1251 }
1252 if (limit >= 1) {
1253 rc = grn_table_delete_by_idcxx . . $ grn_table_delete_by_id(aedbc3eaefbe393f).(ctx, table, parsed_id);
1254 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1255 n_deleted++;
1256 } else {
1257 n_errors++;
1258 }
1259 }
1260 } else {
1261 rc = GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
1262 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1263 "[table][record][delete] id should be number: "
1264 "table: <%.*s>, id: <%.*s>, detail: <%.*s|%c|%.*s>",
1265 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1266 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1267 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id),
1268 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id),
1269 (int)(end - GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id)),
1270 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id),
1271 end[0],
1272 (int)(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id) - end - 1),
1273 end + 1);
1274 }
1275 } else if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter)) {
1276 grn_objcxx . . $ grn_obj# *cond, *v;
1277
1278 GRN_EXPR_CREATE_FOR_QUERYcxx . . $ `include/groonga/expr.h:216:9`!(ctx, table, cond, v);
1279 grn_expr_parsecxx . . $ grn_expr_parse(9934d963d400828).(ctx,
1280 cond,
1281 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter),
1282 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
1283 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
1284 GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.,
1285 GRN_OP_ANDcxx . . $ GRN_OP_AND.,
1286 GRN_EXPR_SYNTAX_SCRIPTcxx . . $ `include/groonga/expr.h:29:9`!);
1287 if (ctx->rccxx . . $ _grn_ctx#rc.) {
1288 char errbuf[GRN_CTX_MSGSIZEcxx . . $ `include/groonga/groonga.h:334:9`!];
1289 grn_strcpycxx . . $ `include/groonga/portability.h:101:11`!(errbuf, GRN_CTX_MSGSIZE, ctx->errbuf);
1290 rc = ctx->rccxx . . $ _grn_ctx#rc.;
1291 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
1292 "[table][record][delete] failed to parse filter: "
1293 "table: <%.*s>, filter: <%.*s>, detail: <%s>",
1294 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
1295 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name),
1296 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
1297 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter),
1298 errbuf);
1299 } else {
1300 grn_objcxx . . $ grn_obj# *records;
1301
1302 records = grn_table_selectcxx . . $ grn_table_select(fec47fdf91015e61).(ctx, table, cond, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, GRN_OP_ORcxx . . $ GRN_OP_OR.);
1303 if (records) {
1304 if (limit < 0) {
1305 limit += grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, records) + 1;
1306 }
1307 GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, records, cursor, result_id)
1308 {
1309 void *key;
1310 grn_idcxx . . $ grn_id# id;
1311 grn_rccxx . . $ grn_rc# sub_rc;
1312
1313 if (grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, &key) == 0) {
1314 continue;
1315 }
1316
1317 if (n_deleted >= (uint32_tcxx . . $ uint32_t#)limit) {
1318 break;
1319 }
1320
1321 id = *(grn_idcxx . . $ grn_id# *)key;
1322 sub_rc = grn_table_delete_by_idcxx . . $ grn_table_delete_by_id(aedbc3eaefbe393f).(ctx, table, id);
1323 if (sub_rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1324 n_deleted++;
1325 } else {
1326 n_errors++;
1327 }
1328 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1329 rc = sub_rc;
1330 }
1331 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_CANCELcxx . . $ GRN_CANCEL.) {
1332 break;
1333 }
1334 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1335 ERRCLRcxx . . $ `lib/grn_error.h:37:9`!(ctx);
1336 }
1337 }
1338 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
1339 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, records);
1340 }
1341 }
1342 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, cond);
1343 }
1344
1345 exit:
1346 {
1347 unsigned int n_rest_records = 0;
1348 if (table) {
1349 n_rest_records = grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, table);
1350 }
1351 GRN_QUERY_LOGcxx . . $ `include/groonga/groonga.h:2585:9`!(ctx,
1352 GRN_QUERY_LOG_SIZEcxx . . $ `include/groonga/groonga.h:216:9`!,
1353 ":",
1354 "delete(%u): [%u][%u]",
1355 n_deleted,
1356 n_errors,
1357 n_rest_records);
1358 }
1359 if (table) {
1360 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, table);
1361 }
1362 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(rc == GRN_SUCCESS);
1363 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1364 }
1365
1366 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
1367 grn_proc_option_value_boolcxx . . $ grn_proc_option_value_bool(ff9372b2545d27df).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *option, boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! default_value)
1368 {
1369 if (!option) {
1370 return default_value;
1371 }
1372
1373 grn_raw_stringcxx . . $ grn_raw_string# value;
1374 GRN_RAW_STRING_SETcxx . . $ `include/groonga/raw_string.h:31:9`!(value, option);
1375 if (value.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length. == 0) {
1376 return default_value;
1377 }
1378
1379 if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(value, "yes") ||
1380 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(value, "true")) {
1381 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
1382 } else if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(value, "no") ||
1383 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(value, "false")) {
1384 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
1385 } else {
1386 return default_value;
1387 }
1388 }
1389
1390 int32_tcxx . . $ int32_t#
1391 grn_proc_option_value_int32cxx . . $ grn_proc_option_value_int32(c76c8d360eca5cfb).(grn_ctxcxx . . $ grn_ctx# *ctx,
1392 grn_objcxx . . $ grn_obj# *option,
1393 int32_tcxx . . $ int32_t# default_value)
1394 {
1395 const char *value;
1396 size_t value_length;
1397 int32_tcxx . . $ int32_t# int32_value;
1398 const char *rest;
1399
1400 if (!option) {
1401 return default_value;
1402 }
1403
1404 value = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(option);
1405 value_length = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option);
1406
1407 if (value_length == 0) {
1408 return default_value;
1409 }
1410
1411 int32_value = grn_atoicxx . . $ grn_atoi(adf3ff2c2b114929).(value, value + value_length, &rest);
1412 if (rest == value + value_length) {
1413 return int32_value;
1414 } else {
1415 return default_value;
1416 }
1417 }
1418
1419 uint32_tcxx . . $ uint32_t#
1420 grn_proc_option_value_uint32cxx . . $ grn_proc_option_value_uint32(c0317bb03c33a3cb).(grn_ctxcxx . . $ grn_ctx# *ctx,
1421 grn_objcxx . . $ grn_obj# *option,
1422 uint32_tcxx . . $ uint32_t# default_value)
1423 {
1424 const char *value;
1425 size_t value_length;
1426 uint32_tcxx . . $ uint32_t# uint32_value;
1427 const char *rest;
1428
1429 if (!option) {
1430 return default_value;
1431 }
1432
1433 value = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(option);
1434 value_length = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option);
1435
1436 if (value_length == 0) {
1437 return default_value;
1438 }
1439
1440 uint32_value = grn_atouicxx . . $ grn_atoui(2da3fe788a18ce64).(value, value + value_length, &rest);
1441 if (rest == value + value_length) {
1442 return uint32_value;
1443 } else {
1444 return default_value;
1445 }
1446 }
1447
1448 double
1449 grn_proc_option_value_doublecxx . . $ grn_proc_option_value_double(f44f0e520a9ae05f).(grn_ctxcxx . . $ grn_ctx# *ctx,
1450 grn_objcxx . . $ grn_obj# *option,
1451 double default_value)
1452 {
1453 if (!option) {
1454 return default_value;
1455 }
1456
1457 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option) == 0) {
1458 return default_value;
1459 }
1460
1461 double value = default_value;
1462 grn_objcxx . . $ grn_obj# buffer;
1463 GRN_FLOAT_INITcxx . . $ `include/groonga/groonga.h:2864:9`!(&buffer, 0);
1464 grn_rccxx . . $ grn_rc# rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, option, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1465 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1466 value = GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(&buffer);
1467 }
1468 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
1469
1470 return value;
1471 }
1472
1473 float
1474 grn_proc_option_value_floatcxx . . $ grn_proc_option_value_float(4059f169e5884ae4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *option, float default_value)
1475 {
1476 if (!option) {
1477 return default_value;
1478 }
1479
1480 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option) == 0) {
1481 return default_value;
1482 }
1483
1484 float value = default_value;
1485 grn_objcxx . . $ grn_obj# buffer;
1486 GRN_FLOAT_INITcxx . . $ `include/groonga/groonga.h:2864:9`!(&buffer, 0);
1487 grn_rccxx . . $ grn_rc# rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, option, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1488 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1489 value = GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(&buffer);
1490 }
1491 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
1492
1493 return value;
1494 }
1495
1496 const char *
1497 grn_proc_option_value_stringcxx . . $ grn_proc_option_value_string(b7bca21e38c64932).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *option, size_t *size)
1498 {
1499 const char *value;
1500 size_t value_length;
1501
1502 if (!option) {
1503 if (size) {
1504 *size = 0;
1505 }
1506 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1507 }
1508
1509 value = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(option);
1510 value_length = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option);
1511
1512 if (size) {
1513 *size = value_length;
1514 }
1515
1516 if (value_length == 0) {
1517 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
1518 } else {
1519 return value;
1520 }
1521 }
1522
1523 grn_content_typecxx . . $ grn_content_type#
1524 grn_proc_option_value_content_typecxx . . $ grn_proc_option_value_content_type(d9b82c2cea93b286).(grn_ctxcxx . . $ grn_ctx# *ctx,
1525 grn_objcxx . . $ grn_obj# *option,
1526 grn_content_typecxx . . $ grn_content_type# default_value)
1527 {
1528 if (!option) {
1529 return default_value;
1530 }
1531
1532 return grn_content_type_parsecxx . . $ grn_content_type_parse(d9b82c2cea93b286).(ctx, option, default_value);
1533 }
1534
1535 grn_log_levelcxx . . $ grn_log_level#
1536 grn_proc_option_value_log_levelcxx . . $ grn_proc_option_value_log_level(d023da8d3583c911).(grn_ctxcxx . . $ grn_ctx# *ctx,
1537 grn_objcxx . . $ grn_obj# *option,
1538 grn_log_levelcxx . . $ grn_log_level# default_value)
1539 {
1540 if (!option) {
1541 return default_value;
1542 }
1543
1544 grn_objcxx . . $ grn_obj# value;
1545 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&value, 0);
1546 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, &value, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(option), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(option));
1547 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, &value, '\0');
1548 grn_log_levelcxx . . $ grn_log_level# level = default_value;
1549 if (!grn_log_level_parsecxx . . $ grn_log_level_parse(ade47491a90ed684).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&value), &level)) {
1550 level = default_value;
1551 }
1552 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &value);
1553 return level;
1554 }
1555
1556 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
1557 grn_proc_get_value_boolcxx . . $ grn_proc_get_value_bool(d6418eb1362f7a09).(grn_ctxcxx . . $ grn_ctx# *ctx,
1558 grn_objcxx . . $ grn_obj# *value,
1559 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! default_value,
1560 const char *tag)
1561 {
1562 if (!value) {
1563 return default_value;
1564 }
1565
1566 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_BOOLcxx . . $ GRN_DB_BOOL.) {
1567 return GRN_BOOL_VALUEcxx . . $ `include/groonga/groonga.h:3097:9`!(value);
1568 }
1569
1570 if (grn_type_id_is_text_familycxx . . $ grn_type_id_is_text_family(a2a496425acc5b40).(ctx, value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.)) {
1571 return grn_proc_option_value_boolcxx . . $ grn_proc_option_value_bool(ff9372b2545d27df).(ctx, value, default_value);
1572 }
1573
1574 grn_objcxx . . $ grn_obj# inspected;
1575 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1576 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1577 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1578 GRN_INVALID_ARGUMENT,
1579 "%s value must be a bool or string: <%.*s>",
1580 tag,
1581 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1582 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1583 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1584 return default_value;
1585 }
1586
1587 int32_tcxx . . $ int32_t#
1588 grn_proc_get_value_int32cxx . . $ grn_proc_get_value_int32(398b30e9dc37a61b).(grn_ctxcxx . . $ grn_ctx# *ctx,
1589 grn_objcxx . . $ grn_obj# *value,
1590 int32_tcxx . . $ int32_t# default_value_raw,
1591 const char *tag)
1592 {
1593 int32_tcxx . . $ int32_t# value_raw;
1594
1595 if (!value) {
1596 return default_value_raw;
1597 }
1598
1599 if (!grn_type_id_is_number_familycxx . . $ grn_type_id_is_number_family(a2a496425acc5b40).(ctx, value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.)) {
1600 grn_objcxx . . $ grn_obj# inspected;
1601
1602 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1603 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1604 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1605 GRN_INVALID_ARGUMENT,
1606 "%s value must be a number: <%.*s>",
1607 tag,
1608 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1609 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1610 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1611 return default_value_raw;
1612 }
1613
1614 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT32cxx . . $ GRN_DB_INT32.) {
1615 value_raw = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(value);
1616 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT64cxx . . $ GRN_DB_INT64.) {
1617 value_raw = (int32_tcxx . . $ int32_t#)GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(value);
1618 } else {
1619 grn_objcxx . . $ grn_obj# buffer;
1620 grn_rccxx . . $ grn_rc# rc;
1621
1622 GRN_INT32_INITcxx . . $ `include/groonga/groonga.h:2852:9`!(&buffer, 0);
1623 rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, value, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1624 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1625 value_raw = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(&buffer);
1626 }
1627 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
1628
1629 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1630 grn_objcxx . . $ grn_obj# inspected;
1631
1632 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1633 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1634 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1635 rc,
1636 "%s "
1637 "failed to cast value to number: <%.*s>",
1638 tag,
1639 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1640 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1641 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1642 value_raw = default_value_raw;
1643 }
1644 }
1645
1646 return value_raw;
1647 }
1648
1649 uint32_tcxx . . $ uint32_t#
1650 grn_proc_get_value_uint32cxx . . $ grn_proc_get_value_uint32(edee37734fa14a15).(grn_ctxcxx . . $ grn_ctx# *ctx,
1651 grn_objcxx . . $ grn_obj# *value,
1652 uint32_tcxx . . $ uint32_t# default_value_raw,
1653 const char *tag)
1654 {
1655 uint32_tcxx . . $ uint32_t# value_raw;
1656
1657 if (!value) {
1658 return default_value_raw;
1659 }
1660
1661 if (!grn_type_id_is_number_familycxx . . $ grn_type_id_is_number_family(a2a496425acc5b40).(ctx, value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.)) {
1662 grn_objcxx . . $ grn_obj# inspected;
1663
1664 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1665 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1666 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1667 GRN_INVALID_ARGUMENT,
1668 "%s value must be a number: <%.*s>",
1669 tag,
1670 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1671 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1672 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1673 return default_value_raw;
1674 }
1675
1676 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_UINT32cxx . . $ GRN_DB_UINT32.) {
1677 value_raw = GRN_UINT32_VALUEcxx . . $ `include/groonga/groonga.h:3103:9`!(value);
1678 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT32cxx . . $ GRN_DB_INT32.) {
1679 value_raw = (uint32_tcxx . . $ uint32_t#)GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(value);
1680 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_UINT64cxx . . $ GRN_DB_UINT64.) {
1681 value_raw = (uint32_tcxx . . $ uint32_t#)GRN_UINT64_VALUEcxx . . $ `include/groonga/groonga.h:3105:9`!(value);
1682 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT64cxx . . $ GRN_DB_INT64.) {
1683 value_raw = (uint32_tcxx . . $ uint32_t#)GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(value);
1684 } else {
1685 grn_objcxx . . $ grn_obj# buffer;
1686 grn_rccxx . . $ grn_rc# rc;
1687
1688 GRN_UINT32_INITcxx . . $ `include/groonga/groonga.h:2854:9`!(&buffer, 0);
1689 rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, value, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1690 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1691 value_raw = GRN_UINT32_VALUEcxx . . $ `include/groonga/groonga.h:3103:9`!(&buffer);
1692 }
1693 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
1694
1695 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1696 grn_objcxx . . $ grn_obj# inspected;
1697
1698 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1699 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1700 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1701 rc,
1702 "%s "
1703 "failed to cast value to number: <%.*s>",
1704 tag,
1705 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1706 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1707 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1708 value_raw = default_value_raw;
1709 }
1710 }
1711
1712 return value_raw;
1713 }
1714
1715 int64_tcxx . . $ int64_t#
1716 grn_proc_get_value_int64cxx . . $ grn_proc_get_value_int64(7238b57f8c735d17).(grn_ctxcxx . . $ grn_ctx# *ctx,
1717 grn_objcxx . . $ grn_obj# *value,
1718 int64_tcxx . . $ int64_t# default_value_raw,
1719 const char *tag)
1720 {
1721 int64_tcxx . . $ int64_t# value_raw;
1722
1723 if (!value) {
1724 return default_value_raw;
1725 }
1726
1727 if (!grn_type_id_is_number_familycxx . . $ grn_type_id_is_number_family(a2a496425acc5b40).(ctx, value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.)) {
1728 grn_objcxx . . $ grn_obj# inspected;
1729
1730 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1731 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1732 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1733 GRN_INVALID_ARGUMENT,
1734 "%s value must be a number: <%.*s>",
1735 tag,
1736 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1737 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1738 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1739 return default_value_raw;
1740 }
1741
1742 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT32cxx . . $ GRN_DB_INT32.) {
1743 value_raw = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(value);
1744 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_INT64cxx . . $ GRN_DB_INT64.) {
1745 value_raw = GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(value);
1746 } else {
1747 grn_objcxx . . $ grn_obj# buffer;
1748 grn_rccxx . . $ grn_rc# rc;
1749
1750 GRN_INT64_INITcxx . . $ `include/groonga/groonga.h:2856:9`!(&buffer, 0);
1751 rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, value, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
1752 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1753 value_raw = GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(&buffer);
1754 }
1755 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
1756
1757 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
1758 grn_objcxx . . $ grn_obj# inspected;
1759
1760 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1761 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1762 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1763 rc,
1764 "%s "
1765 "failed to cast value to number: <%.*s>",
1766 tag,
1767 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1768 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1769 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1770 value_raw = default_value_raw;
1771 }
1772 }
1773
1774 return value_raw;
1775 }
1776
1777 grn_operatorcxx . . $ grn_operator#
1778 grn_proc_get_value_modecxx . . $ grn_proc_get_value_mode(db52f52f4dd070c1).(grn_ctxcxx . . $ grn_ctx# *ctx,
1779 grn_objcxx . . $ grn_obj# *value,
1780 grn_operatorcxx . . $ grn_operator# default_mode,
1781 const char *tag)
1782 {
1783 if (!value) {
1784 return default_mode;
1785 }
1786
1787 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != GRN_DB_TEXTcxx . . $ GRN_DB_TEXT.) {
1788 grn_objcxx . . $ grn_obj# inspected;
1789 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1790 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1791 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1792 GRN_INVALID_ARGUMENT,
1793 "%s mode must be text: <%.*s>",
1794 tag,
1795 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1796 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1797 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1798 return default_mode;
1799 }
1800
1801 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
1802 return default_mode;
1803 }
1804
1805 #define EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!(name) \
1806 (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == strlen(name) && \
1807 memcmp(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), name, strlen(name)) == 0)
1808
1809 if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("==") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("EQUAL")) {
1810 return GRN_OP_EQUALcxx . . $ GRN_OP_EQUAL.;
1811 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("!=") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("NOT_EQUAL")) {
1812 return GRN_OP_NOT_EQUALcxx . . $ GRN_OP_NOT_EQUAL.;
1813 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("<") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("LESS")) {
1814 return GRN_OP_LESScxx . . $ GRN_OP_LESS.;
1815 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!(">") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("GREATER")) {
1816 return GRN_OP_GREATERcxx . . $ GRN_OP_GREATER.;
1817 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("<=") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("LESS_EQUAL")) {
1818 return GRN_OP_LESS_EQUALcxx . . $ GRN_OP_LESS_EQUAL.;
1819 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!(">=") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("GREATER_EQUAL")) {
1820 return GRN_OP_GREATER_EQUALcxx . . $ GRN_OP_GREATER_EQUAL.;
1821 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("@") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("MATCH")) {
1822 return GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.;
1823 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*N") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("NEAR")) {
1824 return GRN_OP_NEARcxx . . $ GRN_OP_NEAR.;
1825 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*NP") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("NEAR_PHRASE")) {
1826 return GRN_OP_NEAR_PHRASEcxx . . $ GRN_OP_NEAR_PHRASE.;
1827 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*ONP") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("ORDERED_NEAR_PHRASE")) {
1828 return GRN_OP_ORDERED_NEAR_PHRASEcxx . . $ GRN_OP_ORDERED_NEAR_PHRASE.;
1829 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*NPP") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("NEAR_PHRASE_PRODUCT")) {
1830 return GRN_OP_NEAR_PHRASE_PRODUCTcxx . . $ GRN_OP_NEAR_PHRASE_PRODUCT.;
1831 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*ONPP") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("ORDERED_NEAR_PHRASE_PRODUCT")) {
1832 return GRN_OP_ORDERED_NEAR_PHRASE_PRODUCTcxx . . $ GRN_OP_ORDERED_NEAR_PHRASE_PRODUCT.;
1833 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("*S") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("SIMILAR")) {
1834 return GRN_OP_SIMILARcxx . . $ GRN_OP_SIMILAR.;
1835 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("^") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("@^") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("PREFIX")) {
1836 return GRN_OP_PREFIXcxx . . $ GRN_OP_PREFIX.;
1837 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("$") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("@$") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("SUFFIX")) {
1838 return GRN_OP_SUFFIXcxx . . $ GRN_OP_SUFFIX.;
1839 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("~") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("@~") || EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!("REGEXP")) {
1840 return GRN_OP_REGEXPcxx . . $ GRN_OP_REGEXP.;
1841 } else {
1842 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1843 GRN_INVALID_ARGUMENT,
1844 "%s mode must be one of them: "
1845 "["
1846 "\"==\", \"EQUAL\", "
1847 "\"!=\", \"NOT_EQUAL\", "
1848 "\"<\", \"LESS\", "
1849 "\">\", \"GREATER\", "
1850 "\"<=\", \"LESS_EQUAL\", "
1851 "\">=\", \"GREATER_EQUAL\", "
1852 "\"@\", \"MATCH\", "
1853 "\"*N\", \"NEAR\", "
1854 "\"*NP\", \"NEAR_PHRASE\", "
1855 "\"*ONP\", \"ORDERED_NEAR_PHRASE\", "
1856 "\"*NPP\", \"NEAR_PHRASE_PRODUCT\", "
1857 "\"*ONPP\", \"ORDERED_NEAR_PHRASE_PRODUCT\", "
1858 "\"*S\", \"SIMILAR\", "
1859 "\"^\", \"@^\", \"PREFIX\", "
1860 "\"$\", \"@$\", \"SUFFIX\", "
1861 "\"~\", \"@~\", \"REGEXP\""
1862 "]: <%.*s>",
1863 tag,
1864 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value),
1865 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value));
1866 return default_mode;
1867 }
1868
1869 #undef EQUAL_MODEcxx . . $ `lib/proc.c:1805:9`!
1870 }
1871
1872 grn_operatorcxx . . $ grn_operator#
1873 grn_proc_get_value_operatorcxx . . $ grn_proc_get_value_operator(db52f52f4dd070c1).(grn_ctxcxx . . $ grn_ctx# *ctx,
1874 grn_objcxx . . $ grn_obj# *value,
1875 grn_operatorcxx . . $ grn_operator# default_operator,
1876 const char *tag)
1877 {
1878 if (!value) {
1879 return default_operator;
1880 }
1881
1882 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != GRN_DB_TEXTcxx . . $ GRN_DB_TEXT.) {
1883 grn_objcxx . . $ grn_obj# inspected;
1884 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1885 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1886 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1887 GRN_INVALID_ARGUMENT,
1888 "%s operator must be text: <%.*s>",
1889 tag,
1890 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1891 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1892 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1893 return default_operator;
1894 }
1895
1896 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
1897 return default_operator;
1898 }
1899
1900 grn_raw_stringcxx . . $ grn_raw_string# operator_string;
1901 GRN_RAW_STRING_SETcxx . . $ `include/groonga/raw_string.h:31:9`!(operator_string, value);
1902
1903 if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "&&") ||
1904 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "+") ||
1905 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "AND")) {
1906 return GRN_OP_ANDcxx . . $ GRN_OP_AND.;
1907 } else if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "||") ||
1908 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "OR")) {
1909 return GRN_OP_ORcxx . . $ GRN_OP_OR.;
1910 } else if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "!") ||
1911 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "NOT")) {
1912 return GRN_OP_NOTcxx . . $ GRN_OP_NOT.;
1913 } else if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "&!") ||
1914 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "-") ||
1915 GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(operator_string, "AND_NOT")) {
1916 return GRN_OP_AND_NOTcxx . . $ GRN_OP_AND_NOT.;
1917 } else {
1918 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1919 GRN_INVALID_ARGUMENT,
1920 "%s operator must be one of them: "
1921 "["
1922 "\"&&\", \"+\", \"AND\", "
1923 "\"||\", \"OR\", "
1924 "\"!\" \"NOT\", "
1925 "\"&!\", \"-\", \"AND_NOT\""
1926 "]: <%.*s>",
1927 tag,
1928 (int)operator_string.length,
1929 operator_string.value);
1930 return default_operator;
1931 }
1932 }
1933
1934 grn_tokenize_modecxx . . $ grn_tokenize_mode#
1935 grn_proc_get_value_tokenize_modecxx . . $ grn_proc_get_value_tokenize_mode(c059d05b18bb04e9).(grn_ctxcxx . . $ grn_ctx# *ctx,
1936 grn_objcxx . . $ grn_obj# *value,
1937 grn_tokenize_modecxx . . $ grn_tokenize_mode# default_mode,
1938 const char *tag)
1939 {
1940 if (!value) {
1941 return default_mode;
1942 }
1943
1944 if (!grn_obj_is_text_family_bulkcxx . . $ grn_obj_is_text_family_bulk(a5760e5c319a06ee).(ctx, value)) {
1945 grn_objcxx . . $ grn_obj# inspected;
1946 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
1947 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
1948 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1949 GRN_INVALID_ARGUMENT,
1950 "%s tokenize mode must be text bulk: <%.*s>",
1951 tag,
1952 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
1953 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
1954 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
1955 return default_mode;
1956 }
1957
1958 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
1959 return default_mode;
1960 }
1961
1962 #define EQUAL_MODEcxx . . $ `lib/proc.c:1962:9`!(name) \
1963 (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == strlen(name) && \
1964 memcmp(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), name, strlen(name)) == 0)
1965
1966 if (EQUAL_MODEcxx . . $ `lib/proc.c:1962:9`!("GET")) {
1967 return GRN_TOKENIZE_GETcxx . . $ GRN_TOKENIZE_GET.;
1968 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1962:9`!("ADD")) {
1969 return GRN_TOKENIZE_ADDcxx . . $ GRN_TOKENIZE_ADD.;
1970 } else if (EQUAL_MODEcxx . . $ `lib/proc.c:1962:9`!("ONLY")) {
1971 return GRN_TOKENIZE_ONLYcxx . . $ GRN_TOKENIZE_ONLY.;
1972 } else {
1973 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
1974 GRN_INVALID_ARGUMENT,
1975 "%s tokenize mode must be one of them: "
1976 "["
1977 "\"GET\", "
1978 "\"ADD\", "
1979 "\"ONLY\""
1980 "]: <%.*s>",
1981 tag,
1982 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value),
1983 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value));
1984 return default_mode;
1985 }
1986
1987 #undef EQUAL_MODEcxx . . $ `lib/proc.c:1962:9`!
1988 }
1989
1990 uint32_tcxx . . $ uint32_t#
1991 grn_proc_get_value_token_cursor_flagscxx . . $ grn_proc_get_value_token_cursor_flags(edee37734fa14a15).(grn_ctxcxx . . $ grn_ctx# *ctx,
1992 grn_objcxx . . $ grn_obj# *value,
1993 uint32_tcxx . . $ uint32_t# default_flags,
1994 const char *tag)
1995 {
1996 if (!value) {
1997 return default_flags;
1998 }
1999
2000 if (!grn_obj_is_text_family_bulkcxx . . $ grn_obj_is_text_family_bulk(a5760e5c319a06ee).(ctx, value)) {
2001 grn_objcxx . . $ grn_obj# inspected;
2002 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
2003 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
2004 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2005 GRN_INVALID_ARGUMENT,
2006 "%s token cursor flags must be text bulk: <%.*s>",
2007 tag,
2008 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
2009 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
2010 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
2011 return default_flags;
2012 }
2013
2014 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
2015 return default_flags;
2016 }
2017
2018 uint32_tcxx . . $ uint32_t# flags = 0;
2019 const char *names, *names_end;
2020 names = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value);
2021 names_end = names + GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value);
2022 while (names < names_end) {
2023 if (*names == '|' || *names == ' ') {
2024 names += 1;
2025 continue;
2026 }
2027
2028 #define CHECK_FLAGcxx . . $ `lib/proc.c:2028:9`!(name) \
2029 if (((size_t)(names_end - names) >= (sizeof(#name) - 1)) && \
2030 (!memcmp(names, #name, sizeof(#name) - 1))) { \
2031 flags |= GRN_TOKEN_CURSOR_##name; \
2032 names += sizeof(#name) - 1; \
2033 continue; \
2034 }
2035
2036 CHECK_FLAGcxx . . $ `lib/proc.c:2028:9`!(ENABLE_TOKENIZED_DELIMITER);
2037
2038 #define GRN_TOKEN_CURSOR_NONEcxx . . $ `lib/proc.c:2038:9`! 0
2039 CHECK_FLAGcxx . . $ `lib/proc.c:2028:9`!(NONE);
2040 #undef GRN_TOKEN_CURSOR_NONEcxx . . $ `lib/proc.c:2038:9`!
2041
2042 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2043 GRN_INVALID_ARGUMENT,
2044 "%s token cursor flag must be one of them: "
2045 "["
2046 "\"ENABLE_TOKENIZED_DELIMITER\", "
2047 "\"NONE\""
2048 "]: <%.*s>",
2049 tag,
2050 (int)(names_end - names),
2051 names);
2052 return default_flags;
2053 #undef CHECK_FLAGcxx . . $ `lib/proc.c:2028:9`!
2054 }
2055
2056 return flags;
2057 }
2058
2059 double
2060 grn_proc_get_value_doublecxx . . $ grn_proc_get_value_double(29f41cb7e20a0e4c).(grn_ctxcxx . . $ grn_ctx# *ctx,
2061 grn_objcxx . . $ grn_obj# *value,
2062 double default_value_raw,
2063 const char *tag)
2064 {
2065 double value_raw;
2066
2067 if (!value) {
2068 return default_value_raw;
2069 }
2070
2071 if (!grn_type_id_is_number_familycxx . . $ grn_type_id_is_number_family(a2a496425acc5b40).(ctx, value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.)) {
2072 grn_objcxx . . $ grn_obj# inspected;
2073
2074 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
2075 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
2076 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2077 GRN_INVALID_ARGUMENT,
2078 "%s value must be a number: <%.*s>",
2079 tag,
2080 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
2081 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
2082 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
2083 return default_value_raw;
2084 }
2085
2086 if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.) {
2087 value_raw = GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(value);
2088 } else if (value->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.) {
2089 value_raw = GRN_FLOAT32_VALUEcxx . . $ `include/groonga/groonga.h:3107:9`!(value);
2090 #ifdef GRN_HAVE_BFLOAT16
2091 } else if (value->header.domain == GRN_DB_BFLOAT16) {
2092 value_raw = grn_bfloat16_to_float32(GRN_BFLOAT16_VALUE(value));
2093 #endif
2094 } else {
2095 grn_objcxx . . $ grn_obj# buffer;
2096 grn_rccxx . . $ grn_rc# rc;
2097
2098 GRN_FLOAT_INITcxx . . $ `include/groonga/groonga.h:2864:9`!(&buffer, 0);
2099 rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, value, &buffer, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
2100 if (rc == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
2101 value_raw = GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(&buffer);
2102 }
2103 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
2104
2105 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
2106 grn_objcxx . . $ grn_obj# inspected;
2107
2108 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
2109 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, value);
2110 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2111 rc,
2112 "%s "
2113 "failed to cast value to number: <%.*s>",
2114 tag,
2115 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
2116 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
2117 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
2118 value_raw = default_value_raw;
2119 }
2120 }
2121
2122 return value_raw;
2123 }
2124
2125 grn_objcxx . . $ grn_obj# *
2126 grn_proc_get_value_objectcxx . . $ grn_proc_get_value_object(2d873f18cf9e4824).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *value, const char *tag)
2127 {
2128 if (!value) {
2129 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2130 }
2131
2132 if (!grn_obj_is_text_family_bulkcxx . . $ grn_obj_is_text_family_bulk(a5760e5c319a06ee).(ctx, value)) {
2133 return value;
2134 }
2135
2136 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
2137 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2138 GRN_INVALID_ARGUMENT,
2139 "%s object name isn't specified",
2140 tag);
2141 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2142 }
2143
2144 grn_objcxx . . $ grn_obj# *object =
2145 grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value));
2146 if (!object) {
2147 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2148 GRN_INVALID_ARGUMENT,
2149 "%s object doesn't exist: <%.*s>",
2150 tag,
2151 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value),
2152 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value));
2153 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2154 }
2155
2156 return object;
2157 }
2158
2159 grn_objcxx . . $ grn_obj# *
2160 grn_proc_get_value_columncxx . . $ grn_proc_get_value_column(e6c8b269586fc094).(grn_ctxcxx . . $ grn_ctx# *ctx,
2161 grn_objcxx . . $ grn_obj# *value,
2162 grn_objcxx . . $ grn_obj# *table,
2163 const char *tag)
2164 {
2165 if (!value) {
2166 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2167 }
2168
2169 if (!grn_obj_is_text_family_bulkcxx . . $ grn_obj_is_text_family_bulk(a5760e5c319a06ee).(ctx, value)) {
2170 return value;
2171 }
2172
2173 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value) == 0) {
2174 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2175 GRN_INVALID_ARGUMENT,
2176 "%s column name isn't specified",
2177 tag);
2178 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2179 }
2180
2181 grn_objcxx . . $ grn_obj# *column =
2182 grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx, table, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value));
2183 if (!column) {
2184 grn_objcxx . . $ grn_obj# inspected;
2185 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
2186 grn_inspect_limitedcxx . . $ grn_inspect_limited(88456f97fe0d41a).(ctx, &inspected, table);
2187 GRN_PLUGIN_ERRORcxx . . $ `include/groonga/plugin.h:145:9`!(ctx,
2188 GRN_INVALID_ARGUMENT,
2189 "%s column doesn't exist: <%.*s>: %.*s",
2190 tag,
2191 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value),
2192 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value),
2193 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
2194 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
2195 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
2196 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2197 }
2198
2199 return column;
2200 }
2201
2202 grn_raw_stringcxx . . $ grn_raw_string#
2203 grn_proc_get_value_raw_stringcxx . . $ grn_proc_get_value_raw_string(dd6f5cf4618a8970).(grn_ctxcxx . . $ grn_ctx# *ctx,
2204 grn_objcxx . . $ grn_obj# *value,
2205 grn_raw_stringcxx . . $ grn_raw_string# *default_value,
2206 const char *tag)
2207 {
2208 if (!value) {
2209 return (grn_raw_stringcxx . . $ grn_raw_string#){NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, 0};
2210 }
2211
2212 if (!grn_obj_is_text_family_bulkcxx . . $ grn_obj_is_text_family_bulk(a5760e5c319a06ee).(ctx, value)) {
2213 return *default_value;
2214 }
2215
2216 return (grn_raw_stringcxx . . $ grn_raw_string#){GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value)};
2217 }
2218
2219 static grn_objcxx . . $ grn_obj# *
2220 proc_cache_limitcxx . . $ proc_cache_limit(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
2221 int nargs,
2222 grn_objcxx . . $ grn_obj# **args,
2223 grn_user_datacxx . . $ grn_user_data# *user_data)
2224 {
2225 grn_cachecxx . . $ grn_cache# *cache;
2226 unsigned int current_max_n_entries;
2227
2228 cache = grn_cache_current_getcxx . . $ grn_cache_current_get(ef516a6d4bcbf29d).(ctx);
2229 current_max_n_entries = grn_cache_get_max_n_entriescxx . . $ grn_cache_get_max_n_entries(ba86ec883991c18a).(ctx, cache);
2230 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0))) {
2231 const char *rest;
2232 uint32_tcxx . . $ uint32_t# max =
2233 grn_atouicxx . . $ grn_atoui(2da3fe788a18ce64).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)), GRN_BULK_CURRcxx . . $ `include/groonga/groonga.h:2650:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)), &rest);
2234 if (GRN_BULK_CURRcxx . . $ `include/groonga/groonga.h:2650:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)) == rest) {
2235 grn_cache_set_max_n_entriescxx . . $ grn_cache_set_max_n_entries(5e00bd443a95fa3d).(ctx, cache, max);
2236 } else {
2237 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
2238 "max value is invalid unsigned integer format: <%.*s>",
2239 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)),
2240 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)));
2241 }
2242 }
2243 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
2244 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(current_max_n_entries);
2245 }
2246 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2247 }
2248
2249 static grn_objcxx . . $ grn_obj# *
2250 proc_registercxx . . $ proc_register(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2251 {
2252 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0))) {
2253 const char *name;
2254 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, VARcxx . . $ `lib/proc.c:59:9`!(0), '\0');
2255 name = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
2256 grn_plugin_registercxx . . $ grn_plugin_register(cae1c943be750b4c).(ctx, name);
2257 } else {
2258 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "path is required");
2259 }
2260 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
2261 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2262 }
2263
2264 void
2265 grn_ii_buffer_checkcxx . . $ grn_ii_buffer_check(3cc985256d58c649).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_iicxx . . $ grn_ii# *ii, uint32_tcxx . . $ uint32_t# seg);
2266
2267 static grn_objcxx . . $ grn_obj# *
2268 proc_checkcxx . . $ proc_check(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2269 {
2270 grn_objcxx . . $ grn_obj# *obj = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)));
2271 if (!obj) {
2272 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
2273 "no such object: <%.*s>",
2274 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)),
2275 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0)));
2276 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
2277 } else {
2278 switch (obj->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
2279 case GRN_DBcxx . . $ `include/groonga/groonga.h:899:9`!:
2280 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
2281 break;
2282 case GRN_TABLE_PAT_KEYcxx . . $ `include/groonga/groonga.h:896:9`!:
2283 grn_pat_checkcxx . . $ grn_pat_check(ff189d7ae511a139).(ctx, (grn_patcxx . . $ grn_pat# *)obj);
2284 break;
2285 case GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!:
2286 grn_hash_checkcxx . . $ grn_hash_check(57c8ed80822320b7).(ctx, (grn_hashcxx . . $ grn_hash# *)obj);
2287 break;
2288 case GRN_TABLE_DAT_KEYcxx . . $ `include/groonga/groonga.h:897:9`!:
2289 case GRN_TABLE_NO_KEYcxx . . $ `include/groonga/groonga.h:898:9`!:
2290 case GRN_COLUMN_FIX_SIZEcxx . . $ `include/groonga/groonga.h:900:9`!:
2291 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
2292 break;
2293 case GRN_COLUMN_VAR_SIZEcxx . . $ `include/groonga/groonga.h:901:9`!:
2294 grn_ja_checkcxx . . $ grn_ja_check(a7d0550d540ff932).(ctx, (grn_jacxx . . $ grn_ja# *)obj);
2295 break;
2296 case GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!:
2297 {
2298 grn_iicxx . . $ grn_ii# *ii = (grn_iicxx . . $ grn_ii# *)obj;
2299 grn_ii_header_commoncxx . . $ grn_ii_header_common# *h = ii->headercxx . . $ _grn_ii#header..commoncxx . . $ _grn_ii#$anonymous_type_0#common.;
2300 char buf[8];
2301 GRN_OUTPUT_ARRAY_OPENcxx . . $ `lib/grn_output.h:93:9`!("RESULT", 8);
2302 {
2303 uint32_tcxx . . $ uint32_t# i, j, g = 0, a = 0, b = 0;
2304 uint32_tcxx . . $ uint32_t# max = 0;
2305 for (i = h->bgqtailcxx . . $ _grn_ii_header_common#bgqtail.; i != h->bgqheadcxx . . $ _grn_ii_header_common#bgqhead.;
2306 i = ((i + 1) & (GRN_II_BGQSIZEcxx . . $ `lib/grn_ii.h:57:9`! - 1))) {
2307 j = h->bgqbodycxx . . $ _grn_ii_header_common#bgqbody.[i];
2308 g++;
2309 if (j > max) {
2310 max = j;
2311 }
2312 }
2313 for (i = 0; i < GRN_II_MAX_LSEGcxx . . $ `lib/grn_ii.h:59:9`!; i++) {
2314 j = h->binfocxx . . $ _grn_ii_header_common#binfo.[i];
2315 if (j != GRN_II_PSEG_NOT_ASSIGNEDcxx . . $ `lib/grn_ii.h:85:9`!) {
2316 if (j > max) {
2317 max = j;
2318 }
2319 b++;
2320 }
2321 }
2322 for (i = 0; i < GRN_II_MAX_LSEGcxx . . $ `lib/grn_ii.h:59:9`!; i++) {
2323 j = h->ainfocxx . . $ _grn_ii_header_common#ainfo.[i];
2324 if (j != GRN_II_PSEG_NOT_ASSIGNEDcxx . . $ `lib/grn_ii.h:85:9`!) {
2325 if (j > max) {
2326 max = j;
2327 }
2328 a++;
2329 }
2330 }
2331 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("SUMMARY", 12);
2332 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("flags");
2333 grn_itohcxx . . $ grn_itoh(8d45ad636653b6f2).(h->flagscxx . . $ _grn_ii_header_common#flags., buf, 8);
2334 GRN_OUTPUT_STRcxx . . $ `lib/grn_output.h:106:9`!(buf, 8);
2335 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max sid");
2336 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->smax);
2337 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("number of garbage segments");
2338 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(g);
2339 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("number of array segments");
2340 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(a);
2341 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max id of array segment");
2342 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->amax);
2343 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("number of buffer segments");
2344 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(b);
2345 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max id of buffer segment");
2346 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->bmax);
2347 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max id of physical segment in use");
2348 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(max);
2349 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("number of unmanaged segments");
2350 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->pnext - a - b - g);
2351 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("total chunk size");
2352 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->total_chunk_size);
2353 for (max = 0, i = 0; i < (GRN_II_MAX_CHUNKcxx . . $ `lib/grn_ii.h:70:9`! >> 3); i++) {
2354 if ((j = h->chunkscxx . . $ _grn_ii_header_common#chunks.[i])) {
2355 int k;
2356 for (k = 0; k < 8; k++) {
2357 if ((j & (1 << k))) {
2358 max = (i << 3) + j;
2359 }
2360 }
2361 }
2362 }
2363 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("max id of chunk segments in use");
2364 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(max);
2365 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("number of garbage chunk");
2366 GRN_OUTPUT_ARRAY_OPENcxx . . $ `lib/grn_output.h:93:9`!("NGARBAGES", GRN_II_N_CHUNK_VARIATIONcxx . . $ `lib/grn_ii.h:72:9`!);
2367 for (i = 0; i <= GRN_II_N_CHUNK_VARIATIONcxx . . $ `lib/grn_ii.h:72:9`!; i++) {
2368 GRN_OUTPUT_INT64cxx . . $ `lib/grn_output.h:101:9`!(h->ngarbages[i]);
2369 }
2370 GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `lib/grn_output.h:95:9`!();
2371 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
2372 const uint32_tcxx . . $ uint32_t# n_logical_segments = grn_ii_n_logical_segmentscxx . . $ grn_ii_n_logical_segments(25a882c459388016).(ii);
2373 for (uint32_tcxx . . $ uint32_t# lseg = 0; lseg < n_logical_segments; lseg++) {
2374 const uint32_tcxx . . $ uint32_t# pseg = grn_ii_get_buffer_psegcxx . . $ grn_ii_get_buffer_pseg(ec37801a22cc7640).(ii, lseg);
2375 if (pseg != GRN_II_PSEG_NOT_ASSIGNEDcxx . . $ `lib/grn_ii.h:85:9`!) {
2376 grn_ii_buffer_checkcxx . . $ grn_ii_buffer_check(3cc985256d58c649).(ctx, ii, lseg);
2377 }
2378 }
2379 }
2380 GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `lib/grn_output.h:95:9`!();
2381 }
2382 break;
2383 }
2384 }
2385 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2386 }
2387
2388 static grn_objcxx . . $ grn_obj# *
2389 proc_truncatecxx . . $ proc_truncate(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2390 {
2391 const char *target_name;
2392 int target_name_len;
2393
2394 target_name_len = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
2395 if (target_name_len > 0) {
2396 target_name = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
2397 } else {
2398 target_name_len = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(1));
2399 if (target_name_len == 0) {
2400 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[truncate] table name is missing");
2401 goto exit;
2402 }
2403 target_name = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(1));
2404 }
2405
2406 {
2407 grn_objcxx . . $ grn_obj# *target = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, target_name, target_name_len);
2408 if (!target) {
2409 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
2410 "[truncate] no such target: <%.*s>",
2411 target_name_len,
2412 target_name);
2413 goto exit;
2414 }
2415
2416 switch (target->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
2417 case GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!:
2418 case GRN_TABLE_PAT_KEYcxx . . $ `include/groonga/groonga.h:896:9`!:
2419 case GRN_TABLE_DAT_KEYcxx . . $ `include/groonga/groonga.h:897:9`!:
2420 case GRN_TABLE_NO_KEYcxx . . $ `include/groonga/groonga.h:898:9`!:
2421 grn_table_truncatecxx . . $ grn_table_truncate(4865d068a46d0f83).(ctx, target);
2422 break;
2423 case GRN_COLUMN_FIX_SIZEcxx . . $ `include/groonga/groonga.h:900:9`!:
2424 case GRN_COLUMN_VAR_SIZEcxx . . $ `include/groonga/groonga.h:901:9`!:
2425 case GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!:
2426 grn_column_truncatecxx . . $ grn_column_truncate(4865d068a46d0f83).(ctx, target);
2427 break;
2428 default:
2429 {
2430 grn_objcxx . . $ grn_obj# buffer;
2431 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&buffer, 0);
2432 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &buffer, target);
2433 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
2434 "[truncate] not a table nor column object: <%.*s>",
2435 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&buffer),
2436 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&buffer));
2437 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &buffer);
2438 }
2439 break;
2440 }
2441 }
2442
2443 exit:
2444 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
2445 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2446 }
2447
2448 static void
2449 list_proccxx . . $ list_proc(5cf7043d3bfb87c).(grn_ctxcxx . . $ grn_ctx# *ctx,
2450 grn_proc_typecxx . . $ grn_proc_type# target_proc_type,
2451 const char *name,
2452 const char *plural_name)
2453 {
2454 grn_objcxx . . $ grn_obj# *db;
2455 grn_table_cursorcxx . . $ grn_table_cursor# *cursor;
2456 grn_objcxx . . $ grn_obj# target_procs;
2457
2458 db = grn_ctx_dbcxx . . $ grn_ctx_db(ddec8e3b1327ceae).(ctx);
2459 cursor =
2460 grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx, db, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, 0, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, 0, 0, -1, GRN_CURSOR_BY_IDcxx . . $ `include/groonga/table.h:280:9`!);
2461 if (!cursor) {
2462 return;
2463 }
2464
2465 GRN_PTR_INITcxx . . $ `include/groonga/groonga.h:2869:9`!(&target_procs, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!, GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!);
2466 {
2467 grn_idcxx . . $ grn_id# id;
2468
2469 while ((id = grn_table_cursor_nextcxx . . $ grn_table_cursor_next(8dd58acc9865e889).(ctx, cursor)) != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
2470 grn_objcxx . . $ grn_obj# *obj;
2471 grn_proc_typecxx . . $ grn_proc_type# proc_type;
2472
2473 obj = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, id);
2474 if (!obj) {
2475 continue;
2476 }
2477
2478 if (obj->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. != GRN_PROCcxx . . $ `include/groonga/groonga.h:893:9`!) {
2479 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, obj);
2480 continue;
2481 }
2482
2483 proc_type = grn_proc_get_typecxx . . $ grn_proc_get_type(25f13f2915d2e12f).(ctx, obj);
2484 if (proc_type != target_proc_type) {
2485 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, obj);
2486 continue;
2487 }
2488
2489 GRN_PTR_PUTcxx . . $ `include/groonga/groonga.h:3218:9`!(ctx, &target_procs, obj);
2490 }
2491 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, cursor);
2492
2493 {
2494 int i, n_procs;
2495
2496 n_procs = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&target_procs) / sizeof(grn_objcxx . . $ grn_obj# *);
2497 GRN_OUTPUT_ARRAY_OPENcxx . . $ `lib/grn_output.h:93:9`!(plural_name, n_procs);
2498 for (i = 0; i < n_procs; i++) {
2499 grn_objcxx . . $ grn_obj# *proc;
2500 char name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!];
2501 int name_size;
2502
2503 proc = GRN_PTR_VALUE_ATcxx . . $ `include/groonga/groonga.h:3150:9`!(&target_procs, i);
2504 name_size = grn_obj_namecxx . . $ grn_obj_name(a51d1bff955f2f21).(ctx, proc, name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!);
2505 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!(name, 1);
2506 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("name");
2507 GRN_OUTPUT_STRcxx . . $ `lib/grn_output.h:106:9`!(name, name_size);
2508 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
2509
2510 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, proc);
2511 }
2512 GRN_OUTPUT_ARRAY_CLOSEcxx . . $ `lib/grn_output.h:95:9`!();
2513 }
2514
2515 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, &target_procs);
2516 }
2517 }
2518
2519 static grn_objcxx . . $ grn_obj# *
2520 proc_tokenizer_listcxx . . $ proc_tokenizer_list(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
2521 int nargs,
2522 grn_objcxx . . $ grn_obj# **args,
2523 grn_user_datacxx . . $ grn_user_data# *user_data)
2524 {
2525 list_proccxx . . $ list_proc(5cf7043d3bfb87c).(ctx, GRN_PROC_TOKENIZERcxx . . $ GRN_PROC_TOKENIZER., "tokenizer", "tokenizers");
2526 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2527 }
2528
2529 static grn_objcxx . . $ grn_obj# *
2530 proc_normalizer_listcxx . . $ proc_normalizer_list(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
2531 int nargs,
2532 grn_objcxx . . $ grn_obj# **args,
2533 grn_user_datacxx . . $ grn_user_data# *user_data)
2534 {
2535 list_proccxx . . $ list_proc(5cf7043d3bfb87c).(ctx, GRN_PROC_NORMALIZERcxx . . $ GRN_PROC_NORMALIZER., "normalizer", "normalizers");
2536 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
2537 }
2538
2539 static grn_objcxx . . $ grn_obj# *
2540 func_randcxx . . $ func_rand(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2541 {
2542 int val;
2543 grn_objcxx . . $ grn_obj# *obj;
2544 if (nargs > 0) {
2545 int max = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(args[0]);
2546 val = (int)(1.0 * max * randcxx . . $ rand(b126dc7c1de90089).() / (RAND_MAXcxx . . $ `<external>/10696550936717951914/stdlib.h:91:9`! + 1.0));
2547 } else {
2548 val = randcxx . . $ rand(b126dc7c1de90089).();
2549 }
2550 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_INT32, 0))) {
2551 GRN_INT32_SETcxx . . $ `include/groonga/groonga.h:2904:9`!(ctx, obj, val);
2552 }
2553 return obj;
2554 }
2555
2556 static grn_objcxx . . $ grn_obj# *
2557 func_nowcxx . . $ func_now(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2558 {
2559 grn_objcxx . . $ grn_obj# *obj;
2560 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_TIME, 0))) {
2561 GRN_TIME_NOWcxx . . $ `include/groonga/time.h:62:9`!(ctx, obj);
2562 }
2563 return obj;
2564 }
2565
2566 static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
2567 is_comparable_number_typecxx . . $ is_comparable_number_type(dfa6e707f7696010).(grn_idcxx . . $ grn_id# type)
2568 {
2569 return GRN_DB_INT8cxx . . $ GRN_DB_INT8. <= type && type <= GRN_DB_TIMEcxx . . $ GRN_DB_TIME.;
2570 }
2571
2572 static inline grn_idcxx . . $ grn_id#
2573 larger_number_typecxx . . $ larger_number_type(83f10ac8959d5577).(grn_idcxx . . $ grn_id# type1, grn_idcxx . . $ grn_id# type2)
2574 {
2575 if (type1 == type2) {
2576 return type1;
2577 }
2578
2579 switch (type1) {
2580 case GRN_DB_BFLOAT16cxx . . $ GRN_DB_BFLOAT16.:
2581 if (type2 == GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32. || type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT. ||
2582 type2 == GRN_DB_TIMEcxx . . $ GRN_DB_TIME.) {
2583 return type2;
2584 } else {
2585 return type1;
2586 }
2587 case GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.:
2588 if (type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT. || type2 == GRN_DB_TIMEcxx . . $ GRN_DB_TIME.) {
2589 return type2;
2590 } else {
2591 return type1;
2592 }
2593 case GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.:
2594 return type1;
2595 case GRN_DB_TIMEcxx . . $ GRN_DB_TIME.:
2596 if (type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.) {
2597 return type2;
2598 } else {
2599 return type1;
2600 }
2601 default:
2602 if (type2 > type1) {
2603 return type2;
2604 } else {
2605 return type1;
2606 }
2607 }
2608 }
2609
2610 static inline grn_idcxx . . $ grn_id#
2611 smaller_number_typecxx . . $ smaller_number_type(83f10ac8959d5577).(grn_idcxx . . $ grn_id# type1, grn_idcxx . . $ grn_id# type2)
2612 {
2613 if (type1 == type2) {
2614 return type1;
2615 }
2616
2617 switch (type1) {
2618 case GRN_DB_BFLOAT16cxx . . $ GRN_DB_BFLOAT16.:
2619 if (type2 == GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32. || type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT. ||
2620 type2 == GRN_DB_TIMEcxx . . $ GRN_DB_TIME.) {
2621 return type1;
2622 } else {
2623 return type2;
2624 }
2625 case GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.:
2626 if (type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT. || type2 == GRN_DB_TIMEcxx . . $ GRN_DB_TIME.) {
2627 return type1;
2628 } else {
2629 return type2;
2630 }
2631 case GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.:
2632 return type1;
2633 case GRN_DB_TIMEcxx . . $ GRN_DB_TIME.:
2634 if (type2 == GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.) {
2635 return type1;
2636 } else {
2637 return type2;
2638 }
2639 default:
2640 {
2641 grn_idcxx . . $ grn_id# smaller_number_type;
2642 if (type2 > type1) {
2643 smaller_number_type = type2;
2644 } else {
2645 smaller_number_type = type1;
2646 }
2647 switch (smaller_number_type) {
2648 case GRN_DB_UINT8cxx . . $ GRN_DB_UINT8.:
2649 return GRN_DB_INT8cxx . . $ GRN_DB_INT8.;
2650 case GRN_DB_UINT16cxx . . $ GRN_DB_UINT16.:
2651 return GRN_DB_INT16cxx . . $ GRN_DB_INT16.;
2652 case GRN_DB_UINT32cxx . . $ GRN_DB_UINT32.:
2653 return GRN_DB_INT32cxx . . $ GRN_DB_INT32.;
2654 case GRN_DB_UINT64cxx . . $ GRN_DB_UINT64.:
2655 return GRN_DB_INT64cxx . . $ GRN_DB_INT64.;
2656 default:
2657 return smaller_number_type;
2658 }
2659 }
2660 }
2661 }
2662
2663 static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
2664 is_negative_valuecxx . . $ is_negative_value(1a3c85446e861394).(grn_objcxx . . $ grn_obj# *number)
2665 {
2666 switch (number->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.) {
2667 case GRN_DB_INT8cxx . . $ GRN_DB_INT8.:
2668 return GRN_INT8_VALUEcxx . . $ `include/groonga/groonga.h:3098:9`!(number) < 0;
2669 case GRN_DB_INT16cxx . . $ GRN_DB_INT16.:
2670 return GRN_INT16_VALUEcxx . . $ `include/groonga/groonga.h:3100:9`!(number) < 0;
2671 case GRN_DB_INT32cxx . . $ GRN_DB_INT32.:
2672 return GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(number) < 0;
2673 case GRN_DB_INT64cxx . . $ GRN_DB_INT64.:
2674 return GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(number) < 0;
2675 case GRN_DB_TIMEcxx . . $ GRN_DB_TIME.:
2676 return GRN_TIME_VALUEcxx . . $ `include/groonga/groonga.h:3109:9`!(number) < 0;
2677 #ifdef GRN_HAVE_BFLOAT16
2678 case GRN_DB_BFLOAT16:
2679 return GRN_BFLOAT16_VALUE(number) < 0;
2680 #endif
2681 case GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.:
2682 return GRN_FLOAT32_VALUEcxx . . $ `include/groonga/groonga.h:3107:9`!(number) < 0;
2683 case GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.:
2684 return GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(number) < 0;
2685 default:
2686 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
2687 }
2688 }
2689
2690 static inline boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
2691 number_safe_castcxx . . $ number_safe_cast(3ed19a08a57471b3).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *src, grn_objcxx . . $ grn_obj# *dest, grn_idcxx . . $ grn_id# type)
2692 {
2693 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, dest, type, 0);
2694 if (src->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == type) {
2695 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, dest, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(src), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(src));
2696 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
2697 }
2698
2699 switch (type) {
2700 case GRN_DB_UINT8cxx . . $ GRN_DB_UINT8.:
2701 if (is_negative_valuecxx . . $ is_negative_value(1a3c85446e861394).(src)) {
2702 GRN_UINT8_SETcxx . . $ `include/groonga/groonga.h:2889:9`!(ctx, dest, 0);
2703 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
2704 }
2705 break;
2706 case GRN_DB_UINT16cxx . . $ GRN_DB_UINT16.:
2707 if (is_negative_valuecxx . . $ is_negative_value(1a3c85446e861394).(src)) {
2708 GRN_UINT16_SETcxx . . $ `include/groonga/groonga.h:2899:9`!(ctx, dest, 0);
2709 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
2710 }
2711 break;
2712 case GRN_DB_UINT32cxx . . $ GRN_DB_UINT32.:
2713 if (is_negative_valuecxx . . $ is_negative_value(1a3c85446e861394).(src)) {
2714 GRN_UINT32_SETcxx . . $ `include/groonga/groonga.h:2909:9`!(ctx, dest, 0);
2715 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
2716 }
2717 break;
2718 case GRN_DB_UINT64cxx . . $ GRN_DB_UINT64.:
2719 if (is_negative_valuecxx . . $ is_negative_value(1a3c85446e861394).(src)) {
2720 GRN_UINT64_SETcxx . . $ `include/groonga/groonga.h:2919:9`!(ctx, dest, 0);
2721 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
2722 }
2723 break;
2724 }
2725 return grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, src, dest, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!) == GRN_SUCCESScxx . . $ GRN_SUCCESS.;
2726 }
2727
2728 static inline int
2729 compare_numbercxx . . $ compare_number(8d790d4ffe1feaab).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *number1, grn_objcxx . . $ grn_obj# *number2, grn_idcxx . . $ grn_id# type)
2730 {
2731 #define COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(type, value1, value2) \
2732 { \
2733 type computed_value1 = value1; \
2734 type computed_value2 = value2; \
2735 if (computed_value1 > computed_value2) { \
2736 return 1; \
2737 } else if (computed_value1 < computed_value2) { \
2738 return -1; \
2739 } else { \
2740 return 0; \
2741 } \
2742 }
2743
2744 switch (type) {
2745 case GRN_DB_INT8cxx . . $ GRN_DB_INT8.:
2746 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(int8_t,
2747 GRN_INT8_VALUEcxx . . $ `include/groonga/groonga.h:3098:9`!(number1),
2748 GRN_INT8_VALUEcxx . . $ `include/groonga/groonga.h:3098:9`!(number2));
2749 case GRN_DB_UINT8cxx . . $ GRN_DB_UINT8.:
2750 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(uint8_t,
2751 GRN_UINT8_VALUEcxx . . $ `include/groonga/groonga.h:3099:9`!(number1),
2752 GRN_UINT8_VALUEcxx . . $ `include/groonga/groonga.h:3099:9`!(number2));
2753 case GRN_DB_INT16cxx . . $ GRN_DB_INT16.:
2754 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(int16_t,
2755 GRN_INT16_VALUEcxx . . $ `include/groonga/groonga.h:3100:9`!(number1),
2756 GRN_INT16_VALUEcxx . . $ `include/groonga/groonga.h:3100:9`!(number2));
2757 case GRN_DB_UINT16cxx . . $ GRN_DB_UINT16.:
2758 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(uint16_t,
2759 GRN_UINT16_VALUEcxx . . $ `include/groonga/groonga.h:3101:9`!(number1),
2760 GRN_UINT16_VALUEcxx . . $ `include/groonga/groonga.h:3101:9`!(number2));
2761 case GRN_DB_INT32cxx . . $ GRN_DB_INT32.:
2762 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(int32_t,
2763 GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(number1),
2764 GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(number2));
2765 case GRN_DB_UINT32cxx . . $ GRN_DB_UINT32.:
2766 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(uint32_t,
2767 GRN_UINT32_VALUEcxx . . $ `include/groonga/groonga.h:3103:9`!(number1),
2768 GRN_UINT32_VALUEcxx . . $ `include/groonga/groonga.h:3103:9`!(number2));
2769 case GRN_DB_INT64cxx . . $ GRN_DB_INT64.:
2770 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(int64_t,
2771 GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(number1),
2772 GRN_INT64_VALUEcxx . . $ `include/groonga/groonga.h:3104:9`!(number2));
2773 case GRN_DB_UINT64cxx . . $ GRN_DB_UINT64.:
2774 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(uint64_t,
2775 GRN_UINT64_VALUEcxx . . $ `include/groonga/groonga.h:3105:9`!(number1),
2776 GRN_UINT64_VALUEcxx . . $ `include/groonga/groonga.h:3105:9`!(number2));
2777 #ifdef GRN_HAVE_BFLOAT16
2778 case GRN_DB_BFLOAT16:
2779 COMPARE_AND_RETURN(grn_bfloat16,
2780 GRN_BFLOAT16_VALUE(number1),
2781 GRN_BFLOAT16_VALUE(number2));
2782 #endif
2783 case GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.:
2784 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(float,
2785 GRN_FLOAT32_VALUEcxx . . $ `include/groonga/groonga.h:3107:9`!(number1),
2786 GRN_FLOAT32_VALUEcxx . . $ `include/groonga/groonga.h:3107:9`!(number2));
2787 case GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.:
2788 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(double,
2789 GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(number1),
2790 GRN_FLOAT_VALUEcxx . . $ `include/groonga/groonga.h:3108:9`!(number2));
2791 case GRN_DB_TIMEcxx . . $ GRN_DB_TIME.:
2792 COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!(int64_t,
2793 GRN_TIME_VALUEcxx . . $ `include/groonga/groonga.h:3109:9`!(number1),
2794 GRN_TIME_VALUEcxx . . $ `include/groonga/groonga.h:3109:9`!(number2));
2795 default:
2796 return 0;
2797 }
2798
2799 #undef COMPARE_AND_RETURNcxx . . $ `lib/proc.c:2731:9`!
2800 }
2801
2802 static inline void
2803 get_number_in_grn_uvectorcxx . . $ get_number_in_grn_uvector(24d49d28e885cef4).(grn_ctxcxx . . $ grn_ctx# *ctx,
2804 grn_objcxx . . $ grn_obj# *uvector,
2805 unsigned int offset,
2806 grn_objcxx . . $ grn_obj# *buf)
2807 {
2808 #define GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(type) \
2809 do { \
2810 GRN_##type##_SET(ctx, buf, GRN_##type##_VALUE_AT(uvector, offset)); \
2811 } while (falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!)
2812 switch (uvector->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.) {
2813 case GRN_DB_BOOLcxx . . $ GRN_DB_BOOL.:
2814 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(BOOL);
2815 break;
2816 case GRN_DB_INT8cxx . . $ GRN_DB_INT8.:
2817 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(INT8);
2818 break;
2819 case GRN_DB_UINT8cxx . . $ GRN_DB_UINT8.:
2820 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(UINT8);
2821 break;
2822 case GRN_DB_INT16cxx . . $ GRN_DB_INT16.:
2823 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(INT16);
2824 break;
2825 case GRN_DB_UINT16cxx . . $ GRN_DB_UINT16.:
2826 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(UINT16);
2827 break;
2828 case GRN_DB_INT32cxx . . $ GRN_DB_INT32.:
2829 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(INT32);
2830 break;
2831 case GRN_DB_UINT32cxx . . $ GRN_DB_UINT32.:
2832 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(UINT32);
2833 break;
2834 case GRN_DB_INT64cxx . . $ GRN_DB_INT64.:
2835 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(INT64);
2836 break;
2837 case GRN_DB_UINT64cxx . . $ GRN_DB_UINT64.:
2838 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(UINT64);
2839 break;
2840 #ifdef GRN_HAVE_BFLOAT16
2841 case GRN_DB_BFLOAT16:
2842 GET_UVECTOR_ELEMENT_AS(BFLOAT16);
2843 break;
2844 #endif
2845 case GRN_DB_FLOAT32cxx . . $ GRN_DB_FLOAT32.:
2846 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(FLOAT32);
2847 break;
2848 case GRN_DB_FLOATcxx . . $ GRN_DB_FLOAT.:
2849 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(FLOAT);
2850 break;
2851 case GRN_DB_TIMEcxx . . $ GRN_DB_TIME.:
2852 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(TIME);
2853 break;
2854 default:
2855 GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!(RECORD);
2856 break;
2857 }
2858 #undef GET_UVECTOR_ELEMENT_AScxx . . $ `lib/proc.c:2808:9`!
2859 }
2860
2861 static inline void
2862 apply_maxcxx . . $ apply_max(6abfc23ff21f72fe).(grn_ctxcxx . . $ grn_ctx# *ctx,
2863 grn_objcxx . . $ grn_obj# *number,
2864 grn_objcxx . . $ grn_obj# *max,
2865 grn_objcxx . . $ grn_obj# *casted_number,
2866 grn_objcxx . . $ grn_obj# *casted_max,
2867 grn_idcxx . . $ grn_id# cast_type)
2868 {
2869 grn_idcxx . . $ grn_id# domain = number->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
2870 if (!is_comparable_number_typecxx . . $ is_comparable_number_type(dfa6e707f7696010).(domain)) {
2871 return;
2872 }
2873 cast_type = larger_number_typecxx . . $ larger_number_type(83f10ac8959d5577).(cast_type, domain);
2874 if (!number_safe_castcxx . . $ number_safe_cast(3ed19a08a57471b3).(ctx, number, casted_number, cast_type)) {
2875 return;
2876 }
2877 if (max->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_VOIDcxx . . $ GRN_DB_VOID.) {
2878 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, max, cast_type, 0);
2879 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
2880 max,
2881 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_number),
2882 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_number));
2883 return;
2884 }
2885
2886 if (max->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != cast_type) {
2887 if (!number_safe_castcxx . . $ number_safe_cast(3ed19a08a57471b3).(ctx, max, casted_max, cast_type)) {
2888 return;
2889 }
2890 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, max, cast_type, 0);
2891 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
2892 max,
2893 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_max),
2894 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_max));
2895 }
2896 if (compare_numbercxx . . $ compare_number(8d790d4ffe1feaab).(ctx, casted_number, max, cast_type) > 0) {
2897 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, max, cast_type, 0);
2898 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
2899 max,
2900 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_number),
2901 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_number));
2902 }
2903 }
2904
2905 static grn_objcxx . . $ grn_obj# *
2906 func_maxcxx . . $ func_max(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
2907 {
2908 grn_objcxx . . $ grn_obj# *max;
2909 grn_idcxx . . $ grn_id# cast_type = GRN_DB_INT8cxx . . $ GRN_DB_INT8.;
2910 grn_objcxx . . $ grn_obj# casted_max, casted_number;
2911 int i;
2912
2913 max = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_VOID, 0);
2914 if (!max) {
2915 return max;
2916 }
2917
2918 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&casted_max);
2919 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&casted_number);
2920
2921 for (i = 0; i < nargs; i++) {
2922 switch (args[i]->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
2923 case GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!:
2924 apply_maxcxx . . $ apply_max(6abfc23ff21f72fe).(ctx, args[i], max, &casted_number, &casted_max, cast_type);
2925 break;
2926 case GRN_UVECTORcxx . . $ `include/groonga/groonga.h:875:9`!:
2927 {
2928 unsigned int j;
2929 unsigned int n_elements;
2930 grn_objcxx . . $ grn_obj# number_in_uvector;
2931 grn_objcxx . . $ grn_obj# *domain;
2932
2933 domain = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, args[i]->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
2934 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&number_in_uvector, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, args[i]->header.domain);
2935 n_elements = grn_uvector_sizecxx . . $ grn_uvector_size(8dd58acc9865e889).(ctx, args[i]);
2936 for (j = 0; j < n_elements; j++) {
2937 get_number_in_grn_uvectorcxx . . $ get_number_in_grn_uvector(24d49d28e885cef4).(ctx, args[i], j, &number_in_uvector);
2938 if (grn_obj_is_tablecxx . . $ grn_obj_is_table(a5760e5c319a06ee).(ctx, domain)) {
2939 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, &number_in_uvector, domain->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain., 0);
2940 grn_table_get_key2cxx . . $ grn_table_get_key2(bd0cb75328e85567).(ctx,
2941 domain,
2942 GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(&number_in_uvector),
2943 &number_in_uvector);
2944 }
2945 apply_maxcxx . . $ apply_max(6abfc23ff21f72fe).(ctx,
2946 &number_in_uvector,
2947 max,
2948 &casted_number,
2949 &casted_max,
2950 cast_type);
2951 }
2952 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &number_in_uvector);
2953 }
2954 break;
2955 default:
2956 continue;
2957 }
2958 }
2959 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &casted_max);
2960 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &casted_number);
2961
2962 return max;
2963 }
2964
2965 static void
2966 apply_mincxx . . $ apply_min(6abfc23ff21f72fe).(grn_ctxcxx . . $ grn_ctx# *ctx,
2967 grn_objcxx . . $ grn_obj# *number,
2968 grn_objcxx . . $ grn_obj# *min,
2969 grn_objcxx . . $ grn_obj# *casted_number,
2970 grn_objcxx . . $ grn_obj# *casted_min,
2971 grn_idcxx . . $ grn_id# cast_type)
2972 {
2973 grn_idcxx . . $ grn_id# domain = number->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
2974 if (!is_comparable_number_typecxx . . $ is_comparable_number_type(dfa6e707f7696010).(domain)) {
2975 return;
2976 }
2977 cast_type = smaller_number_typecxx . . $ smaller_number_type(83f10ac8959d5577).(cast_type, domain);
2978 if (!number_safe_castcxx . . $ number_safe_cast(3ed19a08a57471b3).(ctx, number, casted_number, cast_type)) {
2979 return;
2980 }
2981 if (min->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_VOIDcxx . . $ GRN_DB_VOID.) {
2982 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, min, cast_type, 0);
2983 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
2984 min,
2985 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_number),
2986 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_number));
2987 return;
2988 }
2989
2990 if (min->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != cast_type) {
2991 if (!number_safe_castcxx . . $ number_safe_cast(3ed19a08a57471b3).(ctx, min, casted_min, cast_type)) {
2992 return;
2993 }
2994 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, min, cast_type, 0);
2995 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
2996 min,
2997 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_min),
2998 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_min));
2999 }
3000 if (compare_numbercxx . . $ compare_number(8d790d4ffe1feaab).(ctx, casted_number, min, cast_type) < 0) {
3001 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, min, cast_type, 0);
3002 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
3003 min,
3004 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(casted_number),
3005 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(casted_number));
3006 }
3007 }
3008
3009 static grn_objcxx . . $ grn_obj# *
3010 func_mincxx . . $ func_min(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
3011 {
3012 grn_objcxx . . $ grn_obj# *min;
3013 grn_idcxx . . $ grn_id# cast_type = GRN_DB_INT8cxx . . $ GRN_DB_INT8.;
3014 grn_objcxx . . $ grn_obj# casted_min, casted_number;
3015 int i;
3016
3017 min = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_VOID, 0);
3018 if (!min) {
3019 return min;
3020 }
3021
3022 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&casted_min);
3023 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&casted_number);
3024 for (i = 0; i < nargs; i++) {
3025 switch (args[i]->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
3026 case GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!:
3027 apply_mincxx . . $ apply_min(6abfc23ff21f72fe).(ctx, args[i], min, &casted_number, &casted_min, cast_type);
3028 break;
3029 case GRN_UVECTORcxx . . $ `include/groonga/groonga.h:875:9`!:
3030 {
3031 unsigned int j;
3032 unsigned int n_elements;
3033 grn_objcxx . . $ grn_obj# number_in_uvector;
3034 grn_objcxx . . $ grn_obj# *domain;
3035
3036 domain = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, args[i]->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
3037 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&number_in_uvector, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, args[i]->header.domain);
3038 n_elements = grn_uvector_sizecxx . . $ grn_uvector_size(8dd58acc9865e889).(ctx, args[i]);
3039 for (j = 0; j < n_elements; j++) {
3040 get_number_in_grn_uvectorcxx . . $ get_number_in_grn_uvector(24d49d28e885cef4).(ctx, args[i], j, &number_in_uvector);
3041 if (grn_obj_is_tablecxx . . $ grn_obj_is_table(a5760e5c319a06ee).(ctx, domain)) {
3042 grn_obj_reinitcxx . . $ grn_obj_reinit(fc9ea836325dd1d2).(ctx, &number_in_uvector, domain->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain., 0);
3043 grn_table_get_key2cxx . . $ grn_table_get_key2(bd0cb75328e85567).(ctx,
3044 domain,
3045 GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(&number_in_uvector),
3046 &number_in_uvector);
3047 }
3048 apply_mincxx . . $ apply_min(6abfc23ff21f72fe).(ctx,
3049 &number_in_uvector,
3050 min,
3051 &casted_number,
3052 &casted_min,
3053 cast_type);
3054 }
3055 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &number_in_uvector);
3056 }
3057 break;
3058 default:
3059 continue;
3060 }
3061 }
3062 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &casted_min);
3063 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &casted_number);
3064
3065 return min;
3066 }
3067
3068 static grn_objcxx . . $ grn_obj# *
3069 func_geo_in_circlecxx . . $ func_geo_in_circle(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3070 int nargs,
3071 grn_objcxx . . $ grn_obj# **args,
3072 grn_user_datacxx . . $ grn_user_data# *user_data)
3073 {
3074 grn_objcxx . . $ grn_obj# *obj;
3075 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! r = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3076 grn_geo_approximate_typecxx . . $ grn_geo_approximate_type# type = GRN_GEO_APPROXIMATE_RECTANGLEcxx . . $ GRN_GEO_APPROXIMATE_RECTANGLE.;
3077 switch (nargs) {
3078 case 4:
3079 if (grn_geo_resolve_approximate_typecxx . . $ grn_geo_resolve_approximate_type(86997f310e277b98).(ctx, args[3], &type) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3080 break;
3081 }
3082 /* fallthru */
3083 case 3:
3084 r = grn_geo_in_circlecxx . . $ grn_geo_in_circle(e6c95e462de3c07).(ctx, args[0], args[1], args[2], type);
3085 break;
3086 default:
3087 break;
3088 }
3089 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0))) {
3090 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, obj, r);
3091 }
3092 return obj;
3093 }
3094
3095 static grn_objcxx . . $ grn_obj# *
3096 func_geo_in_rectanglecxx . . $ func_geo_in_rectangle(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3097 int nargs,
3098 grn_objcxx . . $ grn_obj# **args,
3099 grn_user_datacxx . . $ grn_user_data# *user_data)
3100 {
3101 grn_objcxx . . $ grn_obj# *obj;
3102 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! r = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3103 if (nargs == 3) {
3104 r = grn_geo_in_rectanglecxx . . $ grn_geo_in_rectangle(67353b157293bb80).(ctx, args[0], args[1], args[2]);
3105 }
3106 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0))) {
3107 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, obj, r);
3108 }
3109 return obj;
3110 }
3111
3112 static grn_objcxx . . $ grn_obj# *
3113 func_geo_distancecxx . . $ func_geo_distance(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3114 int nargs,
3115 grn_objcxx . . $ grn_obj# **args,
3116 grn_user_datacxx . . $ grn_user_data# *user_data)
3117 {
3118 grn_objcxx . . $ grn_obj# *obj;
3119 double d = 0.0;
3120 grn_geo_approximate_typecxx . . $ grn_geo_approximate_type# type = GRN_GEO_APPROXIMATE_RECTANGLEcxx . . $ GRN_GEO_APPROXIMATE_RECTANGLE.;
3121 switch (nargs) {
3122 case 3:
3123 if (grn_geo_resolve_approximate_typecxx . . $ grn_geo_resolve_approximate_type(86997f310e277b98).(ctx, args[2], &type) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3124 break;
3125 }
3126 /* fallthru */
3127 case 2:
3128 d = grn_geo_distancecxx . . $ grn_geo_distance(c8fc4aa50dd36c79).(ctx, args[0], args[1], type);
3129 break;
3130 default:
3131 break;
3132 }
3133 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_FLOAT, 0))) {
3134 GRN_FLOAT_SETcxx . . $ `include/groonga/groonga.h:2934:9`!(ctx, obj, d);
3135 }
3136 return obj;
3137 }
3138
3139 /* deprecated. */
3140 static grn_objcxx . . $ grn_obj# *
3141 func_geo_distance2cxx . . $ func_geo_distance2(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3142 int nargs,
3143 grn_objcxx . . $ grn_obj# **args,
3144 grn_user_datacxx . . $ grn_user_data# *user_data)
3145 {
3146 grn_objcxx . . $ grn_obj# *obj;
3147 double d = 0;
3148 if (nargs == 2) {
3149 d = grn_geo_distance_spherecxx . . $ grn_geo_distance_sphere(58fe0e666eafa6a2).(ctx, args[0], args[1]);
3150 }
3151 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_FLOAT, 0))) {
3152 GRN_FLOAT_SETcxx . . $ `include/groonga/groonga.h:2934:9`!(ctx, obj, d);
3153 }
3154 return obj;
3155 }
3156
3157 /* deprecated. */
3158 static grn_objcxx . . $ grn_obj# *
3159 func_geo_distance3cxx . . $ func_geo_distance3(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3160 int nargs,
3161 grn_objcxx . . $ grn_obj# **args,
3162 grn_user_datacxx . . $ grn_user_data# *user_data)
3163 {
3164 grn_objcxx . . $ grn_obj# *obj;
3165 double d = 0;
3166 if (nargs == 2) {
3167 d = grn_geo_distance_ellipsoidcxx . . $ grn_geo_distance_ellipsoid(58fe0e666eafa6a2).(ctx, args[0], args[1]);
3168 }
3169 if ((obj = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_FLOAT, 0))) {
3170 GRN_FLOAT_SETcxx . . $ `include/groonga/groonga.h:2934:9`!(ctx, obj, d);
3171 }
3172 return obj;
3173 }
3174
3175 static grn_objcxx . . $ grn_obj# *
3176 func_all_recordscxx . . $ func_all_records(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3177 int nargs,
3178 grn_objcxx . . $ grn_obj# **args,
3179 grn_user_datacxx . . $ grn_user_data# *user_data)
3180 {
3181 grn_objcxx . . $ grn_obj# *true_value;
3182 if ((true_value = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0))) {
3183 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, true_value, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
3184 }
3185 return true_value;
3186 }
3187
3188 static grn_rccxx . . $ grn_rc#
3189 selector_all_recordscxx . . $ selector_all_records(2267fc2522c8e143).(grn_ctxcxx . . $ grn_ctx# *ctx,
3190 grn_objcxx . . $ grn_obj# *table,
3191 grn_objcxx . . $ grn_obj# *index,
3192 int nargs,
3193 grn_objcxx . . $ grn_obj# **args,
3194 grn_objcxx . . $ grn_obj# *res,
3195 grn_operatorcxx . . $ grn_operator# op)
3196 {
3197 const double score = 1.0;
3198 return grn_result_set_add_tablecxx . . $ grn_result_set_add_table(b01ceb7524d76776).(ctx, (grn_hashcxx . . $ grn_hash# *)res, table, score, op);
3199 }
3200
3201 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3202 grn_proc_selector_to_function_data_initcxx . . $ grn_proc_selector_to_function_data_init(772fe8ac43afcbe0).(
3203 grn_ctxcxx . . $ grn_ctx# *ctx,
3204 grn_proc_selector_to_function_datacxx . . $ grn_proc_selector_to_function_data# *data,
3205 grn_user_datacxx . . $ grn_user_data# *user_data)
3206 {
3207 grn_objcxx . . $ grn_obj# *condition = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3208 grn_objcxx . . $ grn_obj# *variable;
3209
3210 data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3211 data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3212
3213 data->foundcxx . . $ $anonymous_type_d86be75610bb39e6_0#found. = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0);
3214 if (!data->foundcxx . . $ $anonymous_type_d86be75610bb39e6_0#found.) {
3215 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3216 }
3217 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, data->found, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
3218
3219 grn_proc_get_infocxx . . $ grn_proc_get_info(760bc9a52c80d02a).(ctx, user_data, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, &condition);
3220 if (!condition) {
3221 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3222 }
3223
3224 variable = grn_expr_get_var_by_offsetcxx . . $ grn_expr_get_var_by_offset(fe791abc79590565).(ctx, condition, 0);
3225 if (!variable) {
3226 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3227 }
3228
3229 data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table. = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, variable->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
3230 if (!data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table.) {
3231 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3232 }
3233
3234 data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records. = grn_table_createcxx . . $ grn_table_create(51df5019e8d3bdc1).(ctx,
3235 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3236 0,
3237 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3238 GRN_OBJ_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:688:9`! | GRN_OBJ_WITH_SUBRECcxx . . $ `include/groonga/groonga.h:812:9`!,
3239 data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table.,
3240 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
3241 if (!data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records.) {
3242 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3243 }
3244
3245 {
3246 grn_rset_posinfocxx . . $ grn_rset_posinfo# pi;
3247 unsigned int key_size;
3248 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&pi, 0, sizeof(grn_rset_posinfocxx . . $ grn_rset_posinfo#));
3249 pi.ridcxx . . $ $anonymous_type_cc21d51c44e8310a_1#rid. = GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(variable);
3250 key_size = ((grn_hashcxx . . $ grn_hash# *)(data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records.))->key_sizecxx . . $ _grn_hash#key_size.;
3251 if (grn_table_addcxx . . $ grn_table_add(8041cb9a4866097e).(ctx, data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records., &pi, key_size, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!) == GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
3252 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3253 }
3254 }
3255
3256 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3257 }
3258
3259 void
3260 grn_proc_selector_to_function_data_selectedcxx . . $ grn_proc_selector_to_function_data_selected(73dfe8cdab418423).(
3261 grn_ctxcxx . . $ grn_ctx# *ctx, grn_proc_selector_to_function_datacxx . . $ grn_proc_selector_to_function_data# *data)
3262 {
3263 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, data->found, grn_table_size(ctx, data->records) > 0);
3264 }
3265
3266 void
3267 grn_proc_selector_to_function_data_fincxx . . $ grn_proc_selector_to_function_data_fin(73dfe8cdab418423).(grn_ctxcxx . . $ grn_ctx# *ctx,
3268 grn_proc_selector_to_function_datacxx . . $ grn_proc_selector_to_function_data# *data)
3269 {
3270 if (data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records.) {
3271 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, data->recordscxx . . $ $anonymous_type_d86be75610bb39e6_0#records.);
3272 }
3273 if (data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table.) {
3274 grn_obj_unrefcxx . . $ grn_obj_unref(cda3a5f3c2e53c6b).(ctx, data->tablecxx . . $ $anonymous_type_d86be75610bb39e6_0#table.);
3275 }
3276 }
3277
3278 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3279 sub_filter_pre_filter_accessor_is_availablecxx . . $ sub_filter_pre_filter_accessor_is_available(8cf5345b2e138b5a).(grn_ctxcxx . . $ grn_ctx# *ctx,
3280 grn_accessorcxx . . $ grn_accessor# *accessor)
3281 {
3282 if (grn_obj_is_scalar_columncxx . . $ grn_obj_is_scalar_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.) ||
3283 grn_obj_is_tablecxx . . $ grn_obj_is_table(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3284 if (accessor->nextcxx . . $ _grn_accessor#next.) {
3285 return sub_filter_pre_filter_accessor_is_availablecxx . . $ sub_filter_pre_filter_accessor_is_available(8cf5345b2e138b5a).(ctx, accessor->nextcxx . . $ _grn_accessor#next.);
3286 } else {
3287 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3288 }
3289 } else if (grn_obj_is_vector_columncxx . . $ grn_obj_is_vector_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3290 if (accessor->nextcxx . . $ _grn_accessor#next.) {
3291 return sub_filter_pre_filter_accessor_is_availablecxx . . $ sub_filter_pre_filter_accessor_is_available(8cf5345b2e138b5a).(ctx, accessor->nextcxx . . $ _grn_accessor#next.);
3292 } else {
3293 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3294 }
3295 } else if (grn_obj_is_index_columncxx . . $ grn_obj_is_index_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3296 if (accessor->nextcxx . . $ _grn_accessor#next.) {
3297 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3298 } else {
3299 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3300 }
3301 } else {
3302 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3303 }
3304 }
3305
3306 static void
3307 sub_filter_pre_filter_accessorcxx . . $ sub_filter_pre_filter_accessor(f716e59a8491d6b6).(grn_ctxcxx . . $ grn_ctx# *ctx,
3308 grn_accessorcxx . . $ grn_accessor# *accessor,
3309 grn_idcxx . . $ grn_id# id,
3310 grn_objcxx . . $ grn_obj# *base_res)
3311 {
3312 if (grn_obj_is_scalar_columncxx . . $ grn_obj_is_scalar_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.) ||
3313 grn_obj_is_tablecxx . . $ grn_obj_is_table(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3314 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
3315 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
3316 if (grn_obj_is_scalar_columncxx . . $ grn_obj_is_scalar_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3317 grn_objcxx . . $ grn_obj# value;
3318 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&value, 0, DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(accessor->obj)->range);
3319 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, accessor->objcxx . . $ _grn_accessor#obj., id, &value);
3320 if (GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&value) > 0) {
3321 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(&value);
3322 }
3323 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &value);
3324 } else {
3325 grn_table_get_keycxx . . $ grn_table_get_key(2c24f49dad267d35).(ctx, accessor->objcxx . . $ _grn_accessor#obj., id, &(posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid.), sizeof(grn_idcxx . . $ grn_id#));
3326 }
3327 if (posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
3328 if (accessor->nextcxx . . $ _grn_accessor#next.) {
3329 sub_filter_pre_filter_accessorcxx . . $ sub_filter_pre_filter_accessor(f716e59a8491d6b6).(ctx,
3330 accessor->nextcxx . . $ _grn_accessor#next.,
3331 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid.,
3332 base_res);
3333 } else {
3334 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
3335 (grn_postingcxx . . $ grn_posting# *)(&posting),
3336 (grn_hashcxx . . $ grn_hash# *)base_res,
3337 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3338 }
3339 }
3340 } else if (grn_obj_is_vector_columncxx . . $ grn_obj_is_vector_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3341 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
3342 grn_objcxx . . $ grn_obj# values;
3343 unsigned int i, n;
3344
3345 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
3346 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&values, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!, DB_OBJcxx . . $ `lib/grn_db.h:62:9`!(accessor->obj)->range);
3347 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, accessor->objcxx . . $ _grn_accessor#obj., id, &values);
3348 n = grn_vector_sizecxx . . $ grn_vector_size(8dd58acc9865e889).(ctx, &values);
3349 for (i = 0; i < n; i++) {
3350 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = grn_uvector_get_elementcxx . . $ grn_uvector_get_element(621459fee6c81b73).(ctx, &values, i, &(posting.weightcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight.));
3351 if (accessor->nextcxx . . $ _grn_accessor#next.) {
3352 sub_filter_pre_filter_accessorcxx . . $ sub_filter_pre_filter_accessor(f716e59a8491d6b6).(ctx,
3353 accessor->nextcxx . . $ _grn_accessor#next.,
3354 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid.,
3355 base_res);
3356 } else {
3357 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
3358 (grn_postingcxx . . $ grn_posting# *)(&posting),
3359 (grn_hashcxx . . $ grn_hash# *)base_res,
3360 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3361 }
3362 }
3363 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &values);
3364 } else if (grn_obj_is_index_columncxx . . $ grn_obj_is_index_column(a5760e5c319a06ee).(ctx, accessor->objcxx . . $ _grn_accessor#obj.)) {
3365 grn_ii_atcxx . . $ grn_ii_at(c699eb785099329f).(ctx,
3366 (grn_iicxx . . $ grn_ii# *)(accessor->objcxx . . $ _grn_accessor#obj.),
3367 id,
3368 (grn_hashcxx . . $ grn_hash# *)base_res,
3369 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3370 }
3371 }
3372
3373 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3374 sub_filter_need_pre_filtercxx . . $ sub_filter_need_pre_filter(46c55a7458226ae9).(grn_ctxcxx . . $ grn_ctx# *ctx,
3375 grn_objcxx . . $ grn_obj# *res,
3376 int32_tcxx . . $ int32_t# pre_filter_threshold)
3377 {
3378 if (pre_filter_threshold < 0) {
3379 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3380 }
3381
3382 if ((int32_tcxx . . $ int32_t#)(grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, res)) <= pre_filter_threshold) {
3383 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3384 }
3385
3386 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3387 }
3388
3389 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3390 sub_filter_pre_filtercxx . . $ sub_filter_pre_filter(155628a51fa543a8).(grn_ctxcxx . . $ grn_ctx# *ctx,
3391 grn_objcxx . . $ grn_obj# *res,
3392 grn_objcxx . . $ grn_obj# *scope,
3393 grn_objcxx . . $ grn_obj# *base_res,
3394 int32_tcxx . . $ int32_t# pre_filter_threshold)
3395 {
3396 const char *action = "[sub-filter][pre-filter]";
3397
3398 if (!sub_filter_need_pre_filtercxx . . $ sub_filter_need_pre_filter(46c55a7458226ae9).(ctx, res, pre_filter_threshold)) {
3399 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3400 }
3401
3402 if (grn_obj_is_scalar_columncxx . . $ grn_obj_is_scalar_column(a5760e5c319a06ee).(ctx, scope)) {
3403 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
3404 grn_objcxx . . $ grn_obj# value;
3405
3406 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
3407 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&value, 0, grn_obj_get_range(ctx, scope));
3408 GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, res, cursor, id)
3409 {
3410 grn_idcxx . . $ grn_id# *matched_id;
3411
3412 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&matched_id);
3413 GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&value);
3414 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, scope, *matched_id, &value);
3415 if (GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&value) > 0) {
3416 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(&value);
3417 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
3418 (grn_postingcxx . . $ grn_posting# *)(&posting),
3419 (grn_hashcxx . . $ grn_hash# *)base_res,
3420 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3421 }
3422 }
3423 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
3424 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &value);
3425
3426 grn_report_columncxx . . $ grn_report_column(a946cb14e70570c4).(ctx, action, "[scalar]", scope);
3427 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3428 } else if (grn_obj_is_vector_columncxx . . $ grn_obj_is_vector_column(a5760e5c319a06ee).(ctx, scope)) {
3429 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
3430 grn_objcxx . . $ grn_obj# values;
3431
3432 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
3433 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&values, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!, grn_obj_get_range(ctx, scope));
3434 GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, res, cursor, id)
3435 {
3436 grn_idcxx . . $ grn_id# *matched_id;
3437 unsigned int i, n;
3438
3439 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&matched_id);
3440 GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&values);
3441 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, scope, *matched_id, &values);
3442 n = grn_vector_sizecxx . . $ grn_vector_size(8dd58acc9865e889).(ctx, &values);
3443 for (i = 0; i < n; i++) {
3444 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. =
3445 grn_uvector_get_elementcxx . . $ grn_uvector_get_element(621459fee6c81b73).(ctx, &values, i, &(posting.weightcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight.));
3446 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
3447 (grn_postingcxx . . $ grn_posting# *)(&posting),
3448 (grn_hashcxx . . $ grn_hash# *)base_res,
3449 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3450 }
3451 }
3452 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
3453 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &values);
3454
3455 grn_report_columncxx . . $ grn_report_column(a946cb14e70570c4).(ctx, action, "[vector]", scope);
3456 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3457 } else if (grn_obj_is_index_columncxx . . $ grn_obj_is_index_column(a5760e5c319a06ee).(ctx, scope)) {
3458 GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, res, cursor, id)
3459 {
3460 grn_idcxx . . $ grn_id# *matched_id;
3461 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&matched_id);
3462 grn_ii_atcxx . . $ grn_ii_at(c699eb785099329f).(ctx,
3463 (grn_iicxx . . $ grn_ii# *)scope,
3464 *matched_id,
3465 (grn_hashcxx . . $ grn_hash# *)base_res,
3466 GRN_OP_ORcxx . . $ GRN_OP_OR.);
3467 }
3468 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
3469
3470 grn_report_columncxx . . $ grn_report_column(a946cb14e70570c4).(ctx, action, "[index]", scope);
3471 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3472 } else if (grn_obj_is_accessorcxx . . $ grn_obj_is_accessor(a5760e5c319a06ee).(ctx, scope)) {
3473 grn_accessorcxx . . $ grn_accessor# *accessor = (grn_accessorcxx . . $ grn_accessor# *)scope;
3474 if (!sub_filter_pre_filter_accessor_is_availablecxx . . $ sub_filter_pre_filter_accessor_is_available(8cf5345b2e138b5a).(ctx, accessor)) {
3475 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3476 }
3477 GRN_TABLE_EACH_BEGINcxx . . $ `include/groonga/table.h:614:9`!(ctx, res, cursor, id)
3478 {
3479 grn_idcxx . . $ grn_id# *matched_id;
3480 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&matched_id);
3481 sub_filter_pre_filter_accessorcxx . . $ sub_filter_pre_filter_accessor(f716e59a8491d6b6).(ctx, accessor, *matched_id, base_res);
3482 }
3483 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
3484 grn_report_accessorcxx . . $ grn_report_accessor(a946cb14e70570c4).(ctx, action, "", scope);
3485 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3486 } else {
3487 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3488 }
3489 }
3490
3491 static grn_rccxx . . $ grn_rc#
3492 run_sub_filtercxx . . $ run_sub_filter(4f4d7c9d7ebf503c).(grn_ctxcxx . . $ grn_ctx# *ctx,
3493 grn_objcxx . . $ grn_obj# *table,
3494 int nargs,
3495 grn_objcxx . . $ grn_obj# **args,
3496 grn_objcxx . . $ grn_obj# *res,
3497 grn_operatorcxx . . $ grn_operator# op)
3498 {
3499 const char *tag = "[sub-filter]";
3500 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
3501 grn_objcxx . . $ grn_obj# *scope;
3502 grn_objcxx . . $ grn_obj# *sub_filter_string;
3503 int32_tcxx . . $ int32_t# pre_filter_threshold = grn_sub_filter_pre_filter_thresholdcxx . . $ grn_sub_filter_pre_filter_threshold.;
3504 grn_objcxx . . $ grn_obj# *scope_domain = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3505 grn_objcxx . . $ grn_obj# *sub_filter = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3506 grn_objcxx . . $ grn_obj# *dummy_variable = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3507
3508 if (!(nargs >= 2 && nargs <= 3)) {
3509 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3510 "%s wrong number of arguments (%d for 2..3)",
3511 tag,
3512 nargs);
3513 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3514 goto exit;
3515 }
3516
3517 scope = args[0];
3518 sub_filter_string = args[1];
3519 if (nargs == 3) {
3520 grn_proc_options_parsecxx . . $ grn_proc_options_parse(b3b87877968531ef).(ctx,
3521 args[2],
3522 tag,
3523 "pre_filter_threshold",
3524 GRN_PROC_OPTION_VALUE_INT32cxx . . $ GRN_PROC_OPTION_VALUE_INT32.,
3525 &pre_filter_threshold,
3526 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
3527 }
3528
3529 switch (scope->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
3530 case GRN_ACCESSORcxx . . $ `include/groonga/groonga.h:880:9`!:
3531 case GRN_COLUMN_FIX_SIZEcxx . . $ `include/groonga/groonga.h:900:9`!:
3532 case GRN_COLUMN_VAR_SIZEcxx . . $ `include/groonga/groonga.h:901:9`!:
3533 case GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!:
3534 break;
3535 default:
3536 /* TODO: put inspected the 1st argument to message */
3537 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3538 "%s the 1st argument must be column or accessor",
3539 tag);
3540 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3541 goto exit;
3542 break;
3543 }
3544
3545 scope_domain = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, grn_obj_get_rangecxx . . $ grn_obj_get_range(8dd58acc9865e889).(ctx, scope));
3546
3547 if (sub_filter_string->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. != GRN_DB_TEXTcxx . . $ GRN_DB_TEXT.) {
3548 /* TODO: put inspected the 2nd argument to message */
3549 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "%s the 2nd argument must be String", tag);
3550 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3551 goto exit;
3552 }
3553 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(sub_filter_string) == 0) {
3554 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3555 "%s the 2nd argument must not be empty String",
3556 tag);
3557 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3558 goto exit;
3559 }
3560
3561 GRN_EXPR_CREATE_FOR_QUERYcxx . . $ `include/groonga/expr.h:216:9`!(ctx, scope_domain, sub_filter, dummy_variable);
3562 if (!sub_filter) {
3563 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3564 goto exit;
3565 }
3566
3567 grn_expr_parsecxx . . $ grn_expr_parse(9934d963d400828).(ctx,
3568 sub_filter,
3569 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(sub_filter_string),
3570 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(sub_filter_string),
3571 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3572 GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.,
3573 GRN_OP_ANDcxx . . $ GRN_OP_AND.,
3574 GRN_EXPR_SYNTAX_SCRIPTcxx . . $ `include/groonga/expr.h:29:9`!);
3575 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3576 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3577 goto exit;
3578 }
3579
3580 {
3581 grn_objcxx . . $ grn_obj# *base_res = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3582 grn_operatorcxx . . $ grn_operator# select_op = GRN_OP_ORcxx . . $ GRN_OP_OR.;
3583
3584 base_res = grn_table_createcxx . . $ grn_table_create(51df5019e8d3bdc1).(ctx,
3585 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3586 0,
3587 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3588 GRN_OBJ_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:688:9`! | GRN_OBJ_WITH_SUBRECcxx . . $ `include/groonga/groonga.h:812:9`!,
3589 scope_domain,
3590 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
3591 if (op == GRN_OP_ANDcxx . . $ GRN_OP_AND. && sub_filter_pre_filtercxx . . $ sub_filter_pre_filter(155628a51fa543a8).(ctx,
3592 res,
3593 scope,
3594 base_res,
3595 pre_filter_threshold)) {
3596 if (base_res) {
3597 void *key = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, *value = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3598 uint32_tcxx . . $ uint32_t# key_size = 0;
3599
3600 GRN_TABLE_EACHcxx . . $ `include/groonga/table.h:551:9`!(ctx, base_res, 0, 0, id, &key, &key_size, &value, {
3601 grn_rset_recinfo *ri = value;
3602 ri->score = 0;
3603 });
3604 }
3605 select_op = GRN_OP_ANDcxx . . $ GRN_OP_AND.;
3606 }
3607 grn_table_selectcxx . . $ grn_table_select(fec47fdf91015e61).(ctx, scope_domain, sub_filter, base_res, select_op);
3608 if (scope->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_ACCESSORcxx . . $ `include/groonga/groonga.h:880:9`!) {
3609 rc = grn_accessor_resolvecxx . . $ grn_accessor_resolve(377db51441efe675).(ctx, scope, -1, base_res, res, op);
3610 } else {
3611 grn_accessorcxx . . $ grn_accessor# accessor;
3612 accessor.headercxx . . $ _grn_accessor#header..typecxx . . $ _grn_obj_header#type. = GRN_ACCESSORcxx . . $ `include/groonga/groonga.h:880:9`!;
3613 accessor.objcxx . . $ _grn_accessor#obj. = scope;
3614 accessor.actioncxx . . $ _grn_accessor#action. = GRN_ACCESSOR_GET_COLUMN_VALUEcxx . . $ GRN_ACCESSOR_GET_COLUMN_VALUE.;
3615 accessor.nextcxx . . $ _grn_accessor#next. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3616 rc =
3617 grn_accessor_resolvecxx . . $ grn_accessor_resolve(377db51441efe675).(ctx, (grn_objcxx . . $ grn_obj# *)&accessor, -1, base_res, res, op);
3618 }
3619 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, base_res);
3620 }
3621
3622 exit:
3623 if (scope_domain) {
3624 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, scope_domain);
3625 }
3626 if (sub_filter) {
3627 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, sub_filter);
3628 }
3629
3630 return rc;
3631 }
3632
3633 static grn_rccxx . . $ grn_rc#
3634 selector_sub_filtercxx . . $ selector_sub_filter(2267fc2522c8e143).(grn_ctxcxx . . $ grn_ctx# *ctx,
3635 grn_objcxx . . $ grn_obj# *table,
3636 grn_objcxx . . $ grn_obj# *index,
3637 int nargs,
3638 grn_objcxx . . $ grn_obj# **args,
3639 grn_objcxx . . $ grn_obj# *res,
3640 grn_operatorcxx . . $ grn_operator# op)
3641 {
3642 return run_sub_filtercxx . . $ run_sub_filter(4f4d7c9d7ebf503c).(ctx, table, nargs - 1, args + 1, res, op);
3643 }
3644
3645 static grn_objcxx . . $ grn_obj# *
3646 func_html_untagcxx . . $ func_html_untag(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
3647 int nargs,
3648 grn_objcxx . . $ grn_obj# **args,
3649 grn_user_datacxx . . $ grn_user_data# *user_data)
3650 {
3651 grn_objcxx . . $ grn_obj# *html_arg;
3652 int html_arg_domain;
3653 grn_objcxx . . $ grn_obj# html;
3654 grn_objcxx . . $ grn_obj# *text;
3655 const char *html_raw;
3656 int i, length;
3657 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! in_tag = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3658
3659 if (nargs != 1) {
3660 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "HTML is missing");
3661 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3662 }
3663
3664 html_arg = args[0];
3665 html_arg_domain = html_arg->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
3666 switch (html_arg_domain) {
3667 case GRN_DB_SHORT_TEXTcxx . . $ GRN_DB_SHORT_TEXT.:
3668 case GRN_DB_TEXTcxx . . $ GRN_DB_TEXT.:
3669 case GRN_DB_LONG_TEXTcxx . . $ GRN_DB_LONG_TEXT.:
3670 GRN_VALUE_VAR_SIZE_INITcxx . . $ `include/groonga/groonga.h:2743:9`!(&html, GRN_OBJ_DO_SHALLOW_COPYcxx . . $ `include/groonga/groonga.h:2732:9`!, html_arg_domain);
3671 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, &html, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(html_arg), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(html_arg));
3672 break;
3673 default:
3674 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&html, 0);
3675 if (grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, html_arg, &html, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!)) {
3676 grn_objcxx . . $ grn_obj# inspected;
3677 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
3678 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, html_arg);
3679 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3680 "failed to cast to text: <%.*s>",
3681 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
3682 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
3683 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected);
3684 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &html);
3685 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3686 }
3687 break;
3688 }
3689
3690 text = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(html.header.domain, 0);
3691 if (!text) {
3692 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &html);
3693 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3694 }
3695
3696 html_raw = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&html);
3697 length = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&html);
3698 for (i = 0; i < length; i++) {
3699 switch (html_raw[i]) {
3700 case '<':
3701 in_tag = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
3702 break;
3703 case '>':
3704 if (in_tag) {
3705 in_tag = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3706 } else {
3707 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, text, html_raw[i]);
3708 }
3709 break;
3710 default:
3711 if (!in_tag) {
3712 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, text, html_raw[i]);
3713 }
3714 break;
3715 }
3716 }
3717
3718 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &html);
3719
3720 return text;
3721 }
3722
3723 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3724 grn_text_equal_cstrcxx . . $ grn_text_equal_cstr(9e798f95a6c8217f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *text, const char *cstr)
3725 {
3726 size_t cstr_len = strlencxx . . $ strlen(751346f8406fd082).(cstr);
3727 return (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(text) == cstr_len &&
3728 strncmpcxx . . $ strncmp(fd278af2f295fa2e).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(text), cstr, cstr_len) == 0);
3729 }
3730
3731 typedef enumcxx . . $ $anonymous_type_e488290b33a71771_0# {
3732 BETWEEN_BORDER_INVALIDcxx . . $ BETWEEN_BORDER_INVALID.,
3733 BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.,
3734 BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.
3735 } between_border_typecxx . . $ between_border_type#;
3736
3737 typedef structcxx . . $ $anonymous_type_e488290b33a71771_1# {
3738 grn_objcxx . . $ grn_obj# *valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.;
3739 grn_objcxx . . $ grn_obj# *mincxx . . $ $anonymous_type_e488290b33a71771_1#min.;
3740 grn_objcxx . . $ grn_obj# casted_mincxx . . $ $anonymous_type_e488290b33a71771_1#casted_min.;
3741 between_border_typecxx . . $ between_border_type# min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type.;
3742 grn_objcxx . . $ grn_obj# *maxcxx . . $ $anonymous_type_e488290b33a71771_1#max.;
3743 grn_objcxx . . $ grn_obj# casted_maxcxx . . $ $anonymous_type_e488290b33a71771_1#casted_max.;
3744 between_border_typecxx . . $ between_border_type# max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type.;
3745 int cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags.;
3746 double too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio.;
3747 const char *tagcxx . . $ $anonymous_type_e488290b33a71771_1#tag.;
3748 } between_datacxx . . $ between_data#;
3749
3750 static void
3751 between_data_initcxx . . $ between_data_init(a45420ef1d32f057).(grn_ctxcxx . . $ grn_ctx# *ctx, between_datacxx . . $ between_data# *data)
3752 {
3753 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&(data->casted_min));
3754 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&(data->casted_max));
3755 data->cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags. = 0;
3756 data->too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio. = grn_between_too_many_index_match_ratiocxx . . $ grn_between_too_many_index_match_ratio.;
3757 data->tagcxx . . $ $anonymous_type_e488290b33a71771_1#tag. = "[between]";
3758 }
3759
3760 static void
3761 between_data_fincxx . . $ between_data_fin(a45420ef1d32f057).(grn_ctxcxx . . $ grn_ctx# *ctx, between_datacxx . . $ between_data# *data)
3762 {
3763 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &(data->casted_min));
3764 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &(data->casted_max));
3765 }
3766
3767 static between_border_typecxx . . $ between_border_type#
3768 between_parse_bordercxx . . $ between_parse_border(2d9bbd7f30bc5d1e).(grn_ctxcxx . . $ grn_ctx# *ctx,
3769 grn_objcxx . . $ grn_obj# *border,
3770 const char *argument_description)
3771 {
3772 grn_objcxx . . $ grn_obj# inspected;
3773
3774 /* TODO: support other text types */
3775 if (border->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain. == GRN_DB_TEXTcxx . . $ GRN_DB_TEXT.) {
3776 if (grn_text_equal_cstrcxx . . $ grn_text_equal_cstr(9e798f95a6c8217f).(ctx, border, "include")) {
3777 return BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.;
3778 } else if (grn_text_equal_cstrcxx . . $ grn_text_equal_cstr(9e798f95a6c8217f).(ctx, border, "exclude")) {
3779 return BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.;
3780 }
3781 }
3782
3783 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected, 0);
3784 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected, border);
3785 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3786 "between(): %s must be \"include\" or \"exclude\": <%.*s>",
3787 argument_description,
3788 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected),
3789 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected));
3790 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, &inspected);
3791
3792 return BETWEEN_BORDER_INVALIDcxx . . $ BETWEEN_BORDER_INVALID.;
3793 }
3794
3795 static grn_rccxx . . $ grn_rc#
3796 between_castcxx . . $ between_cast(5c33b6c1938a319a).(grn_ctxcxx . . $ grn_ctx# *ctx,
3797 grn_objcxx . . $ grn_obj# *source,
3798 grn_objcxx . . $ grn_obj# *destination,
3799 grn_idcxx . . $ grn_id# domain,
3800 const char *target_argument_name)
3801 {
3802 grn_rccxx . . $ grn_rc# rc;
3803
3804 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(destination, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, domain);
3805 rc = grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, source, destination, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
3806 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3807 grn_objcxx . . $ grn_obj# inspected_source;
3808 grn_objcxx . . $ grn_obj# *domain_object = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
3809 char domain_name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!];
3810 int domain_name_length;
3811
3812 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected_source, 0);
3813 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected_source, source);
3814
3815 if (domain == GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
3816 grn_strcpycxx . . $ `include/groonga/portability.h:101:11`!(domain_name, sizeof(domain_name), "Void");
3817 domain_name_length = strlencxx . . $ strlen(751346f8406fd082).(domain_name);
3818 } else if (grn_type_id_is_builtincxx . . $ grn_type_id_is_builtin(a2a496425acc5b40).(ctx, domain)) {
3819 grn_strcpycxx . . $ `include/groonga/portability.h:101:11`!(domain_name,
3820 sizeof(domain_name),
3821 grn_type_id_to_string_builtin(ctx, domain));
3822 domain_name_length = strlencxx . . $ strlen(751346f8406fd082).(domain_name);
3823 } else {
3824 domain_object = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, domain);
3825 domain_name_length =
3826 grn_obj_namecxx . . $ grn_obj_name(a51d1bff955f2f21).(ctx, domain_object, domain_name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!);
3827 }
3828
3829 ERRcxx . . $ `lib/grn_error.h:156:9`!(rc,
3830 "between(): failed to cast %s: <%.*s> -> <%.*s>",
3831 target_argument_name,
3832 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected_source),
3833 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected_source),
3834 domain_name_length,
3835 domain_name);
3836
3837 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, &inspected_source);
3838 if (domain_object) {
3839 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, domain_object);
3840 }
3841 }
3842
3843 return rc;
3844 }
3845
3846 static void
3847 between_parse_optionscxx . . $ between_parse_options(5d2da156dc50da16).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *options, between_datacxx . . $ between_data# *data)
3848 {
3849 grn_proc_options_parsecxx . . $ grn_proc_options_parse(b3b87877968531ef).(ctx,
3850 options,
3851 data->tagcxx . . $ $anonymous_type_e488290b33a71771_1#tag.,
3852 "too_many_index_match_ratio",
3853 GRN_PROC_OPTION_VALUE_DOUBLEcxx . . $ GRN_PROC_OPTION_VALUE_DOUBLE.,
3854 &(data->too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio.),
3855 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
3856 }
3857
3858 static grn_rccxx . . $ grn_rc#
3859 between_parse_argscxx . . $ between_parse_args(a29dcc42b6c2527a).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, between_datacxx . . $ between_data# *data)
3860 {
3861 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
3862
3863 data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value. = args[0];
3864 data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min. = args[1];
3865 switch (nargs) {
3866 case 3:
3867 case 4:
3868 data->min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. = BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.;
3869 data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max. = args[2];
3870 data->max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. = BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.;
3871 if (nargs == 4) {
3872 between_parse_optionscxx . . $ between_parse_options(5d2da156dc50da16).(ctx, args[3], data);
3873 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3874 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3875 goto exit;
3876 }
3877 }
3878 break;
3879 case 5:
3880 case 6:
3881 data->min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. =
3882 between_parse_bordercxx . . $ between_parse_border(2d9bbd7f30bc5d1e).(ctx, args[2], "the 3rd argument (min_border)");
3883 if (data->min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. == BETWEEN_BORDER_INVALIDcxx . . $ BETWEEN_BORDER_INVALID.) {
3884 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3885 goto exit;
3886 }
3887 data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max. = args[3];
3888 data->max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. =
3889 between_parse_bordercxx . . $ between_parse_border(2d9bbd7f30bc5d1e).(ctx, args[4], "the 5th argument (max_border)");
3890 if (data->max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. == BETWEEN_BORDER_INVALIDcxx . . $ BETWEEN_BORDER_INVALID.) {
3891 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3892 goto exit;
3893 }
3894 if (nargs == 6) {
3895 between_parse_optionscxx . . $ between_parse_options(5d2da156dc50da16).(ctx, args[5], data);
3896 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3897 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3898 goto exit;
3899 }
3900 }
3901 break;
3902 default:
3903 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
3904 "between(): wrong number of arguments (%d for 3 or 5)",
3905 nargs);
3906 rc = ctx->rccxx . . $ _grn_ctx#rc.;
3907 goto exit;
3908 }
3909
3910 {
3911 grn_idcxx . . $ grn_id# value_type;
3912 switch (data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
3913 case GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!:
3914 case GRN_UVECTORcxx . . $ `include/groonga/groonga.h:875:9`!:
3915 value_type = data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
3916 break;
3917 case GRN_VECTORcxx . . $ `include/groonga/groonga.h:877:9`!:
3918 if (grn_vector_sizecxx . . $ grn_vector_size(8dd58acc9865e889).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.) == 0) {
3919 value_type = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!;
3920 } else {
3921 const char *element;
3922 grn_vector_get_elementcxx . . $ grn_vector_get_element(744613554bd9830c).(ctx,
3923 data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.,
3924 0,
3925 &element,
3926 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
3927 &value_type);
3928 }
3929 break;
3930 case GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!:
3931 {
3932 grn_objcxx . . $ grn_obj# *domain_object;
3933 domain_object = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
3934 value_type = domain_object->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
3935 }
3936 break;
3937 default:
3938 value_type = grn_obj_get_rangecxx . . $ grn_obj_get_range(8dd58acc9865e889).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.);
3939 break;
3940 }
3941 if (value_type != data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min.->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.) {
3942 rc = between_castcxx . . $ between_cast(5c33b6c1938a319a).(ctx, data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min., &data->casted_mincxx . . $ $anonymous_type_e488290b33a71771_1#casted_min., value_type, "min");
3943 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3944 goto exit;
3945 }
3946 data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min. = &(data->casted_mincxx . . $ $anonymous_type_e488290b33a71771_1#casted_min.);
3947 }
3948
3949 if (value_type != data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max.->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.) {
3950 rc = between_castcxx . . $ between_cast(5c33b6c1938a319a).(ctx, data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max., &data->casted_maxcxx . . $ $anonymous_type_e488290b33a71771_1#casted_max., value_type, "max");
3951 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3952 goto exit;
3953 }
3954 data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max. = &(data->casted_maxcxx . . $ $anonymous_type_e488290b33a71771_1#casted_max.);
3955 }
3956 }
3957
3958 exit:
3959 return rc;
3960 }
3961
3962 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
3963 between_create_expr_valuecxx . . $ between_create_expr_value(bdc40956da7aa613).(grn_ctxcxx . . $ grn_ctx# *ctx,
3964 grn_objcxx . . $ grn_obj# *table,
3965 between_datacxx . . $ between_data# *data,
3966 grn_objcxx . . $ grn_obj# *value,
3967 grn_objcxx . . $ grn_obj# *expr)
3968 {
3969 if (value->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!) {
3970 grn_expr_append_constcxx . . $ grn_expr_append_const(1a96b2046350ef54).(ctx, expr, value, GRN_OP_PUSHcxx . . $ GRN_OP_PUSH., 1);
3971 } else {
3972 grn_expr_append_objcxx . . $ grn_expr_append_obj(1a96b2046350ef54).(ctx, expr, value, GRN_OP_GET_VALUEcxx . . $ GRN_OP_GET_VALUE., 1);
3973 }
3974 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3975 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3976 }
3977 grn_expr_append_constcxx . . $ grn_expr_append_const(1a96b2046350ef54).(ctx, expr, data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min., GRN_OP_PUSHcxx . . $ GRN_OP_PUSH., 1);
3978 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3979 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3980 }
3981 if (data->min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. == BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.) {
3982 grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, expr, GRN_OP_GREATER_EQUALcxx . . $ GRN_OP_GREATER_EQUAL., 2);
3983 } else {
3984 grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, expr, GRN_OP_GREATERcxx . . $ GRN_OP_GREATER., 2);
3985 }
3986 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3987 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3988 }
3989
3990 if (value->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!) {
3991 grn_expr_append_constcxx . . $ grn_expr_append_const(1a96b2046350ef54).(ctx, expr, value, GRN_OP_PUSHcxx . . $ GRN_OP_PUSH., 1);
3992 } else {
3993 grn_expr_append_objcxx . . $ grn_expr_append_obj(1a96b2046350ef54).(ctx, expr, value, GRN_OP_GET_VALUEcxx . . $ GRN_OP_GET_VALUE., 1);
3994 }
3995 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
3996 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
3997 }
3998 grn_expr_append_constcxx . . $ grn_expr_append_const(1a96b2046350ef54).(ctx, expr, data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max., GRN_OP_PUSHcxx . . $ GRN_OP_PUSH., 1);
3999 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4000 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4001 }
4002 if (data->max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. == BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.) {
4003 grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, expr, GRN_OP_LESS_EQUALcxx . . $ GRN_OP_LESS_EQUAL., 2);
4004 } else {
4005 grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, expr, GRN_OP_LESScxx . . $ GRN_OP_LESS., 2);
4006 }
4007 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4008 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4009 }
4010
4011 grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, expr, GRN_OP_ANDcxx . . $ GRN_OP_AND., 2);
4012 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4013 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4014 }
4015
4016 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4017 }
4018
4019 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
4020 between_create_exprcxx . . $ between_create_expr(e1cc724ed3eecf49).(grn_ctxcxx . . $ grn_ctx# *ctx,
4021 grn_objcxx . . $ grn_obj# *table,
4022 between_datacxx . . $ between_data# *data,
4023 grn_objcxx . . $ grn_obj# **expr,
4024 grn_objcxx . . $ grn_obj# **variable)
4025 {
4026 GRN_EXPR_CREATE_FOR_QUERYcxx . . $ `include/groonga/expr.h:216:9`!(ctx, table, *expr, *variable);
4027 if (!*expr) {
4028 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4029 }
4030 if (!*variable) {
4031 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4032 }
4033
4034 if (data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_UVECTORcxx . . $ `include/groonga/groonga.h:875:9`!) {
4035 uint32_tcxx . . $ uint32_t# n = grn_uvector_sizecxx . . $ grn_uvector_size(8dd58acc9865e889).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.);
4036 uint32_tcxx . . $ uint32_t# element_size = grn_uvector_element_sizecxx . . $ grn_uvector_element_size(8dd58acc9865e889).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.);
4037 grn_objcxx . . $ grn_obj# element;
4038 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&element,
4039 GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!,
4040 GRN_OBJ_DO_SHALLOW_COPYcxx . . $ `include/groonga/groonga.h:2732:9`!,
4041 data->value->header.domain);
4042 for (uint32_tcxx . . $ uint32_t# i = 0; i < n; i++) {
4043 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx,
4044 &element,
4045 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(data->value) + (element_size * i),
4046 element_size);
4047 if (!between_create_expr_valuecxx . . $ between_create_expr_value(bdc40956da7aa613).(ctx, table, data, &element, *expr)) {
4048 break;
4049 }
4050 if (i > 0) {
4051 if (grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, *expr, GRN_OP_ORcxx . . $ GRN_OP_OR., 2) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4052 break;
4053 }
4054 }
4055 }
4056 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &element);
4057 return ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4058 } else if (data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_VECTORcxx . . $ `include/groonga/groonga.h:877:9`!) {
4059 grn_idcxx . . $ grn_id# target_domain = data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min.->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.;
4060 uint32_tcxx . . $ uint32_t# n = grn_vector_sizecxx . . $ grn_vector_size(8dd58acc9865e889).(ctx, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.);
4061 uint32_tcxx . . $ uint32_t# n_used_elements = 0;
4062 grn_objcxx . . $ grn_obj# element;
4063 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&element, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, GRN_OBJ_DO_SHALLOW_COPYcxx . . $ `include/groonga/groonga.h:2732:9`!, target_domain);
4064 for (uint32_tcxx . . $ uint32_t# i = 0; i < n; i++) {
4065 const char *raw_element;
4066 grn_idcxx . . $ grn_id# domain;
4067 uint32_tcxx . . $ uint32_t# size = grn_vector_get_elementcxx . . $ grn_vector_get_element(744613554bd9830c).(ctx,
4068 data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.,
4069 i,
4070 &raw_element,
4071 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4072 &domain);
4073 if (domain != target_domain) {
4074 continue;
4075 }
4076 GRN_TEXT_SETcxx . . $ `include/groonga/groonga.h:2761:9`!(ctx, &element, raw_element, size);
4077 if (!between_create_expr_valuecxx . . $ between_create_expr_value(bdc40956da7aa613).(ctx, table, data, &element, *expr)) {
4078 break;
4079 }
4080 if (n_used_elements > 0) {
4081 if (grn_expr_append_opcxx . . $ grn_expr_append_op(3b5ca24334c1be34).(ctx, *expr, GRN_OP_ORcxx . . $ GRN_OP_OR., 2) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4082 break;
4083 }
4084 }
4085 n_used_elements++;
4086 }
4087 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &element);
4088 return ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4089 } else {
4090 return between_create_expr_valuecxx . . $ between_create_expr_value(bdc40956da7aa613).(ctx, table, data, data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value., *expr);
4091 }
4092 }
4093
4094 static grn_objcxx . . $ grn_obj# *
4095 func_betweencxx . . $ func_between(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
4096 {
4097 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4098 grn_objcxx . . $ grn_obj# *found;
4099 between_datacxx . . $ between_data# data;
4100 grn_objcxx . . $ grn_obj# *condition = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4101 grn_objcxx . . $ grn_obj# *variable;
4102 grn_objcxx . . $ grn_obj# *table = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4103 grn_objcxx . . $ grn_obj# *between_expr;
4104 grn_objcxx . . $ grn_obj# *between_variable;
4105 grn_objcxx . . $ grn_obj# *result;
4106
4107 found = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0);
4108 if (!found) {
4109 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4110 }
4111 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, found, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
4112
4113 grn_proc_get_infocxx . . $ grn_proc_get_info(760bc9a52c80d02a).(ctx, user_data, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, &condition);
4114 if (!condition) {
4115 return found;
4116 }
4117
4118 variable = grn_expr_get_var_by_offsetcxx . . $ grn_expr_get_var_by_offset(fe791abc79590565).(ctx, condition, 0);
4119 if (!variable) {
4120 return found;
4121 }
4122
4123 between_data_initcxx . . $ between_data_init(a45420ef1d32f057).(ctx, &data);
4124 rc = between_parse_argscxx . . $ between_parse_args(a29dcc42b6c2527a).(ctx, nargs, args, &data);
4125 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4126 goto exit;
4127 }
4128
4129 table = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, variable->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
4130 if (!table) {
4131 goto exit;
4132 }
4133 if (!between_create_exprcxx . . $ between_create_expr(e1cc724ed3eecf49).(ctx,
4134 table,
4135 &data,
4136 &between_expr,
4137 &between_variable)) {
4138 goto exit;
4139 }
4140
4141 GRN_RECORD_SETcxx . . $ `include/groonga/groonga.h:2940:9`!(ctx, between_variable, GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(variable));
4142 result = grn_expr_execcxx . . $ grn_expr_exec(e5f715bd58cd6451).(ctx, between_expr, 0);
4143 if (grn_obj_is_truecxx . . $ grn_obj_is_true(a5760e5c319a06ee).(ctx, result)) {
4144 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, found, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
4145 }
4146
4147 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, between_expr);
4148
4149 exit:
4150 between_data_fincxx . . $ between_data_fin(a45420ef1d32f057).(ctx, &data);
4151 if (table) {
4152 grn_obj_unrefcxx . . $ grn_obj_unref(cda3a5f3c2e53c6b).(ctx, table);
4153 }
4154
4155 return found;
4156 }
4157
4158 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
4159 selector_between_sequential_search_should_usecxx . . $ selector_between_sequential_search_should_use(3d4b5de854d0e6b).(grn_ctxcxx . . $ grn_ctx# *ctx,
4160 grn_objcxx . . $ grn_obj# *table,
4161 grn_objcxx . . $ grn_obj# *index,
4162 grn_objcxx . . $ grn_obj# *index_table,
4163 between_datacxx . . $ between_data# *data,
4164 grn_objcxx . . $ grn_obj# *res,
4165 grn_operatorcxx . . $ grn_operator# op)
4166 {
4167 if (data->too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio. < 0.0) {
4168 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4169 }
4170
4171 if (op != GRN_OP_ANDcxx . . $ GRN_OP_AND.) {
4172 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4173 }
4174
4175 if (!index) {
4176 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4177 }
4178
4179 if (index->headercxx . . $ _grn_obj#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_WITH_WEIGHTcxx . . $ `include/groonga/groonga.h:785:9`!) {
4180 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4181 }
4182
4183 if (data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!) {
4184 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4185 }
4186
4187 grn_table_cursorcxx . . $ grn_table_cursor# *cursor = grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx,
4188 index_table,
4189 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(data->min),
4190 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(data->min),
4191 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(data->max),
4192 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(data->max),
4193 0,
4194 -1,
4195 data->cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags.);
4196 if (!cursor) {
4197 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4198 }
4199 uint32_tcxx . . $ uint32_t# estimated_size =
4200 grn_ii_estimate_size_for_lexicon_cursorcxx . . $ grn_ii_estimate_size_for_lexicon_cursor(3a6ce2d9371ba855).(ctx, (grn_iicxx . . $ grn_ii# *)index, cursor);
4201 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, cursor);
4202
4203 if (estimated_size == 0) {
4204 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4205 }
4206
4207 uint32_tcxx . . $ uint32_t# n_existing_records = grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, res);
4208 double too_many_index_match_threshold =
4209 (estimated_size * data->too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio.);
4210 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! use_sequential_search =
4211 (n_existing_records < too_many_index_match_threshold);
4212 if (use_sequential_search) {
4213 grn_objcxx . . $ grn_obj# reason;
4214 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&reason, 0);
4215 grn_text_printfcxx . . $ grn_text_printf(34596149d4dc0292).(ctx,
4216 &reason,
4217 "too many index match: "
4218 "%d < %f (%u * %f)",
4219 n_existing_records,
4220 too_many_index_match_threshold,
4221 estimated_size,
4222 data->too_many_index_match_ratiocxx . . $ $anonymous_type_e488290b33a71771_1#too_many_index_match_ratio.);
4223 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, &reason, '\0');
4224 grn_report_index_not_usedcxx . . $ grn_report_index_not_used(a1a7a0c1ad554d57).(ctx,
4225 data->tagcxx . . $ $anonymous_type_e488290b33a71771_1#tag.,
4226 "",
4227 index,
4228 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&reason));
4229 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &reason);
4230 }
4231 return use_sequential_search;
4232 }
4233
4234 static grn_rccxx . . $ grn_rc#
4235 selector_between_sequential_searchcxx . . $ selector_between_sequential_search(f035ea4bce6895e6).(grn_ctxcxx . . $ grn_ctx# *ctx,
4236 grn_objcxx . . $ grn_obj# *table,
4237 between_datacxx . . $ between_data# *data,
4238 grn_objcxx . . $ grn_obj# *res,
4239 grn_operatorcxx . . $ grn_operator# op)
4240 {
4241 {
4242 int offset = 0;
4243 int limit = -1;
4244 int flags = 0;
4245 grn_objcxx . . $ grn_obj# *target_table;
4246 grn_objcxx . . $ grn_obj# *target_column;
4247 grn_operator_exec_funccxx . . $ grn_operator_exec_func# *greater;
4248 grn_operator_exec_funccxx . . $ grn_operator_exec_func# *less;
4249 grn_table_cursorcxx . . $ grn_table_cursor# *cursor;
4250 grn_idcxx . . $ grn_id# id;
4251 grn_objcxx . . $ grn_obj# value;
4252
4253 if (op == GRN_OP_ANDcxx . . $ GRN_OP_AND.) {
4254 target_table = res;
4255 } else {
4256 target_table = table;
4257 }
4258 cursor = grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx,
4259 target_table,
4260 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4261 0,
4262 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4263 0,
4264 offset,
4265 limit,
4266 flags);
4267 if (!cursor) {
4268 return ctx->rccxx . . $ _grn_ctx#rc.;
4269 }
4270
4271 if (data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!) {
4272 target_column = grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx,
4273 table,
4274 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(data->value),
4275 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(data->value));
4276 } else {
4277 target_column = data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.;
4278 }
4279 if (data->min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. == BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.) {
4280 greater = grn_operator_exec_greater_equalcxx . . $ grn_operator_exec_greater_equal(14769dee86f6f375).;
4281 } else {
4282 greater = grn_operator_exec_greatercxx . . $ grn_operator_exec_greater(14769dee86f6f375).;
4283 }
4284 if (data->max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. == BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.) {
4285 less = grn_operator_exec_less_equalcxx . . $ grn_operator_exec_less_equal(14769dee86f6f375).;
4286 } else {
4287 less = grn_operator_exec_lesscxx . . $ grn_operator_exec_less(14769dee86f6f375).;
4288 }
4289
4290 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&value);
4291 while ((id = grn_table_cursor_nextcxx . . $ grn_table_cursor_next(8dd58acc9865e889).(ctx, cursor)) != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
4292 grn_idcxx . . $ grn_id# record_id;
4293
4294 if (target_table == res) {
4295 grn_idcxx . . $ grn_id# *key;
4296 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&key);
4297 record_id = *key;
4298 } else {
4299 record_id = id;
4300 }
4301
4302 GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&value);
4303 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, target_column, record_id, &value);
4304 if (greater(ctx, &value, data->mincxx . . $ $anonymous_type_e488290b33a71771_1#min.) && less(ctx, &value, data->maxcxx . . $ $anonymous_type_e488290b33a71771_1#max.)) {
4305 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
4306 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = record_id;
4307 posting.sidcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#sid. = 1;
4308 posting.poscxx . . $ $anonymous_type_fe7b80c5b60468ac_0#pos. = 0;
4309 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
4310 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
4311 (grn_postingcxx . . $ grn_posting# *)(&posting),
4312 (grn_hashcxx . . $ grn_hash# *)res,
4313 op);
4314 }
4315 }
4316
4317 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &value);
4318
4319 if (target_column != data->valuecxx . . $ $anonymous_type_e488290b33a71771_1#value. &&
4320 target_column->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_ACCESSORcxx . . $ `include/groonga/groonga.h:880:9`!) {
4321 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, target_column);
4322 }
4323
4324 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, cursor);
4325
4326 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
4327 }
4328
4329 return GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4330 }
4331
4332 static grn_rccxx . . $ grn_rc#
4333 selector_betweencxx . . $ selector_between(2267fc2522c8e143).(grn_ctxcxx . . $ grn_ctx# *ctx,
4334 grn_objcxx . . $ grn_obj# *table,
4335 grn_objcxx . . $ grn_obj# *index,
4336 int nargs,
4337 grn_objcxx . . $ grn_obj# **args,
4338 grn_objcxx . . $ grn_obj# *res,
4339 grn_operatorcxx . . $ grn_operator# op)
4340 {
4341 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4342 int offset = 0;
4343 int limit = -1;
4344 between_datacxx . . $ between_data# data;
4345 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! use_sequential_search;
4346 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! index_table_need_unref = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4347 grn_objcxx . . $ grn_obj# *index_table = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4348 grn_table_cursorcxx . . $ grn_table_cursor# *cursor;
4349
4350 between_data_initcxx . . $ between_data_init(a45420ef1d32f057).(ctx, &data);
4351 data.cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags. = GRN_CURSOR_ASCENDINGcxx . . $ `include/groonga/table.h:273:9`! | GRN_CURSOR_BY_KEYcxx . . $ `include/groonga/table.h:279:9`!;
4352 rc = between_parse_argscxx . . $ between_parse_args(a29dcc42b6c2527a).(ctx, nargs - 1, args + 1, &data);
4353 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4354 goto exit;
4355 }
4356
4357 if (data.min_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#min_border_type. == BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.) {
4358 data.cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags. |= GRN_CURSOR_GTcxx . . $ `include/groonga/table.h:276:9`!;
4359 }
4360 if (data.max_border_typecxx . . $ $anonymous_type_e488290b33a71771_1#max_border_type. == BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.) {
4361 data.cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags. |= GRN_CURSOR_LTcxx . . $ `include/groonga/table.h:278:9`!;
4362 }
4363
4364 if (data.valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_COLUMN_INDEXcxx . . $ `include/groonga/groonga.h:902:9`!) {
4365 index = data.valuecxx . . $ $anonymous_type_e488290b33a71771_1#value.;
4366 }
4367
4368 if (index) {
4369 switch (index->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
4370 case GRN_TABLE_NO_KEYcxx . . $ `include/groonga/groonga.h:898:9`!:
4371 case GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!:
4372 break;
4373 case GRN_TABLE_PAT_KEYcxx . . $ `include/groonga/groonga.h:896:9`!:
4374 case GRN_TABLE_DAT_KEYcxx . . $ `include/groonga/groonga.h:897:9`!:
4375 index_table = index;
4376 index = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4377 break;
4378 default:
4379 index_table = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, index->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
4380 if (index_table) {
4381 index_table_need_unref = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4382 }
4383 break;
4384 }
4385 }
4386
4387 if (index_table) {
4388 use_sequential_search =
4389 selector_between_sequential_search_should_usecxx . . $ selector_between_sequential_search_should_use(3d4b5de854d0e6b).(ctx,
4390 table,
4391 index,
4392 index_table,
4393 &data,
4394 res,
4395 op);
4396 } else {
4397 use_sequential_search = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4398 }
4399 if (use_sequential_search) {
4400 rc = selector_between_sequential_searchcxx . . $ selector_between_sequential_search(f035ea4bce6895e6).(ctx, table, &data, res, op);
4401 goto exit;
4402 }
4403
4404 cursor = grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx,
4405 index_table,
4406 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(data.min),
4407 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(data.min),
4408 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(data.max),
4409 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(data.max),
4410 offset,
4411 limit,
4412 data.cursor_flagscxx . . $ $anonymous_type_e488290b33a71771_1#cursor_flags.);
4413 if (!cursor) {
4414 rc = ctx->rccxx . . $ _grn_ctx#rc.;
4415 goto exit;
4416 }
4417
4418 if (index) {
4419 grn_objcxx . . $ grn_obj# *index_cursor =
4420 grn_index_cursor_opencxx . . $ grn_index_cursor_open(a3e8486abe83b7f2).(ctx, cursor, index, GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!, GRN_ID_MAXcxx . . $ `include/groonga/groonga.h:56:9`!, 0);
4421 if (index_cursor) {
4422 grn_result_set_add_index_cursorcxx . . $ grn_result_set_add_index_cursor(63f962fa8fd21495).(ctx,
4423 (grn_hashcxx . . $ grn_hash# *)res,
4424 index_cursor,
4425 1,
4426 1,
4427 op);
4428 grn_obj_closecxx . . $ grn_obj_close(4865d068a46d0f83).(ctx, index_cursor);
4429 }
4430 } else {
4431 grn_result_set_add_table_cursorcxx . . $ grn_result_set_add_table_cursor(b01ceb7524d76776).(ctx, (grn_hashcxx . . $ grn_hash# *)res, cursor, 1, op);
4432 }
4433 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
4434 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, cursor);
4435
4436 exit:
4437 between_data_fincxx . . $ between_data_fin(a45420ef1d32f057).(ctx, &data);
4438
4439 if (index_table_need_unref) {
4440 grn_obj_unrefcxx . . $ grn_obj_unref(cda3a5f3c2e53c6b).(ctx, index_table);
4441 }
4442
4443 return rc;
4444 }
4445
4446 static grn_objcxx . . $ grn_obj# *
4447 func_in_valuescxx . . $ func_in_values(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
4448 int nargs,
4449 grn_objcxx . . $ grn_obj# **args,
4450 grn_user_datacxx . . $ grn_user_data# *user_data)
4451 {
4452 grn_objcxx . . $ grn_obj# *found;
4453 grn_objcxx . . $ grn_obj# *target_value;
4454 int i;
4455
4456 found = GRN_PROC_ALLOCcxx . . $ `lib/grn_db.h:489:9`!(GRN_DB_BOOL, 0);
4457 if (!found) {
4458 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4459 }
4460 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, found, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
4461
4462 if (nargs < 1) {
4463 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4464 "in_values(): wrong number of arguments (%d for 1..)",
4465 nargs);
4466 return found;
4467 }
4468
4469 target_value = args[0];
4470 for (i = 1; i < nargs; i++) {
4471 grn_objcxx . . $ grn_obj# *value = args[i];
4472
4473 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! result = grn_operator_exec_equalcxx . . $ grn_operator_exec_equal(14769dee86f6f375).(ctx, target_value, value);
4474 if (ctx->rccxx . . $ _grn_ctx#rc.) {
4475 break;
4476 }
4477
4478 if (result) {
4479 GRN_BOOL_SETcxx . . $ `include/groonga/groonga.h:2879:9`!(ctx, found, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!);
4480 break;
4481 }
4482 }
4483
4484 return found;
4485 }
4486
4487 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
4488 is_reference_type_columncxx . . $ is_reference_type_column(a5760e5c319a06ee).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *column)
4489 {
4490 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! is_reference_type;
4491 grn_objcxx . . $ grn_obj# *range;
4492
4493 range = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, grn_obj_get_rangecxx . . $ grn_obj_get_range(8dd58acc9865e889).(ctx, column));
4494 switch (range->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
4495 case GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!:
4496 case GRN_TABLE_PAT_KEYcxx . . $ `include/groonga/groonga.h:896:9`!:
4497 case GRN_TABLE_DAT_KEYcxx . . $ `include/groonga/groonga.h:897:9`!:
4498 is_reference_type = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4499 break;
4500 default:
4501 is_reference_type = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4502 break;
4503 }
4504 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, range);
4505
4506 return is_reference_type;
4507 }
4508
4509 static grn_objcxx . . $ grn_obj# *
4510 selector_in_values_find_sourcecxx . . $ selector_in_values_find_source(88456f97fe0d41a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *index, grn_objcxx . . $ grn_obj# *res)
4511 {
4512 grn_idcxx . . $ grn_id# source_id = GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!;
4513 grn_objcxx . . $ grn_obj# source_ids;
4514 unsigned int n_source_ids;
4515
4516 GRN_UINT32_INITcxx . . $ `include/groonga/groonga.h:2854:9`!(&source_ids, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!);
4517 grn_obj_get_infocxx . . $ grn_obj_get_info(333a81d4a8f20670).(ctx, index, GRN_INFO_SOURCEcxx . . $ GRN_INFO_SOURCE., &source_ids);
4518 n_source_ids = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&source_ids) / sizeof(grn_idcxx . . $ grn_id#);
4519 if (n_source_ids == 1) {
4520 source_id = GRN_UINT32_VALUE_ATcxx . . $ `include/groonga/groonga.h:3136:9`!(&source_ids, 0);
4521 }
4522 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &source_ids);
4523
4524 if (source_id == GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
4525 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4526 } else {
4527 return grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, source_id);
4528 }
4529 }
4530
4531 static boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
4532 selector_in_values_sequential_searchcxx . . $ selector_in_values_sequential_search(b7f5f1517037377f).(grn_ctxcxx . . $ grn_ctx# *ctx,
4533 grn_objcxx . . $ grn_obj# *table,
4534 grn_objcxx . . $ grn_obj# *index,
4535 int n_values,
4536 grn_objcxx . . $ grn_obj# **values,
4537 grn_objcxx . . $ grn_obj# *res,
4538 grn_operatorcxx . . $ grn_operator# op,
4539 double too_many_index_match_ratio,
4540 const char *tag)
4541 {
4542 grn_objcxx . . $ grn_obj# *source;
4543 int n_existing_records;
4544
4545 if (too_many_index_match_ratio < 0.0) {
4546 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4547 }
4548
4549 if (op != GRN_OP_ANDcxx . . $ GRN_OP_AND.) {
4550 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4551 }
4552
4553 if (index->headercxx . . $ _grn_obj#header..flagscxx . . $ _grn_obj_header#flags. & GRN_OBJ_WITH_WEIGHTcxx . . $ `include/groonga/groonga.h:785:9`!) {
4554 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4555 }
4556
4557 n_existing_records = grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, res);
4558 if (n_existing_records == 0) {
4559 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4560 }
4561
4562 source = selector_in_values_find_sourcecxx . . $ selector_in_values_find_source(88456f97fe0d41a).(ctx, index, res);
4563 if (!source) {
4564 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4565 }
4566
4567 if (!is_reference_type_columncxx . . $ is_reference_type_column(a5760e5c319a06ee).(ctx, source)) {
4568 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, source);
4569 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4570 }
4571
4572 uint32_tcxx . . $ uint32_t# n_indexed_records = 0;
4573 {
4574 grn_objcxx . . $ grn_obj# value_ids;
4575 int i, n_value_ids;
4576
4577 {
4578 grn_idcxx . . $ grn_id# range_id;
4579 grn_objcxx . . $ grn_obj# *range;
4580
4581 range_id = grn_obj_get_rangecxx . . $ grn_obj_get_range(8dd58acc9865e889).(ctx, source);
4582 range = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, range_id);
4583 if (!range) {
4584 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, source);
4585 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4586 }
4587
4588 GRN_RECORD_INITcxx . . $ `include/groonga/groonga.h:2868:9`!(&value_ids, GRN_OBJ_VECTORcxx . . $ `include/groonga/groonga.h:2734:9`!, range_id);
4589 for (i = 0; i < n_values; i++) {
4590 grn_objcxx . . $ grn_obj# *value = values[i];
4591 grn_idcxx . . $ grn_id# value_id;
4592
4593 value_id =
4594 grn_table_getcxx . . $ grn_table_get(5676c91e20172100).(ctx, range, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(value), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(value));
4595 if (value_id == GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
4596 continue;
4597 }
4598 GRN_RECORD_PUTcxx . . $ `include/groonga/groonga.h:3213:9`!(ctx, &value_ids, value_id);
4599 }
4600 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, range);
4601 }
4602
4603 n_value_ids = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&value_ids) / sizeof(grn_idcxx . . $ grn_id#);
4604 for (i = 0; i < n_value_ids; i++) {
4605 grn_idcxx . . $ grn_id# value_id = GRN_RECORD_VALUE_ATcxx . . $ `include/groonga/groonga.h:3148:9`!(&value_ids, i);
4606 n_indexed_records += grn_ii_estimate_sizecxx . . $ grn_ii_estimate_size(7b27643ec855718c).(ctx, (grn_iicxx . . $ grn_ii# *)index, value_id);
4607 }
4608
4609 /*
4610 * Same as:
4611 * ((n_existing_record / n_indexed_records) >
4612 * grn_in_values_too_many_index_match_ratio)
4613 */
4614 if (n_existing_records > (n_indexed_records * too_many_index_match_ratio)) {
4615 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, &value_ids);
4616 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, source);
4617 return falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
4618 }
4619
4620 {
4621 grn_objcxx . . $ grn_obj# *accessor;
4622 char local_source_name[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!];
4623 int local_source_name_length;
4624
4625 local_source_name_length =
4626 grn_column_namecxx . . $ grn_column_name(a51d1bff955f2f21).(ctx, source, local_source_name, GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!);
4627 accessor =
4628 grn_obj_columncxx . . $ grn_obj_column(c00e49795c44129a).(ctx, res, local_source_name, local_source_name_length);
4629 {
4630 grn_table_cursorcxx . . $ grn_table_cursor# *cursor;
4631 grn_idcxx . . $ grn_id# id;
4632 grn_objcxx . . $ grn_obj# record_value;
4633
4634 GRN_VOID_INITcxx . . $ `include/groonga/groonga.h:2749:9`!(&record_value);
4635 cursor = grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx,
4636 res,
4637 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4638 0,
4639 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4640 0,
4641 0,
4642 -1,
4643 GRN_CURSOR_ASCENDINGcxx . . $ `include/groonga/table.h:273:9`!);
4644 while ((id = grn_table_cursor_nextcxx . . $ grn_table_cursor_next(8dd58acc9865e889).(ctx, cursor)) != GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!) {
4645 grn_idcxx . . $ grn_id# *record_id;
4646 grn_table_cursor_get_keycxx . . $ grn_table_cursor_get_key(7d620ebe94cee13a).(ctx, cursor, (void **)&record_id);
4647 GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&record_value);
4648 grn_obj_get_valuecxx . . $ grn_obj_get_value(6e06fec66698a6a).(ctx, accessor, id, &record_value);
4649 for (i = 0; i < n_value_ids; i++) {
4650 grn_idcxx . . $ grn_id# value_id = GRN_RECORD_VALUE_ATcxx . . $ `include/groonga/groonga.h:3148:9`!(&value_ids, i);
4651 switch (record_value.headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type.) {
4652 case GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!:
4653 if (value_id == GRN_RECORD_VALUEcxx . . $ `include/groonga/groonga.h:3110:9`!(&record_value)) {
4654 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
4655 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = *record_id;
4656 posting.sidcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#sid. = 1;
4657 posting.poscxx . . $ $anonymous_type_fe7b80c5b60468ac_0#pos. = 0;
4658 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
4659 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
4660 (grn_postingcxx . . $ grn_posting# *)(&posting),
4661 (grn_hashcxx . . $ grn_hash# *)res,
4662 op);
4663 }
4664 break;
4665 case GRN_UVECTORcxx . . $ `include/groonga/groonga.h:875:9`!:
4666 {
4667 int j, n_elements;
4668 n_elements = GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&record_value) / sizeof(grn_idcxx . . $ grn_id#);
4669 for (j = 0; j < n_elements; j++) {
4670 if (value_id == GRN_RECORD_VALUE_ATcxx . . $ `include/groonga/groonga.h:3148:9`!(&record_value, j)) {
4671 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
4672 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = *record_id;
4673 posting.sidcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#sid. = 1;
4674 posting.poscxx . . $ $anonymous_type_fe7b80c5b60468ac_0#pos. = 0;
4675 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
4676 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
4677 (grn_postingcxx . . $ grn_posting# *)(&posting),
4678 (grn_hashcxx . . $ grn_hash# *)res,
4679 op);
4680 }
4681 }
4682 }
4683 break;
4684 default:
4685 break;
4686 }
4687 }
4688 }
4689 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, cursor);
4690 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
4691 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &record_value);
4692 }
4693 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, accessor);
4694 }
4695 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, &value_ids);
4696 }
4697 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, source);
4698
4699 {
4700 grn_objcxx . . $ grn_obj# reason;
4701 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&reason, 0);
4702 grn_text_printfcxx . . $ grn_text_printf(34596149d4dc0292).(ctx,
4703 &reason,
4704 "too many index match: "
4705 "%d < %f (%u * %f)",
4706 n_existing_records,
4707 (n_indexed_records * too_many_index_match_ratio),
4708 n_indexed_records,
4709 too_many_index_match_ratio);
4710 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, &reason, '\0');
4711 grn_report_index_not_usedcxx . . $ grn_report_index_not_used(a1a7a0c1ad554d57).(ctx, tag, "", index, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&reason));
4712 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &reason);
4713 }
4714
4715 return truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
4716 }
4717
4718 static void
4719 in_values_parse_optionscxx . . $ in_values_parse_options(94e83aaaee2a815e).(grn_ctxcxx . . $ grn_ctx# *ctx,
4720 grn_objcxx . . $ grn_obj# *options,
4721 double *too_many_index_match_ratio,
4722 const char *tag)
4723 {
4724 grn_proc_options_parsecxx . . $ grn_proc_options_parse(b3b87877968531ef).(ctx,
4725 options,
4726 tag,
4727 "too_many_index_match_ratio",
4728 GRN_PROC_OPTION_VALUE_DOUBLEcxx . . $ GRN_PROC_OPTION_VALUE_DOUBLE.,
4729 too_many_index_match_ratio,
4730 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
4731 }
4732
4733 static grn_rccxx . . $ grn_rc#
4734 selector_in_valuescxx . . $ selector_in_values(2267fc2522c8e143).(grn_ctxcxx . . $ grn_ctx# *ctx,
4735 grn_objcxx . . $ grn_obj# *table,
4736 grn_objcxx . . $ grn_obj# *index,
4737 int nargs,
4738 grn_objcxx . . $ grn_obj# **args,
4739 grn_objcxx . . $ grn_obj# *res,
4740 grn_operatorcxx . . $ grn_operator# op)
4741 {
4742 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
4743 int i, n_values;
4744 grn_objcxx . . $ grn_obj# **values;
4745 double too_many_index_match_ratio = grn_in_values_too_many_index_match_ratiocxx . . $ grn_in_values_too_many_index_match_ratio.;
4746 const char *tag = "[in_values]";
4747
4748 if (!index) {
4749 return GRN_INVALID_ARGUMENTcxx . . $ GRN_INVALID_ARGUMENT.;
4750 }
4751
4752 if (nargs < 2) {
4753 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4754 "%s wrong number of arguments (%d for 1..)",
4755 tag,
4756 nargs);
4757 return ctx->rccxx . . $ _grn_ctx#rc.;
4758 }
4759
4760 n_values = nargs - 2;
4761 if (args[nargs - 1]->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. == GRN_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:895:9`!) {
4762 in_values_parse_optionscxx . . $ in_values_parse_options(94e83aaaee2a815e).(ctx,
4763 args[nargs - 1],
4764 &too_many_index_match_ratio,
4765 tag);
4766 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4767 return ctx->rccxx . . $ _grn_ctx#rc.;
4768 }
4769 n_values--;
4770 }
4771 values = args + 2;
4772
4773 if (n_values == 0) {
4774 return rc;
4775 }
4776
4777 if (selector_in_values_sequential_searchcxx . . $ selector_in_values_sequential_search(b7f5f1517037377f).(ctx,
4778 table,
4779 index,
4780 n_values,
4781 values,
4782 res,
4783 op,
4784 too_many_index_match_ratio,
4785 tag)) {
4786 return ctx->rccxx . . $ _grn_ctx#rc.;
4787 }
4788
4789 int original_flags = ctx->flagscxx . . $ _grn_ctx#flags.;
4790 ctx->flagscxx . . $ _grn_ctx#flags. |= GRN_CTX_TEMPORARY_DISABLE_II_RESOLVE_SEL_ANDcxx . . $ `lib/grn_ctx.h:86:9`!;
4791 for (i = 0; i < n_values; i++) {
4792 grn_objcxx . . $ grn_obj# *value = values[i];
4793 grn_search_optargcxx . . $ grn_search_optarg# search_options;
4794 memsetcxx . . $ memset(d1de1e4fb215f1c6).(&search_options, 0, sizeof(grn_search_optargcxx . . $ grn_search_optarg#));
4795 search_options.modecxx . . $ _grn_search_optarg#mode. = GRN_OP_EXACTcxx . . $ GRN_OP_EXACT.;
4796 search_options.similarity_thresholdcxx . . $ _grn_search_optarg#similarity_threshold. = 0;
4797 search_options.max_intervalcxx . . $ _grn_search_optarg#max_interval. = 0;
4798 search_options.additional_last_intervalcxx . . $ _grn_search_optarg#additional_last_interval. = 0;
4799 search_options.weight_vectorcxx . . $ _grn_search_optarg#weight_vector. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4800 search_options.vector_sizecxx . . $ _grn_search_optarg#vector_size. = 0;
4801 search_options.proccxx . . $ _grn_search_optarg#proc. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4802 search_options.max_sizecxx . . $ _grn_search_optarg#max_size. = 0;
4803 search_options.scorercxx . . $ _grn_search_optarg#scorer. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4804 search_options.query_optionscxx . . $ _grn_search_optarg#query_options. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4805 search_options.min_intervalcxx . . $ _grn_search_optarg#min_interval. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4806 search_options.start_positioncxx . . $ _grn_search_optarg#start_position. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4807 if (i == n_values - 1) {
4808 ctx->flagscxx . . $ _grn_ctx#flags. = original_flags;
4809 }
4810 rc = grn_obj_searchcxx . . $ grn_obj_search(a3553fe71ef945f4).(ctx, index, value, res, op, &search_options);
4811 if (rc != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4812 break;
4813 }
4814 }
4815
4816 return rc;
4817 }
4818
4819 static grn_objcxx . . $ grn_obj# *
4820 proc_range_filtercxx . . $ proc_range_filter(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
4821 int nargs,
4822 grn_objcxx . . $ grn_obj# **args,
4823 grn_user_datacxx . . $ grn_user_data# *user_data)
4824 {
4825 grn_objcxx . . $ grn_obj# *table_name = VARcxx . . $ `lib/proc.c:59:9`!(0);
4826 grn_objcxx . . $ grn_obj# *column_name = VARcxx . . $ `lib/proc.c:59:9`!(1);
4827 grn_objcxx . . $ grn_obj# *min = VARcxx . . $ `lib/proc.c:59:9`!(2);
4828 grn_objcxx . . $ grn_obj# *min_border = VARcxx . . $ `lib/proc.c:59:9`!(3);
4829 grn_objcxx . . $ grn_obj# *max = VARcxx . . $ `lib/proc.c:59:9`!(4);
4830 grn_objcxx . . $ grn_obj# *max_border = VARcxx . . $ `lib/proc.c:59:9`!(5);
4831 grn_objcxx . . $ grn_obj# *offset = VARcxx . . $ `lib/proc.c:59:9`!(6);
4832 grn_objcxx . . $ grn_obj# *limit = VARcxx . . $ `lib/proc.c:59:9`!(7);
4833 grn_objcxx . . $ grn_obj# *filter = VARcxx . . $ `lib/proc.c:59:9`!(8);
4834 grn_objcxx . . $ grn_obj# *output_columns = VARcxx . . $ `lib/proc.c:59:9`!(9);
4835 grn_objcxx . . $ grn_obj# *table;
4836 grn_objcxx . . $ grn_obj# *res = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4837 grn_objcxx . . $ grn_obj# *filter_expr = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4838 grn_objcxx . . $ grn_obj# *filter_variable = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4839 int real_offset;
4840 int real_limit;
4841
4842 table =
4843 grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name));
4844 if (!table) {
4845 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4846 "[range_filter] nonexistent table <%.*s>",
4847 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(table_name),
4848 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(table_name));
4849 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
4850 }
4851
4852 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter) > 0) {
4853 GRN_EXPR_CREATE_FOR_QUERYcxx . . $ `include/groonga/expr.h:216:9`!(ctx, table, filter_expr, filter_variable);
4854 if (!filter_expr) {
4855 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[range_filter] failed to create expression");
4856 goto exit;
4857 }
4858
4859 grn_expr_parsecxx . . $ grn_expr_parse(9934d963d400828).(ctx,
4860 filter_expr,
4861 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(filter),
4862 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(filter),
4863 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4864 GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.,
4865 GRN_OP_ANDcxx . . $ GRN_OP_AND.,
4866 GRN_EXPR_SYNTAX_SCRIPTcxx . . $ `include/groonga/expr.h:29:9`!);
4867 if (ctx->rccxx . . $ _grn_ctx#rc. != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4868 goto exit;
4869 }
4870 }
4871
4872 res = grn_table_createcxx . . $ grn_table_create(51df5019e8d3bdc1).(ctx,
4873 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4874 0,
4875 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
4876 GRN_OBJ_TABLE_HASH_KEYcxx . . $ `include/groonga/groonga.h:688:9`! | GRN_OBJ_WITH_SUBRECcxx . . $ `include/groonga/groonga.h:812:9`!,
4877 table,
4878 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
4879 if (!res) {
4880 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[range_filter] failed to result table");
4881 goto exit;
4882 }
4883
4884 {
4885 grn_objcxx . . $ grn_obj# int32_value;
4886
4887 GRN_INT32_INITcxx . . $ `include/groonga/groonga.h:2852:9`!(&int32_value, 0);
4888
4889 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(offset) > 0) {
4890 if (grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, offset, &int32_value, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4891 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4892 "[range_filter] invalid offset format: <%.*s>",
4893 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(offset),
4894 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(offset));
4895 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &int32_value);
4896 goto exit;
4897 }
4898 real_offset = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(&int32_value);
4899 } else {
4900 real_offset = 0;
4901 }
4902
4903 GRN_BULK_REWINDcxx . . $ `include/groonga/groonga.h:2599:9`!(&int32_value);
4904
4905 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(limit) > 0) {
4906 if (grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, limit, &int32_value, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!) != GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
4907 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4908 "[range_filter] invalid limit format: <%.*s>",
4909 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(limit),
4910 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(limit));
4911 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &int32_value);
4912 goto exit;
4913 }
4914 real_limit = GRN_INT32_VALUEcxx . . $ `include/groonga/groonga.h:3102:9`!(&int32_value);
4915 } else {
4916 real_limit = GRN_SELECT_DEFAULT_LIMITcxx . . $ `lib/grn_proc.h:28:9`!;
4917 }
4918
4919 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &int32_value);
4920 }
4921 {
4922 grn_rccxx . . $ grn_rc# rc;
4923 int original_offset = real_offset;
4924 int original_limit = real_limit;
4925 rc = grn_output_range_normalizecxx . . $ grn_output_range_normalize(6acf1ea4c3517c62).(ctx,
4926 grn_table_sizecxx . . $ grn_table_size(8dd58acc9865e889).(ctx, table),
4927 &real_offset,
4928 &real_limit);
4929 switch (rc) {
4930 case GRN_TOO_SMALL_OFFSETcxx . . $ GRN_TOO_SMALL_OFFSET.:
4931 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4932 "[range_filter] too small offset: <%d>",
4933 original_offset);
4934 goto exit;
4935 case GRN_TOO_LARGE_OFFSETcxx . . $ GRN_TOO_LARGE_OFFSET.:
4936 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4937 "[range_filter] too large offset: <%d>",
4938 original_offset);
4939 goto exit;
4940 case GRN_TOO_SMALL_LIMITcxx . . $ GRN_TOO_SMALL_LIMIT.:
4941 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
4942 "[range_filter] too small limit: <%d>",
4943 original_limit);
4944 goto exit;
4945 default:
4946 break;
4947 }
4948 }
4949
4950 if (real_limit != 0) {
4951 grn_table_sort_keycxx . . $ grn_table_sort_key# *sort_keys;
4952 unsigned int n_sort_keys;
4953 sort_keys = grn_table_sort_key_from_strcxx . . $ grn_table_sort_key_from_str(c082f89069393e1).(ctx,
4954 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(column_name),
4955 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(column_name),
4956 table,
4957 &n_sort_keys);
4958 if (n_sort_keys == 1) {
4959 grn_table_sort_keycxx . . $ grn_table_sort_key# *sort_key;
4960 grn_objcxx . . $ grn_obj# *index;
4961 int n_indexes;
4962 grn_operatorcxx . . $ grn_operator# op = GRN_OP_ORcxx . . $ GRN_OP_OR.;
4963
4964 sort_key = &(sort_keys[0]);
4965 n_indexes =
4966 grn_column_indexcxx . . $ grn_column_index(9c241c95d0832080).(ctx, sort_key->keycxx . . $ _grn_table_sort_key#key., GRN_OP_LESScxx . . $ GRN_OP_LESS., &index, 1, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
4967 if (n_indexes > 0) {
4968 grn_objcxx . . $ grn_obj# *lexicon;
4969 grn_table_cursorcxx . . $ grn_table_cursor# *table_cursor;
4970 int table_cursor_flags = 0;
4971 between_border_typecxx . . $ between_border_type# min_border_type;
4972 between_border_typecxx . . $ between_border_type# max_border_type;
4973 grn_objcxx . . $ grn_obj# real_min;
4974 grn_objcxx . . $ grn_obj# real_max;
4975 int n_records = 0;
4976 grn_objcxx . . $ grn_obj# *index_cursor;
4977 int index_cursor_flags = 0;
4978 grn_postingcxx . . $ grn_posting# *posting;
4979
4980 lexicon = grn_ctx_atcxx . . $ grn_ctx_at(ac4544c8400954c9).(ctx, index->headercxx . . $ _grn_obj#header..domaincxx . . $ _grn_obj_header#domain.);
4981 if (sort_key->flagscxx . . $ _grn_table_sort_key#flags. & GRN_TABLE_SORT_DESCcxx . . $ `include/groonga/table.h:683:9`!) {
4982 table_cursor_flags |= GRN_CURSOR_DESCENDINGcxx . . $ `include/groonga/table.h:274:9`!;
4983 } else {
4984 table_cursor_flags |= GRN_CURSOR_ASCENDINGcxx . . $ `include/groonga/table.h:273:9`!;
4985 }
4986 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(min_border) > 0) {
4987 min_border_type = between_parse_bordercxx . . $ between_parse_border(2d9bbd7f30bc5d1e).(ctx, min_border, "min_border");
4988 } else {
4989 min_border_type = BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.;
4990 }
4991 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(max_border) > 0) {
4992 max_border_type = between_parse_bordercxx . . $ between_parse_border(2d9bbd7f30bc5d1e).(ctx, max_border, "max_border");
4993 } else {
4994 max_border_type = BETWEEN_BORDER_INCLUDEcxx . . $ BETWEEN_BORDER_INCLUDE.;
4995 }
4996 if (min_border_type == BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.) {
4997 table_cursor_flags |= GRN_CURSOR_GTcxx . . $ `include/groonga/table.h:276:9`!;
4998 }
4999 if (max_border_type == BETWEEN_BORDER_EXCLUDEcxx . . $ BETWEEN_BORDER_EXCLUDE.) {
5000 table_cursor_flags |= GRN_CURSOR_LTcxx . . $ `include/groonga/table.h:278:9`!;
5001 }
5002 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&real_min, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, lexicon->header.domain);
5003 GRN_OBJ_INITcxx . . $ `include/groonga/groonga.h:947:9`!(&real_max, GRN_BULKcxx . . $ `include/groonga/groonga.h:868:9`!, 0, lexicon->header.domain);
5004 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(min) > 0) {
5005 grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, min, &real_min, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5006 }
5007 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(max) > 0) {
5008 grn_obj_castcxx . . $ grn_obj_cast(a6fd93da1614eccd).(ctx, max, &real_max, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5009 }
5010 table_cursor = grn_table_cursor_opencxx . . $ grn_table_cursor_open(a4cddc3087c69e91).(ctx,
5011 lexicon,
5012 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(&real_min),
5013 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&real_min),
5014 GRN_BULK_HEADcxx . . $ `include/groonga/groonga.h:2648:9`!(&real_max),
5015 GRN_BULK_VSIZEcxx . . $ `include/groonga/groonga.h:2642:9`!(&real_max),
5016 0,
5017 -1,
5018 table_cursor_flags);
5019 index_cursor = grn_index_cursor_opencxx . . $ grn_index_cursor_open(a3e8486abe83b7f2).(ctx,
5020 table_cursor,
5021 index,
5022 GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!,
5023 GRN_ID_NILcxx . . $ `include/groonga/groonga.h:55:9`!,
5024 index_cursor_flags);
5025 while ((posting = grn_index_cursor_nextcxx . . $ grn_index_cursor_next(3cab7613c03ebc21).(ctx, index_cursor, NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!))) {
5026 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! result_boolean = falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!;
5027
5028 if (filter_expr) {
5029 grn_objcxx . . $ grn_obj# *result;
5030 GRN_RECORD_SETcxx . . $ `include/groonga/groonga.h:2940:9`!(ctx, filter_variable, posting->rid);
5031 result = grn_expr_execcxx . . $ grn_expr_exec(e5f715bd58cd6451).(ctx, filter_expr, 0);
5032 if (ctx->rccxx . . $ _grn_ctx#rc.) {
5033 break;
5034 }
5035 result_boolean = grn_obj_is_truecxx . . $ grn_obj_is_true(a5760e5c319a06ee).(ctx, result);
5036 } else {
5037 result_boolean = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!;
5038 }
5039
5040 if (result_boolean) {
5041 if (n_records >= real_offset) {
5042 grn_posting_internalcxx . . $ grn_posting_internal# add_posting =
5043 *((grn_posting_internalcxx . . $ grn_posting_internal# *)posting);
5044 add_posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. += 1;
5045 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
5046 (grn_postingcxx . . $ grn_posting# *)(&add_posting),
5047 (grn_hashcxx . . $ grn_hash# *)res,
5048 op);
5049 }
5050 n_records++;
5051 if (n_records == real_limit) {
5052 break;
5053 }
5054 }
5055 }
5056 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, index_cursor);
5057 grn_table_cursor_closecxx . . $ grn_table_cursor_close(4865d068a46d0f83).(ctx, table_cursor);
5058
5059 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &real_min);
5060 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &real_max);
5061 }
5062 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
5063 }
5064 grn_table_sort_key_closecxx . . $ grn_table_sort_key_close(8df3388dd23e4974).(ctx, sort_keys, n_sort_keys);
5065 }
5066
5067 if (ctx->rccxx . . $ _grn_ctx#rc. == GRN_SUCCESScxx . . $ GRN_SUCCESS.) {
5068 const char *raw_output_columns;
5069 int raw_output_columns_len;
5070
5071 raw_output_columns = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(output_columns);
5072 raw_output_columns_len = GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(output_columns);
5073 if (raw_output_columns_len == 0) {
5074 if (grn_obj_is_table_with_keycxx . . $ grn_obj_is_table_with_key(a5760e5c319a06ee).(ctx, table)) {
5075 raw_output_columns = GRN_SELECT_DEFAULT_OUTPUT_COLUMNS_FOR_WITH_KEYcxx . . $ `lib/grn_proc.h:30:9`!;
5076 } else {
5077 raw_output_columns = GRN_SELECT_DEFAULT_OUTPUT_COLUMNS_FOR_NO_KEYcxx . . $ `lib/grn_proc.h:29:9`!;
5078 }
5079 raw_output_columns_len = strlencxx . . $ strlen(751346f8406fd082).(raw_output_columns);
5080 }
5081 grn_proc_select_output_columnscxx . . $ grn_proc_select_output_columns(73961298fc851148).(ctx,
5082 res,
5083 -1,
5084 real_offset,
5085 real_limit,
5086 raw_output_columns,
5087 raw_output_columns_len,
5088 filter_expr);
5089 }
5090
5091 exit:
5092 if (filter_expr) {
5093 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, filter_expr);
5094 }
5095 if (res) {
5096 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, res);
5097 }
5098
5099 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5100 }
5101
5102 static grn_objcxx . . $ grn_obj# *
5103 proc_request_cancelcxx . . $ proc_request_cancel(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
5104 int nargs,
5105 grn_objcxx . . $ grn_obj# **args,
5106 grn_user_datacxx . . $ grn_user_data# *user_data)
5107 {
5108 grn_objcxx . . $ grn_obj# *id = VARcxx . . $ `lib/proc.c:59:9`!(0);
5109 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! canceled;
5110
5111 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id) == 0) {
5112 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[request_cancel] ID is missing");
5113 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5114 }
5115
5116 canceled = grn_request_canceler_cancelcxx . . $ grn_request_canceler_cancel(8d229d683d6d7295).(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id));
5117
5118 GRN_OUTPUT_MAP_OPENcxx . . $ `lib/grn_output.h:96:9`!("result", 2);
5119 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("id");
5120 GRN_OUTPUT_STRcxx . . $ `lib/grn_output.h:106:9`!(GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(id), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(id));
5121 GRN_OUTPUT_CSTRcxx . . $ `lib/grn_output.h:105:9`!("canceled");
5122 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(canceled);
5123 GRN_OUTPUT_MAP_CLOSEcxx . . $ `lib/grn_output.h:98:9`!();
5124
5125 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5126 }
5127
5128 static grn_objcxx . . $ grn_obj# *
5129 proc_plugin_registercxx . . $ proc_plugin_register(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
5130 int nargs,
5131 grn_objcxx . . $ grn_obj# **args,
5132 grn_user_datacxx . . $ grn_user_data# *user_data)
5133 {
5134 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0))) {
5135 const char *name;
5136 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, VARcxx . . $ `lib/proc.c:59:9`!(0), '\0');
5137 name = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
5138 grn_plugin_registercxx . . $ grn_plugin_register(cae1c943be750b4c).(ctx, name);
5139 } else {
5140 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[plugin_register] name is missing");
5141 }
5142 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
5143 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5144 }
5145
5146 static grn_objcxx . . $ grn_obj# *
5147 proc_plugin_unregistercxx . . $ proc_plugin_unregister(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
5148 int nargs,
5149 grn_objcxx . . $ grn_obj# **args,
5150 grn_user_datacxx . . $ grn_user_data# *user_data)
5151 {
5152 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0))) {
5153 const char *name;
5154 GRN_TEXT_PUTCcxx . . $ `include/groonga/groonga.h:2775:9`!(ctx, VARcxx . . $ `lib/proc.c:59:9`!(0), '\0');
5155 name = GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(VARcxx . . $ `lib/proc.c:59:9`!(0));
5156 grn_plugin_unregistercxx . . $ grn_plugin_unregister(cae1c943be750b4c).(ctx, name);
5157 } else {
5158 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT, "[plugin_unregister] name is missing");
5159 }
5160 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(!ctx->rc);
5161 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5162 }
5163
5164 static grn_objcxx . . $ grn_obj# *
5165 proc_io_flushcxx . . $ proc_io_flush(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
5166 {
5167 grn_objcxx . . $ grn_obj# *db = grn_ctx_dbcxx . . $ grn_ctx_db(ddec8e3b1327ceae).(ctx);
5168
5169 grn_raw_stringcxx . . $ grn_raw_string# target_name;
5170 target_name.valuecxx . . $ $anonymous_type_7f733dd816802915_0#value. = grn_plugin_proc_get_var_stringcxx . . $ grn_plugin_proc_get_var_string(b6763965d55cfbc).(ctx,
5171 user_data,
5172 "target_name",
5173 -1,
5174 &(target_name.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.));
5175 grn_objcxx . . $ grn_obj# *target;
5176 if (target_name.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length. > 0) {
5177 target = grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, target_name.valuecxx . . $ $anonymous_type_7f733dd816802915_0#value., target_name.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.);
5178 if (!target) {
5179 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
5180 "[io_flush] unknown target: <%.*s>",
5181 (int)target_name.length,
5182 target_name.value);
5183 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5184 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5185 }
5186 } else {
5187 target = db;
5188 }
5189
5190 grn_raw_stringcxx . . $ grn_raw_string# recursive;
5191 recursive.valuecxx . . $ $anonymous_type_7f733dd816802915_0#value. = grn_plugin_proc_get_var_stringcxx . . $ grn_plugin_proc_get_var_string(b6763965d55cfbc).(ctx,
5192 user_data,
5193 "recursive",
5194 -1,
5195 &(recursive.lengthcxx . . $ $anonymous_type_7f733dd816802915_0#length.));
5196 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! is_only_opened =
5197 grn_plugin_proc_get_var_boolcxx . . $ grn_plugin_proc_get_var_bool(544c966dc918f81a).(ctx, user_data, "only_opened", -1, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5198 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
5199 if (is_only_opened) {
5200 rc = grn_obj_flush_only_openedcxx . . $ grn_obj_flush_only_opened(4865d068a46d0f83).(ctx, target);
5201 } else {
5202 if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(recursive, "dependent")) {
5203 rc = grn_obj_flush_recursive_dependentcxx . . $ grn_obj_flush_recursive_dependent(4865d068a46d0f83).(ctx, target);
5204 } else if (GRN_RAW_STRING_EQUAL_CSTRINGcxx . . $ `include/groonga/raw_string.h:57:9`!(recursive, "no")) {
5205 rc = grn_obj_flushcxx . . $ grn_obj_flush(4865d068a46d0f83).(ctx, target);
5206 } else {
5207 rc = grn_obj_flush_recursivecxx . . $ grn_obj_flush_recursive(4865d068a46d0f83).(ctx, target);
5208 }
5209 }
5210
5211 if (target->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. != GRN_DBcxx . . $ `include/groonga/groonga.h:899:9`!) {
5212 grn_obj_unlinkcxx . . $ grn_obj_unlink(4865d068a46d0f83).(ctx, target);
5213 }
5214
5215 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(rc == GRN_SUCCESS);
5216
5217 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5218 }
5219
5220 static grn_objcxx . . $ grn_obj# *
5221 proc_database_unmapcxx . . $ proc_database_unmap(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx,
5222 int nargs,
5223 grn_objcxx . . $ grn_obj# **args,
5224 grn_user_datacxx . . $ grn_user_data# *user_data)
5225 {
5226 grn_rccxx . . $ grn_rc# rc;
5227 uint32_tcxx . . $ uint32_t# current_limit;
5228
5229 current_limit = grn_thread_get_limit_with_ctxcxx . . $ grn_thread_get_limit_with_ctx(42892115b099e3b9).(ctx);
5230 if (current_limit != 1) {
5231 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_OPERATION_NOT_PERMITTED,
5232 "[database_unmap] the max number of threads must be 1: <%u>",
5233 current_limit);
5234 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5235 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5236 }
5237
5238 rc = grn_db_unmapcxx . . $ grn_db_unmap(4865d068a46d0f83).(ctx, grn_ctx_dbcxx . . $ grn_ctx_db(ddec8e3b1327ceae).(ctx));
5239 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(rc == GRN_SUCCESS);
5240
5241 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5242 }
5243
5244 static grn_objcxx . . $ grn_obj# *
5245 proc_reindexcxx . . $ proc_reindex(fd082858389c8bb0).(grn_ctxcxx . . $ grn_ctx# *ctx, int nargs, grn_objcxx . . $ grn_obj# **args, grn_user_datacxx . . $ grn_user_data# *user_data)
5246 {
5247 grn_objcxx . . $ grn_obj# *target_name;
5248 grn_objcxx . . $ grn_obj# *target;
5249
5250 target_name = VARcxx . . $ `lib/proc.c:59:9`!(0);
5251 if (GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(target_name) == 0) {
5252 target = grn_ctx_dbcxx . . $ grn_ctx_db(ddec8e3b1327ceae).(ctx);
5253 } else {
5254 target =
5255 grn_ctx_getcxx . . $ grn_ctx_get(70fde0087014f9ea).(ctx, GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(target_name), GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(target_name));
5256 if (!target) {
5257 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
5258 "[reindex] nonexistent target: <%.*s>",
5259 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(target_name),
5260 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(target_name));
5261 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5262 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5263 }
5264 }
5265
5266 grn_obj_reindexcxx . . $ grn_obj_reindex(4865d068a46d0f83).(ctx, target);
5267
5268 GRN_OUTPUT_BOOLcxx . . $ `lib/grn_output.h:108:9`!(ctx->rc == GRN_SUCCESS);
5269
5270 return NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
5271 }
5272
5273 static grn_rccxx . . $ grn_rc#
5274 selector_prefix_rk_search_keycxx . . $ selector_prefix_rk_search_key(44f9f3eeace98db2).(
5275 grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *table, grn_objcxx . . $ grn_obj# *query, grn_objcxx . . $ grn_obj# *res, grn_operatorcxx . . $ grn_operator# op)
5276 {
5277 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
5278
5279 if (table->headercxx . . $ _grn_obj#header..typecxx . . $ _grn_obj_header#type. != GRN_TABLE_PAT_KEYcxx . . $ `include/groonga/groonga.h:896:9`!) {
5280 grn_objcxx . . $ grn_obj# inspected_table;
5281 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&inspected_table, 0);
5282 grn_inspectcxx . . $ grn_inspect(88456f97fe0d41a).(ctx, &inspected_table, table);
5283 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
5284 "prefix_rk_serach(): table of _key must TABLE_PAT_KEY: %.*s",
5285 (int)GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(&inspected_table),
5286 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(&inspected_table));
5287 rc = ctx->rccxx . . $ _grn_ctx#rc.;
5288 GRN_OBJ_FINcxx . . $ `include/groonga/groonga.h:958:9`!(ctx, &inspected_table);
5289 goto exit;
5290 }
5291
5292 GRN_TABLE_EACH_BEGIN_MINcxx . . $ `include/groonga/table.h:648:9`!(ctx,
5293 table,
5294 cursor,
5295 id,
5296 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(query),
5297 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(query),
5298 GRN_CURSOR_PREFIXcxx . . $ `include/groonga/table.h:281:9`! | GRN_CURSOR_RKcxx . . $ `include/groonga/table.h:283:9`!)
5299 {
5300 grn_posting_internalcxx . . $ grn_posting_internal# posting = {0};
5301 posting.ridcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#rid. = id;
5302 posting.sidcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#sid. = 1;
5303 posting.poscxx . . $ $anonymous_type_fe7b80c5b60468ac_0#pos. = 0;
5304 posting.weight_floatcxx . . $ $anonymous_type_fe7b80c5b60468ac_0#weight_float. = 1;
5305 grn_ii_posting_add_floatcxx . . $ grn_ii_posting_add_float(62be95d159451db1).(ctx,
5306 (grn_postingcxx . . $ grn_posting# *)(&posting),
5307 (grn_hashcxx . . $ grn_hash# *)res,
5308 op);
5309 }
5310 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
5311 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
5312
5313 exit:
5314 return rc;
5315 }
5316
5317 static grn_rccxx . . $ grn_rc#
5318 selector_prefix_rk_search_indexcxx . . $ selector_prefix_rk_search_index(44f9f3eeace98db2).(
5319 grn_ctxcxx . . $ grn_ctx# *ctx, grn_objcxx . . $ grn_obj# *index, grn_objcxx . . $ grn_obj# *query, grn_objcxx . . $ grn_obj# *res, grn_operatorcxx . . $ grn_operator# op)
5320 {
5321 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
5322 grn_objcxx . . $ grn_obj# *table;
5323
5324 table = grn_column_tablecxx . . $ grn_column_table(e9f40e4080908c1e).(ctx, index);
5325
5326 GRN_TABLE_EACH_BEGIN_MINcxx . . $ `include/groonga/table.h:648:9`!(ctx,
5327 table,
5328 cursor,
5329 id,
5330 GRN_TEXT_VALUEcxx . . $ `include/groonga/groonga.h:2785:9`!(query),
5331 GRN_TEXT_LENcxx . . $ `include/groonga/groonga.h:2786:9`!(query),
5332 GRN_CURSOR_PREFIXcxx . . $ `include/groonga/table.h:281:9`! | GRN_CURSOR_RKcxx . . $ `include/groonga/table.h:283:9`!)
5333 {
5334 grn_ii_atcxx . . $ grn_ii_at(c699eb785099329f).(ctx, (grn_iicxx . . $ grn_ii# *)index, id, (grn_hashcxx . . $ grn_hash# *)res, op);
5335 }
5336 GRN_TABLE_EACH_ENDcxx . . $ `include/groonga/table.h:665:9`!(ctx, cursor);
5337 grn_ii_resolve_sel_andcxx . . $ grn_ii_resolve_sel_and(8582dd5db79648f2).(ctx, (grn_hashcxx . . $ grn_hash# *)res, op);
5338
5339 return rc;
5340 }
5341
5342 static grn_rccxx . . $ grn_rc#
5343 selector_prefix_rk_searchcxx . . $ selector_prefix_rk_search(2267fc2522c8e143).(grn_ctxcxx . . $ grn_ctx# *ctx,
5344 grn_objcxx . . $ grn_obj# *table,
5345 grn_objcxx . . $ grn_obj# *index,
5346 int nargs,
5347 grn_objcxx . . $ grn_obj# **args,
5348 grn_objcxx . . $ grn_obj# *res,
5349 grn_operatorcxx . . $ grn_operator# op)
5350 {
5351 grn_rccxx . . $ grn_rc# rc = GRN_SUCCESScxx . . $ GRN_SUCCESS.;
5352 grn_objcxx . . $ grn_obj# *column;
5353 grn_objcxx . . $ grn_obj# *query;
5354
5355 if ((nargs - 1) != 2) {
5356 ERRcxx . . $ `lib/grn_error.h:156:9`!(GRN_INVALID_ARGUMENT,
5357 "prefix_rk_serach(): wrong number of arguments (%d for 2)",
5358 nargs - 1);
5359 return ctx->rccxx . . $ _grn_ctx#rc.;
5360 }
5361
5362 column = args[1];
5363 query = args[2];
5364
5365 if (grn_obj_is_tablecxx . . $ grn_obj_is_table(a5760e5c319a06ee).(ctx, index)) {
5366 rc = selector_prefix_rk_search_keycxx . . $ selector_prefix_rk_search_key(44f9f3eeace98db2).(ctx, index, query, res, op);
5367 } else {
5368 rc = selector_prefix_rk_search_indexcxx . . $ selector_prefix_rk_search_index(44f9f3eeace98db2).(ctx, index, query, res, op);
5369 }
5370 return rc;
5371 }
5372
5373 #define DEF_VARcxx . . $ `lib/proc.c:5373:9`!(v, name_str) \
5374 do { \
5375 (v).name = (name_str); \
5376 (v).name_size = GRN_STRLENcxx . . $ `lib/proc.c:949:9`!(name_str); \
5377 GRN_TEXT_INITcxx . . $ `include/groonga/groonga.h:2750:9`!(&(v).value, 0); \
5378 } while (0)
5379
5380 #define DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!(name, func, nvars, vars) \
5381 (grn_proc_create(ctx, \
5382 (name), \
5383 (sizeof(name) - 1), \
5384 GRN_PROC_COMMAND, \
5385 (func), \
5386 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, \
5387 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, \
5388 (nvars), \
5389 (vars)))
5390
5391 void
5392 grn_db_init_builtin_commandscxx . . $ grn_db_init_builtin_commands(b578cd6e53d5fe91).(grn_ctxcxx . . $ grn_ctx# *ctx)
5393 {
5394 grn_expr_varcxx . . $ grn_expr_var# vars[10];
5395
5396 grn_proc_init_define_selectorcxx . . $ grn_proc_init_define_selector(b578cd6e53d5fe91).(ctx);
5397 grn_proc_init_selectcxx . . $ grn_proc_init_select(b578cd6e53d5fe91).(ctx);
5398
5399 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "values");
5400 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "table");
5401 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[2], "columns");
5402 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[3], "ifexists");
5403 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[4], "input_type");
5404 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[5], "each");
5405 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[6], "output_ids");
5406 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[7], "output_errors");
5407 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[8], "lock_table");
5408 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("load", proc_load, 9, vars);
5409
5410 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("status", proc_status, 0, vars);
5411
5412 grn_proc_init_table_listcxx . . $ grn_proc_init_table_list(b578cd6e53d5fe91).(ctx);
5413
5414 grn_proc_init_column_listcxx . . $ grn_proc_init_column_list(b578cd6e53d5fe91).(ctx);
5415
5416 grn_proc_init_table_createcxx . . $ grn_proc_init_table_create(b578cd6e53d5fe91).(ctx);
5417
5418 grn_proc_init_table_removecxx . . $ grn_proc_init_table_remove(b578cd6e53d5fe91).(ctx);
5419
5420 grn_proc_init_table_renamecxx . . $ grn_proc_init_table_rename(b578cd6e53d5fe91).(ctx);
5421
5422 grn_proc_init_column_createcxx . . $ grn_proc_init_column_create(b578cd6e53d5fe91).(ctx);
5423
5424 grn_proc_init_column_removecxx . . $ grn_proc_init_column_remove(b578cd6e53d5fe91).(ctx);
5425
5426 grn_proc_init_column_renamecxx . . $ grn_proc_init_column_rename(b578cd6e53d5fe91).(ctx);
5427
5428 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "path");
5429 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!(GRN_EXPR_MISSING_NAMEcxx . . $ `lib/grn_ctx_impl.h:44:9`!, proc_missing, 1, vars);
5430
5431 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("quit", proc_quit, 0, vars);
5432
5433 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "mode");
5434 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("shutdown", proc_shutdown, 1, vars);
5435
5436 grn_proc_init_clearlockcxx . . $ grn_proc_init_clearlock(b578cd6e53d5fe91).(ctx);
5437 grn_proc_init_lock_clearcxx . . $ grn_proc_init_lock_clear(b578cd6e53d5fe91).(ctx);
5438
5439 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "target_name");
5440 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "threshold");
5441 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("defrag", proc_defrag, 2, vars);
5442
5443 grn_proc_init_log_levelcxx . . $ grn_proc_init_log_level(b578cd6e53d5fe91).(ctx);
5444 grn_proc_init_log_putcxx . . $ grn_proc_init_log_put(b578cd6e53d5fe91).(ctx);
5445 grn_proc_init_log_reopencxx . . $ grn_proc_init_log_reopen(b578cd6e53d5fe91).(ctx);
5446
5447 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "table");
5448 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "key");
5449 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[2], "id");
5450 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[3], "filter");
5451 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("delete", proc_delete, 4, vars);
5452
5453 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "max");
5454 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("cache_limit", proc_cache_limit, 1, vars);
5455
5456 grn_proc_init_dumpcxx . . $ grn_proc_init_dump(b578cd6e53d5fe91).(ctx);
5457
5458 /* Deprecated. Use "plugin_register" instead. */
5459 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "path");
5460 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("register", proc_register, 1, vars);
5461
5462 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "obj");
5463 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("check", proc_check, 1, vars);
5464
5465 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "target_name");
5466 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "table");
5467 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("truncate", proc_truncate, 2, vars);
5468
5469 grn_proc_init_normalizecxx . . $ grn_proc_init_normalize(b578cd6e53d5fe91).(ctx);
5470
5471 grn_proc_init_tokenizecxx . . $ grn_proc_init_tokenize(b578cd6e53d5fe91).(ctx);
5472 grn_proc_init_table_tokenizecxx . . $ grn_proc_init_table_tokenize(b578cd6e53d5fe91).(ctx);
5473
5474 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("tokenizer_list", proc_tokenizer_list, 0, vars);
5475
5476 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("normalizer_list", proc_normalizer_list, 0, vars);
5477
5478 {
5479 grn_objcxx . . $ grn_obj# *proc;
5480 proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5481 "rand",
5482 -1,
5483 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5484 func_randcxx . . $ func_rand(fd082858389c8bb0).,
5485 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5486 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5487 0,
5488 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5489 grn_proc_set_is_stablecxx . . $ grn_proc_set_is_stable(7f588588f63dc99e).(ctx, proc, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5490 }
5491
5492 {
5493 grn_objcxx . . $ grn_obj# *proc;
5494 proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5495 "now",
5496 -1,
5497 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5498 func_nowcxx . . $ func_now(fd082858389c8bb0).,
5499 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5500 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5501 0,
5502 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5503 grn_proc_set_is_stablecxx . . $ grn_proc_set_is_stable(7f588588f63dc99e).(ctx, proc, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!);
5504 }
5505
5506 grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5507 "max",
5508 -1,
5509 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5510 func_maxcxx . . $ func_max(fd082858389c8bb0).,
5511 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5512 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5513 0,
5514 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5515 grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5516 "min",
5517 -1,
5518 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5519 func_mincxx . . $ func_min(fd082858389c8bb0).,
5520 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5521 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5522 0,
5523 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5524
5525 {
5526 grn_objcxx . . $ grn_obj# *selector_proc;
5527
5528 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5529 "geo_in_circle",
5530 -1,
5531 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5532 func_geo_in_circlecxx . . $ func_geo_in_circle(fd082858389c8bb0).,
5533 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5534 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5535 0,
5536 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5537 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, grn_selector_geo_in_circlecxx . . $ grn_selector_geo_in_circle(2267fc2522c8e143).);
5538 /* We may need GRN_OP_GEO_IN_CIRCLE. */
5539 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.);
5540
5541 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5542 "geo_in_rectangle",
5543 -1,
5544 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5545 func_geo_in_rectanglecxx . . $ func_geo_in_rectangle(fd082858389c8bb0).,
5546 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5547 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5548 0,
5549 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5550 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, grn_selector_geo_in_rectanglecxx . . $ grn_selector_geo_in_rectangle(2267fc2522c8e143).);
5551 /* We may need GRN_OP_GEO_IN_RECTANGLE. */
5552 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_MATCHcxx . . $ GRN_OP_MATCH.);
5553 }
5554
5555 {
5556 grn_objcxx . . $ grn_obj# *geo_distance = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5557 "geo_distance",
5558 -1,
5559 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5560 func_geo_distancecxx . . $ func_geo_distance(fd082858389c8bb0).,
5561 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5562 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5563 0,
5564 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5565 grn_proc_set_sortercxx . . $ grn_proc_set_sorter(315eaac2090bd94a).(ctx, geo_distance, grn_geo_distance_sortercxx . . $ grn_geo_distance_sorter(7034fb15f72963af).);
5566 }
5567
5568 /* deprecated. */
5569 grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5570 "geo_distance2",
5571 -1,
5572 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5573 func_geo_distance2cxx . . $ func_geo_distance2(fd082858389c8bb0).,
5574 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5575 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5576 0,
5577 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5578
5579 /* deprecated. */
5580 grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5581 "geo_distance3",
5582 -1,
5583 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5584 func_geo_distance3cxx . . $ func_geo_distance3(fd082858389c8bb0).,
5585 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5586 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5587 0,
5588 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5589
5590 grn_proc_init_edit_distancecxx . . $ grn_proc_init_edit_distance(b578cd6e53d5fe91).(ctx);
5591
5592 {
5593 grn_objcxx . . $ grn_obj# *selector_proc;
5594
5595 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5596 "all_records",
5597 -1,
5598 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5599 func_all_recordscxx . . $ func_all_records(fd082858389c8bb0).,
5600 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5601 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5602 0,
5603 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5604 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, selector_all_recordscxx . . $ selector_all_records(2267fc2522c8e143).);
5605 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_NOPcxx . . $ GRN_OP_NOP.);
5606 }
5607
5608 /* experimental */
5609 grn_proc_init_snippet_htmlcxx . . $ grn_proc_init_snippet_html(b578cd6e53d5fe91).(ctx);
5610
5611 grn_proc_init_querycxx . . $ grn_proc_init_query(b578cd6e53d5fe91).(ctx);
5612
5613 {
5614 grn_objcxx . . $ grn_obj# *selector_proc;
5615
5616 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5617 "sub_filter",
5618 -1,
5619 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5620 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5621 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5622 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5623 0,
5624 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5625 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, selector_sub_filtercxx . . $ selector_sub_filter(2267fc2522c8e143).);
5626 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_NOPcxx . . $ GRN_OP_NOP.);
5627 }
5628
5629 grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5630 "html_untag",
5631 -1,
5632 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5633 func_html_untagcxx . . $ func_html_untag(fd082858389c8bb0).,
5634 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5635 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5636 0,
5637 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5638
5639 {
5640 grn_objcxx . . $ grn_obj# *selector_proc;
5641
5642 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5643 "between",
5644 -1,
5645 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5646 func_betweencxx . . $ func_between(fd082858389c8bb0).,
5647 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5648 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5649 0,
5650 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5651 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, selector_betweencxx . . $ selector_between(2267fc2522c8e143).);
5652 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_LESScxx . . $ GRN_OP_LESS.);
5653 }
5654
5655 grn_proc_init_highlight_htmlcxx . . $ grn_proc_init_highlight_html(b578cd6e53d5fe91).(ctx);
5656 grn_proc_init_highlight_fullcxx . . $ grn_proc_init_highlight_full(b578cd6e53d5fe91).(ctx);
5657
5658 {
5659 grn_objcxx . . $ grn_obj# *selector_proc;
5660
5661 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5662 "in_values",
5663 -1,
5664 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5665 func_in_valuescxx . . $ func_in_values(fd082858389c8bb0).,
5666 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5667 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5668 0,
5669 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5670 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, selector_in_valuescxx . . $ selector_in_values(2267fc2522c8e143).);
5671 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_EQUALcxx . . $ GRN_OP_EQUAL.);
5672 }
5673
5674 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "table");
5675 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "column");
5676 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[2], "min");
5677 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[3], "min_border");
5678 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[4], "max");
5679 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[5], "max_border");
5680 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[6], "offset");
5681 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[7], "limit");
5682 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[8], "filter");
5683 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[9], "output_columns");
5684 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("range_filter", proc_range_filter, 10, vars);
5685
5686 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "id");
5687 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("request_cancel", proc_request_cancel, 1, vars);
5688
5689 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "name");
5690 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("plugin_register", proc_plugin_register, 1, vars);
5691
5692 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "name");
5693 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("plugin_unregister", proc_plugin_unregister, 1, vars);
5694
5695 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "target_name");
5696 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[1], "recursive");
5697 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[2], "only_opened");
5698 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("io_flush", proc_io_flush, 3, vars);
5699
5700 grn_proc_init_object_existcxx . . $ grn_proc_init_object_exist(b578cd6e53d5fe91).(ctx);
5701
5702 grn_proc_init_thread_limitcxx . . $ grn_proc_init_thread_limit(b578cd6e53d5fe91).(ctx);
5703
5704 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("database_unmap", proc_database_unmap, 0, vars);
5705
5706 grn_proc_init_column_copycxx . . $ grn_proc_init_column_copy(b578cd6e53d5fe91).(ctx);
5707
5708 grn_proc_init_schemacxx . . $ grn_proc_init_schema(b578cd6e53d5fe91).(ctx);
5709
5710 DEF_VARcxx . . $ `lib/proc.c:5373:9`!(vars[0], "target_name");
5711 DEF_COMMANDcxx . . $ `lib/proc.c:5380:9`!("reindex", proc_reindex, 1, vars);
5712
5713 {
5714 grn_objcxx . . $ grn_obj# *selector_proc;
5715
5716 selector_proc = grn_proc_createcxx . . $ grn_proc_create(195df001e5324f57).(ctx,
5717 "prefix_rk_search",
5718 -1,
5719 GRN_PROC_FUNCTIONcxx . . $ GRN_PROC_FUNCTION.,
5720 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5721 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5722 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
5723 0,
5724 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
5725 grn_proc_set_selectorcxx . . $ grn_proc_set_selector(7ce76c9564b607b5).(ctx, selector_proc, selector_prefix_rk_searchcxx . . $ selector_prefix_rk_search(2267fc2522c8e143).);
5726 grn_proc_set_selector_operatorcxx . . $ grn_proc_set_selector_operator(bbc69e63741a8d0a).(ctx, selector_proc, GRN_OP_PREFIXcxx . . $ GRN_OP_PREFIX.);
5727 }
5728
5729 grn_proc_init_config_getcxx . . $ grn_proc_init_config_get(b578cd6e53d5fe91).(ctx);
5730 grn_proc_init_config_setcxx . . $ grn_proc_init_config_set(b578cd6e53d5fe91).(ctx);
5731 grn_proc_init_config_deletecxx . . $ grn_proc_init_config_delete(b578cd6e53d5fe91).(ctx);
5732
5733 grn_proc_init_lock_acquirecxx . . $ grn_proc_init_lock_acquire(b578cd6e53d5fe91).(ctx);
5734 grn_proc_init_lock_releasecxx . . $ grn_proc_init_lock_release(b578cd6e53d5fe91).(ctx);
5735
5736 grn_proc_init_object_inspectcxx . . $ grn_proc_init_object_inspect(b578cd6e53d5fe91).(ctx);
5737
5738 grn_proc_init_fuzzy_searchcxx . . $ grn_proc_init_fuzzy_search(b578cd6e53d5fe91).(ctx);
5739
5740 grn_proc_init_object_removecxx . . $ grn_proc_init_object_remove(b578cd6e53d5fe91).(ctx);
5741
5742 grn_proc_init_snippetcxx . . $ grn_proc_init_snippet(b578cd6e53d5fe91).(ctx);
5743 grn_proc_init_highlightcxx . . $ grn_proc_init_highlight(b578cd6e53d5fe91).(ctx);
5744
5745 grn_proc_init_query_expandcxx . . $ grn_proc_init_query_expand(b578cd6e53d5fe91).(ctx);
5746
5747 grn_proc_init_object_listcxx . . $ grn_proc_init_object_list(b578cd6e53d5fe91).(ctx);
5748
5749 grn_proc_init_table_copycxx . . $ grn_proc_init_table_copy(b578cd6e53d5fe91).(ctx);
5750
5751 grn_proc_init_in_recordscxx . . $ grn_proc_init_in_records(b578cd6e53d5fe91).(ctx);
5752
5753 grn_proc_init_query_log_flags_getcxx . . $ grn_proc_init_query_log_flags_get(b578cd6e53d5fe91).(ctx);
5754 grn_proc_init_query_log_flags_setcxx . . $ grn_proc_init_query_log_flags_set(b578cd6e53d5fe91).(ctx);
5755 grn_proc_init_query_log_flags_addcxx . . $ grn_proc_init_query_log_flags_add(b578cd6e53d5fe91).(ctx);
5756 grn_proc_init_query_log_flags_removecxx . . $ grn_proc_init_query_log_flags_remove(b578cd6e53d5fe91).(ctx);
5757
5758 grn_proc_init_cast_loosecxx . . $ grn_proc_init_cast_loose(b578cd6e53d5fe91).(ctx);
5759
5760 grn_proc_init_index_column_diffcxx . . $ grn_proc_init_index_column_diff(b578cd6e53d5fe91).(ctx);
5761
5762 grn_proc_init_object_set_visibilitycxx . . $ grn_proc_init_object_set_visibility(b578cd6e53d5fe91).(ctx);
5763
5764 grn_proc_init_reference_acquirecxx . . $ grn_proc_init_reference_acquire(b578cd6e53d5fe91).(ctx);
5765 grn_proc_init_reference_releasecxx . . $ grn_proc_init_reference_release(b578cd6e53d5fe91).(ctx);
5766
5767 grn_proc_init_query_parallel_orcxx . . $ grn_proc_init_query_parallel_or(b578cd6e53d5fe91).(ctx);
5768
5769 grn_proc_init_object_warmcxx . . $ grn_proc_init_object_warm(b578cd6e53d5fe91).(ctx);
5770
5771 grn_proc_init_table_create_similarcxx . . $ grn_proc_init_table_create_similar(b578cd6e53d5fe91).(ctx);
5772
5773 grn_proc_init_column_create_similarcxx . . $ grn_proc_init_column_create_similar(b578cd6e53d5fe91).(ctx);
5774
5775 grn_proc_init_thread_dumpcxx . . $ grn_proc_init_thread_dump(b578cd6e53d5fe91).(ctx);
5776
5777 grn_proc_init_escalatecxx . . $ grn_proc_init_escalate(b578cd6e53d5fe91).(ctx);
5778
5779 grn_proc_init_sleepcxx . . $ grn_proc_init_sleep(b578cd6e53d5fe91).(ctx);
5780
5781 grn_proc_init_distance_cosinecxx . . $ grn_proc_init_distance_cosine(b578cd6e53d5fe91).(ctx);
5782 grn_proc_init_distance_inner_productcxx . . $ grn_proc_init_distance_inner_product(b578cd6e53d5fe91).(ctx);
5783 grn_proc_init_distance_l1_normcxx . . $ grn_proc_init_distance_l1_norm(b578cd6e53d5fe91).(ctx);
5784 grn_proc_init_distance_l2_norm_squaredcxx . . $ grn_proc_init_distance_l2_norm_squared(b578cd6e53d5fe91).(ctx);
5785
5786 grn_proc_init_command_listcxx . . $ grn_proc_init_command_list(b578cd6e53d5fe91).(ctx);
5787
5788 grn_proc_init_extractcxx . . $ grn_proc_init_extract(b578cd6e53d5fe91).(ctx);
5789
5790 grn_proc_init_json_extractcxx . . $ grn_proc_init_json_extract(b578cd6e53d5fe91).(ctx);
5791 }