Debian Codegraph @

lib/grn_hash.h

raw symbols SCIP
1 /*
2 Copyright (C) 2009-2018 Brazil
3 Copyright (C) 2018-2026 Sutou Kouhei <[email protected]>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #pragma once
21
22 #include "grn.h"cxx . . $ `<file>/lib/grn.h`/
23 #include "grn_ii_select_cursor.h"cxx . . $ `<file>/lib/grn_ii_select_cursor.h`/
24 #include "grn_io.h"cxx . . $ `<file>/lib/grn_io.h`/
25 #include "grn_table_module.h"cxx . . $ `<file>/lib/grn_table_module.h`/
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**** grn_tiny_array ****/
32
33 /*
34 * grn_tiny_array_init() accepts a logical OR of the following flags.
35 * Note that other flags, such as (1 << 30), will be ignored.
36 *
37 * - GRN_TINY_ARRAY_CLEAR specifies to initialize a new block with zeros.
38 * It is valid only iff specified with GRN_TINY_ARRAY_USE_MALLOC.
39 * - GRN_TINY_ARRAY_THREADSAFE specifies to create a critical section when
40 * allocating memory.
41 * - GRN_TINY_ARRAY_USE_MALLOC specifies to use GRN_MALLOC/CALLOC/FREE instead
42 * of GRN_CTX_ALLOC/FREE.
43 */
44 #define GRN_TINY_ARRAY_CLEARcxx . . $ `lib/grn_hash.h:44:9`! (1 << 0)
45 #define GRN_TINY_ARRAY_THREADSAFEcxx . . $ `lib/grn_hash.h:45:9`! (1 << 1)
46 #define GRN_TINY_ARRAY_USE_MALLOCcxx . . $ `lib/grn_hash.h:46:9`! (1 << 2)
47
48 /*
49 * - GRN_TINY_ARRAY_FACTOR is the global parameter of grn_tiny_array.
50 * - GRN_TINY_ARRAY_GET_OFFSET() returns the offset of a specified block.
51 * - GRN_TINY_ARRAY_BASE_BLOCK_SIZE is the number of elements in the first
52 * block.
53 * - GRN_TINY_ARRAY_GET_BLOCK_SIZE() returns the number of elements in a
54 * specified block.
55 * - GRN_TINY_ARRAY_NUM_BLOCKS is the maximum number of blocks.
56 */
57 #define GRN_TINY_ARRAY_FACTORcxx . . $ `lib/grn_hash.h:57:9`! 0
58 #define GRN_TINY_ARRAY_GET_OFFSETcxx . . $ `lib/grn_hash.h:58:9`!(block_id) \
59 (1 << ((block_id) << GRN_TINY_ARRAY_FACTORcxx . . $ `lib/grn_hash.h:57:9`!))
60 #define GRN_TINY_ARRAY_BASE_BLOCK_SIZEcxx . . $ `lib/grn_hash.h:60:9`! \
61 (GRN_TINY_ARRAY_GET_OFFSETcxx . . $ `lib/grn_hash.h:58:9`!(1) - GRN_TINY_ARRAY_GET_OFFSETcxx . . $ `lib/grn_hash.h:58:9`!(0))
62 #define GRN_TINY_ARRAY_GET_BLOCK_SIZEcxx . . $ `lib/grn_hash.h:62:9`!(block_id) \
63 (GRN_TINY_ARRAY_BASE_BLOCK_SIZEcxx . . $ `lib/grn_hash.h:60:9`! * GRN_TINY_ARRAY_GET_OFFSETcxx . . $ `lib/grn_hash.h:58:9`!(block_id))
64 #define GRN_TINY_ARRAY_NUM_BLOCKScxx . . $ `lib/grn_hash.h:64:9`! (32 >> GRN_TINY_ARRAY_FACTORcxx . . $ `lib/grn_hash.h:57:9`!)
65
66 /*
67 * grn_tiny_array uses several blocks to emulate an array.
68 * The k-th block, blocks[k - 1], consists of 2^(k-1) elements.
69 */
70 typedef struct _grn_tiny_arraycxx . . $ _grn_tiny_array# grn_tiny_arraycxx . . $ grn_tiny_array#;
71
72 struct _grn_tiny_arraycxx . . $ _grn_tiny_array# {
73 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_tiny_array#ctx.;
74 grn_idcxx . . $ grn_id# maxcxx . . $ _grn_tiny_array#max.;
75 uint16_tcxx . . $ uint16_t# element_sizecxx . . $ _grn_tiny_array#element_size.;
76 uint16_tcxx . . $ uint16_t# flagscxx . . $ _grn_tiny_array#flags.;
77 void *blockscxx . . $ _grn_tiny_array#blocks.[GRN_TINY_ARRAY_NUM_BLOCKScxx . . $ `lib/grn_hash.h:64:9`!];
78 grn_critical_sectioncxx . . $ grn_critical_section# lockcxx . . $ _grn_tiny_array#lock.;
79 };
80
81 #define GRN_TINY_ARRAY_EACHcxx . . $ `lib/grn_hash.h:81:9`!(array, head, tail, key, value, block) \
82 do { \
83 int _block_id; \
84 const grn_id _head = (head); \
85 const grn_id _tail = (tail); \
86 for (_block_id = 0, (key) = (_head); \
87 _block_id < GRN_TINY_ARRAY_NUM_BLOCKS && (key) <= (_tail); \
88 _block_id++) { \
89 int _id = GRN_TINY_ARRAY_GET_BLOCK_SIZE(_block_id); \
90 (value) = (array)->blocks[_block_id]; \
91 if (value) { \
92 while (_id-- && (key) <= (_tail)) { \
93 {block}(key)++; \
94 (value) = (void *)((byte *)(value) + (array)->element_size); \
95 } \
96 } else { \
97 (key) += _id; \
98 } \
99 } \
100 } while (0)
101
102 #define GRN_TINY_ARRAY_EACH_BEGINcxx . . $ `lib/grn_hash.h:102:9`!(array, head, tail, value) \
103 do { \
104 int _block_id; \
105 const grn_id _head = (head); \
106 const grn_id _tail = (tail); \
107 grn_id _current = _head; \
108 for (_block_id = 0; \
109 _block_id < GRN_TINY_ARRAY_NUM_BLOCKS && _current <= _tail; \
110 _block_id++) { \
111 int _n_elements = GRN_TINY_ARRAY_GET_BLOCK_SIZE(_block_id); \
112 uint8_t *_block = (array)->blocks[_block_id]; \
113 if (_block) { \
114 int _i; \
115 for (_i = 0; _i < _n_elements && _current <= _tail; \
116 _i++, _current++) { \
117 void *value = _block + (array)->element_size * _i;
118
119 #define GRN_TINY_ARRAY_EACH_ENDcxx . . $ `lib/grn_hash.h:119:9`!() \
120 } \
121 } \
122 else \
123 { \
124 _current += _n_elements; \
125 } \
126 } \
127 } \
128 while (0)
129
130 GRN_APIcxx . . $ `lib/grn.h:84:13`! void
131 grn_tiny_array_initcxx . . $ grn_tiny_array_init(fb767a98cc600886).(grn_ctxcxx . . $ grn_ctx# *ctx,
132 grn_tiny_arraycxx . . $ grn_tiny_array# *array,
133 uint16_tcxx . . $ uint16_t# element_size,
134 uint16_tcxx . . $ uint16_t# flags);
135 GRN_APIcxx . . $ `lib/grn.h:84:13`! void
136 grn_tiny_array_fincxx . . $ grn_tiny_array_fin(20d69b52de0538c0).(grn_tiny_arraycxx . . $ grn_tiny_array# *array);
137 GRN_APIcxx . . $ `lib/grn.h:84:13`! void *
138 grn_tiny_array_atcxx . . $ grn_tiny_array_at(893fbdb40ce954ce).(grn_tiny_arraycxx . . $ grn_tiny_array# *array, grn_idcxx . . $ grn_id# id);
139 GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_idcxx . . $ grn_id#
140 grn_tiny_array_idcxx . . $ grn_tiny_array_id(57b15e130010ddd8).(grn_tiny_arraycxx . . $ grn_tiny_array# *array, const void *element_address);
141
142 /**** grn_tiny_bitmap ****/
143
144 typedef struct _grn_tiny_bitmapcxx . . $ _grn_tiny_bitmap# grn_tiny_bitmapcxx . . $ grn_tiny_bitmap#;
145
146 struct _grn_tiny_bitmapcxx . . $ _grn_tiny_bitmap# {
147 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_tiny_bitmap#ctx.;
148 void *blockscxx . . $ _grn_tiny_bitmap#blocks.[GRN_TINY_ARRAY_NUM_BLOCKScxx . . $ `lib/grn_hash.h:64:9`!];
149 };
150
151 /**** grn_array ****/
152
153 #define GRN_ARRAY_TINYcxx . . $ `lib/grn_hash.h:153:9`! (0x01 << 6)
154
155 /*
156 * grn_array uses grn_io or grn_tiny_array to represent an array.
157 *
158 * To create a grn_tiny_array-based grn_array, specify the GRN_ARRAY_TINY flag
159 * to grn_array_create(). Note that a grn_tiny_array-based grn_array is not
160 * backed by a file.
161 */
162 struct _grn_arraycxx . . $ _grn_array# {
163 grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_array#obj.;
164 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_array#ctx.;
165 uint32_tcxx . . $ uint32_t# value_sizecxx . . $ _grn_array#value_size.;
166 size_tcxx . . $ size_t# n_keyscxx . . $ _grn_array#n_keys.;
167 grn_table_sort_keycxx . . $ grn_table_sort_key# *keyscxx . . $ _grn_array#keys.;
168 uint32_tcxx . . $ uint32_t# *n_garbagescxx . . $ _grn_array#n_garbages.;
169 uint32_tcxx . . $ uint32_t# *n_entriescxx . . $ _grn_array#n_entries.;
170
171 /* For grn_io_array. */
172 grn_iocxx . . $ grn_io# *iocxx . . $ _grn_array#io.;
173 struct grn_array_headercxx . . $ grn_array_header# *headercxx . . $ _grn_array#header.;
174 uint32_tcxx . . $ uint32_t# *lockcxx . . $ _grn_array#lock.;
175 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! wal_touchedcxx . . $ _grn_array#wal_touched.;
176
177 /* For grn_tiny_array. */
178 uint32_tcxx . . $ uint32_t# n_garbages_bufcxx . . $ _grn_array#n_garbages_buf.;
179 uint32_tcxx . . $ uint32_t# n_entries_bufcxx . . $ _grn_array#n_entries_buf.;
180 grn_idcxx . . $ grn_id# garbagescxx . . $ _grn_array#garbages.;
181 grn_tiny_arraycxx . . $ grn_tiny_array# arraycxx . . $ _grn_array#array.;
182 grn_tiny_bitmapcxx . . $ grn_tiny_bitmap# bitmapcxx . . $ _grn_array#bitmap.;
183 };
184
185 struct _grn_array_cursorcxx . . $ _grn_array_cursor# {
186 grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_array_cursor#obj.;
187 grn_arraycxx . . $ grn_array# *arraycxx . . $ _grn_array_cursor#array.;
188 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_array_cursor#ctx.;
189 grn_idcxx . . $ grn_id# curr_reccxx . . $ _grn_array_cursor#curr_rec.;
190 grn_idcxx . . $ grn_id# tailcxx . . $ _grn_array_cursor#tail.;
191 unsigned int restcxx . . $ _grn_array_cursor#rest.;
192 int dircxx . . $ _grn_array_cursor#dir.;
193 };
194
195 /*
196 * grn_array_size() returns the number of entries in an array.
197 * If the array was truncated by another process but `array` still refers to
198 * the old one, this function returns 0.
199 */
200 uint32_tcxx . . $ uint32_t#
201 grn_array_sizecxx . . $ grn_array_size(8562ca5b89859874).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array);
202
203 uint32_tcxx . . $ uint32_t#
204 grn_array_get_flagscxx . . $ grn_array_get_flags(8562ca5b89859874).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array);
205
206 grn_rccxx . . $ grn_rc#
207 grn_array_truncatecxx . . $ grn_array_truncate(1b4cd6b6726e4674).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array);
208 grn_rccxx . . $ grn_rc#
209 grn_array_copy_sort_keycxx . . $ grn_array_copy_sort_key(9f6869e433b90b1e).(grn_ctxcxx . . $ grn_ctx# *ctx,
210 grn_arraycxx . . $ grn_array# *array,
211 grn_table_sort_keycxx . . $ grn_table_sort_key# *keys,
212 size_tcxx . . $ size_t# n_keys);
213 grn_rccxx . . $ grn_rc#
214 grn_array_wal_recovercxx . . $ grn_array_wal_recover(1b4cd6b6726e4674).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array);
215 grn_rccxx . . $ grn_rc#
216 grn_array_warmcxx . . $ grn_array_warm(1b4cd6b6726e4674).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array);
217
218 /**** grn_hash ****/
219
220 #define GRN_HASH_MAX_KEY_SIZE_NORMALcxx . . $ `lib/grn_hash.h:220:9`! GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!
221 #define GRN_HASH_MAX_KEY_SIZE_LARGEcxx . . $ `lib/grn_hash.h:221:9`! (0xffff)
222
223 #define GRN_HASH_IS_LARGE_KEYcxx . . $ `lib/grn_hash.h:223:9`!(hash) \
224 ((hash)->key_size > GRN_HASH_MAX_KEY_SIZE_NORMALcxx . . $ `lib/grn_hash.h:220:9`!)
225
226 typedef struct _grn_hash_header_commoncxx . . $ _grn_hash_header_common# grn_hash_header_commoncxx . . $ grn_hash_header_common#;
227 typedef struct _grn_hash_header_normalcxx . . $ _grn_hash_header_normal# grn_hash_header_normalcxx . . $ grn_hash_header_normal#;
228 typedef struct _grn_hash_header_largecxx . . $ _grn_hash_header_large# grn_hash_header_largecxx . . $ grn_hash_header_large#;
229
230 typedef struct _grn_hash_wal_add_entry_datacxx . . $ _grn_hash_wal_add_entry_data# grn_hash_wal_add_entry_datacxx . . $ grn_hash_wal_add_entry_data#;
231
232 struct _grn_hashcxx . . $ _grn_hash# {
233 grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_hash#obj.;
234 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_hash#ctx.;
235 uint32_tcxx . . $ uint32_t# key_sizecxx . . $ _grn_hash#key_size.;
236 grn_encodingcxx . . $ grn_encoding# encodingcxx . . $ _grn_hash#encoding.;
237 uint32_tcxx . . $ uint32_t# value_sizecxx . . $ _grn_hash#value_size.;
238 uint32_tcxx . . $ uint32_t# entry_sizecxx . . $ _grn_hash#entry_size.;
239 uint32_tcxx . . $ uint32_t# *n_garbagescxx . . $ _grn_hash#n_garbages.;
240 uint32_tcxx . . $ uint32_t# *n_entriescxx . . $ _grn_hash#n_entries.;
241 uint32_tcxx . . $ uint32_t# *max_offsetcxx . . $ _grn_hash#max_offset.;
242 grn_table_modulecxx . . $ grn_table_module# tokenizercxx . . $ _grn_hash#tokenizer.;
243 grn_objcxx . . $ grn_obj# normalizerscxx . . $ _grn_hash#normalizers.;
244 grn_objcxx . . $ grn_obj# token_filterscxx . . $ _grn_hash#token_filters.;
245 /* For backward compatibility */
246 grn_objcxx . . $ grn_obj# token_filter_procscxx . . $ _grn_hash#token_filter_procs.;
247 grn_objcxx . . $ grn_obj# extractorscxx . . $ _grn_hash#extractors.;
248
249 /* For grn_io_hash. */
250 grn_iocxx . . $ grn_io# *iocxx . . $ _grn_hash#io.;
251 unioncxx . . $ _grn_hash#$anonymous_type_0# {
252 grn_hash_header_commoncxx . . $ grn_hash_header_common# *commoncxx . . $ _grn_hash#$anonymous_type_0#common.;
253 grn_hash_header_normalcxx . . $ grn_hash_header_normal# *normalcxx . . $ _grn_hash#$anonymous_type_0#normal.;
254 grn_hash_header_largecxx . . $ grn_hash_header_large# *largecxx . . $ _grn_hash#$anonymous_type_0#large.;
255 } headercxx . . $ _grn_hash#header.;
256 uint32_tcxx . . $ uint32_t# *lockcxx . . $ _grn_hash#lock.;
257 // uint32_t nref;
258 // unsigned int max_n_subrecs;
259 // unsigned int record_size;
260 // unsigned int subrec_size;
261 // grn_rec_unit record_unit;
262 // grn_rec_unit subrec_unit;
263 // uint8_t arrayp;
264 // grn_recordh *curr_rec;
265 // grn_set_cursor *cursor;
266 // int limit;
267 // void *userdata;
268 // grn_id subrec_id;
269
270 /* For grn_tiny_hash. */
271 uint32_tcxx . . $ uint32_t# max_offset_cxx . . $ _grn_hash#max_offset_.;
272 uint32_tcxx . . $ uint32_t# n_garbages_cxx . . $ _grn_hash#n_garbages_.;
273 uint32_tcxx . . $ uint32_t# n_entries_cxx . . $ _grn_hash#n_entries_.;
274 grn_idcxx . . $ grn_id# *indexcxx . . $ _grn_hash#index.;
275 grn_idcxx . . $ grn_id# garbagescxx . . $ _grn_hash#garbages.;
276 grn_tiny_arraycxx . . $ grn_tiny_array# acxx . . $ _grn_hash#a.;
277 grn_tiny_bitmapcxx . . $ grn_tiny_bitmap# bitmapcxx . . $ _grn_hash#bitmap.;
278
279 grn_hash_wal_add_entry_datacxx . . $ grn_hash_wal_add_entry_data# *wal_datacxx . . $ _grn_hash#wal_data.;
280 };
281
282 #define GRN_HASH_HEADER_COMMON_FIELDScxx . . $ `lib/grn_hash.h:282:9`! \
283 uint32_t flags; \
284 grn_encoding encoding; \
285 uint32_t key_size; \
286 uint32_t value_size; \
287 grn_id tokenizer; \
288 uint32_t curr_rec; \
289 uint32_t curr_key_normal; \
290 uint32_t idx_offset; \
291 uint32_t entry_size; \
292 uint32_t max_offset; \
293 uint32_t n_entries; \
294 uint32_t n_garbages; \
295 uint32_t lock; \
296 grn_id normalizer; \
297 uint32_t truncated; \
298 uint64_t curr_key_large; \
299 uint64_t wal_id; \
300 uint32_t reserved[10]
301
302 struct _grn_hash_header_commoncxx . . $ _grn_hash_header_common# {
303 GRN_HASH_HEADER_COMMON_FIELDScxx . . $ _grn_hash_header_common#tokenizer.;
304 };
305
306 struct _grn_hash_header_normalcxx . . $ _grn_hash_header_normal# {
307 GRN_HASH_HEADER_COMMON_FIELDScxx . . $ grn_encoding#;
308 grn_idcxx . . $ grn_id# garbagescxx . . $ _grn_hash_header_normal#garbages.[GRN_HASH_MAX_KEY_SIZE_NORMALcxx . . $ `lib/grn_hash.h:220:9`!];
309 };
310
311 struct _grn_hash_header_largecxx . . $ _grn_hash_header_large# {
312 GRN_HASH_HEADER_COMMON_FIELDScxx . . $ _grn_hash_header_large#curr_key_normal.;
313 grn_idcxx . . $ grn_id# garbagescxx . . $ _grn_hash_header_large#garbages.[GRN_HASH_MAX_KEY_SIZE_LARGEcxx . . $ `lib/grn_hash.h:221:9`!];
314 };
315
316 struct _grn_hash_cursorcxx . . $ _grn_hash_cursor# {
317 grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_hash_cursor#obj.;
318 grn_hashcxx . . $ grn_hash# *hashcxx . . $ _grn_hash_cursor#hash.;
319 grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_hash_cursor#ctx.;
320 grn_idcxx . . $ grn_id# curr_reccxx . . $ _grn_hash_cursor#curr_rec.;
321 grn_idcxx . . $ grn_id# tailcxx . . $ _grn_hash_cursor#tail.;
322 unsigned int restcxx . . $ _grn_hash_cursor#rest.;
323 int dircxx . . $ _grn_hash_cursor#dir.;
324 };
325
326 /* deprecated */
327
328 #define GRN_TABLE_SORT_BY_KEYcxx . . $ `lib/grn_hash.h:328:9`! 0
329 #define GRN_TABLE_SORT_BY_IDcxx . . $ `lib/grn_hash.h:329:9`! (1L << 1)
330 #define GRN_TABLE_SORT_BY_VALUEcxx . . $ `lib/grn_hash.h:330:9`! (1L << 2)
331 #define GRN_TABLE_SORT_RES_IDcxx . . $ `lib/grn_hash.h:331:9`! 0
332 #define GRN_TABLE_SORT_RES_KEYcxx . . $ `lib/grn_hash.h:332:9`! (1L << 3)
333 #define GRN_TABLE_SORT_AS_BINcxx . . $ `lib/grn_hash.h:333:9`! 0
334 #define GRN_TABLE_SORT_AS_NUMBERcxx . . $ `lib/grn_hash.h:334:9`! (1L << 4)
335 #define GRN_TABLE_SORT_AS_SIGNEDcxx . . $ `lib/grn_hash.h:335:9`! 0
336 #define GRN_TABLE_SORT_AS_UNSIGNEDcxx . . $ `lib/grn_hash.h:336:9`! (1L << 5)
337 #define GRN_TABLE_SORT_AS_INT32cxx . . $ `lib/grn_hash.h:337:9`! 0
338 #define GRN_TABLE_SORT_AS_INT64cxx . . $ `lib/grn_hash.h:338:9`! (1L << 6)
339 #define GRN_TABLE_SORT_NO_PROCcxx . . $ `lib/grn_hash.h:339:9`! 0
340 #define GRN_TABLE_SORT_WITH_PROCcxx . . $ `lib/grn_hash.h:340:9`! (1L << 7)
341
342 typedef struct _grn_table_sort_optargcxx . . $ _grn_table_sort_optarg# grn_table_sort_optargcxx . . $ grn_table_sort_optarg#;
343
344 struct _grn_table_sort_optargcxx . . $ _grn_table_sort_optarg# {
345 grn_table_sort_flagscxx . . $ grn_table_sort_flags# flagscxx . . $ _grn_table_sort_optarg#flags.;
346 int (*comparcxx . . $ _grn_table_sort_optarg#compar.)(grn_ctxcxx . . $ grn_ctx# *ctx,
347 grn_objcxx . . $ grn_obj# *table1,
348 void *target1,
349 unsigned int target1_size,
350 grn_objcxx . . $ grn_obj# *table2,
351 void *target2,
352 unsigned int target2_size,
353 void *compare_arg);
354 void *compar_argcxx . . $ _grn_table_sort_optarg#compar_arg.;
355 grn_objcxx . . $ grn_obj# *proccxx . . $ _grn_table_sort_optarg#proc.;
356 int offsetcxx . . $ _grn_table_sort_optarg#offset.;
357 };
358
359 void
360 grn_hash_init_from_envcxx . . $ grn_hash_init_from_env(49f6e7a06ebc5aa8).(void);
361
362 GRN_APIcxx . . $ `lib/grn.h:84:13`! int
363 grn_hash_sortcxx . . $ grn_hash_sort(a87f57dabbc49f14).(grn_ctxcxx . . $ grn_ctx# *ctx,
364 grn_hashcxx . . $ grn_hash# *hash,
365 int limit,
366 grn_arraycxx . . $ grn_array# *result,
367 grn_table_sort_optargcxx . . $ grn_table_sort_optarg# *optarg);
368
369 grn_rccxx . . $ grn_rc#
370 grn_hash_lockcxx . . $ grn_hash_lock(47f653af347906d3).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, int timeout);
371 grn_rccxx . . $ grn_rc#
372 grn_hash_unlockcxx . . $ grn_hash_unlock(c005d027d163fb0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
373 grn_rccxx . . $ grn_rc#
374 grn_hash_clear_lockcxx . . $ grn_hash_clear_lock(c005d027d163fb0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
375
376 #define GRN_HASH_SIZEcxx . . $ `lib/grn_hash.h:376:9`!(hash) (*((hash)->n_entries))
377
378 /* private */
379 typedef enumcxx . . $ $anonymous_type_5966f851bb8705cc_1# {
380 GRN_REC_DOCUMENTcxx . . $ GRN_REC_DOCUMENT. = 0,
381 GRN_REC_SECTIONcxx . . $ GRN_REC_SECTION.,
382 GRN_REC_POSITIONcxx . . $ GRN_REC_POSITION.,
383 GRN_REC_USERDEFcxx . . $ GRN_REC_USERDEF.,
384 GRN_REC_NONEcxx . . $ GRN_REC_NONE.
385 } grn_rec_unitcxx . . $ grn_rec_unit#;
386
387 GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_rccxx . . $ grn_rc#
388 grn_hash_truncatecxx . . $ grn_hash_truncate(c005d027d163fb0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
389
390 int
391 grn_rec_unit_sizecxx . . $ grn_rec_unit_size(ccf358c372c9e327).(grn_rec_unitcxx . . $ grn_rec_unit# unit, int rec_size);
392
393 const char *
394 _grn_hash_keycxx . . $ _grn_hash_key(9e5907222c08364c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *key_size);
395
396 grn_rccxx . . $ grn_rc#
397 grn_hash_add_table_cursorcxx . . $ grn_hash_add_table_cursor(b01ceb7524d76776).(grn_ctxcxx . . $ grn_ctx# *ctx,
398 grn_hashcxx . . $ grn_hash# *hash,
399 grn_table_cursorcxx . . $ grn_table_cursor# *cursor,
400 double score,
401 grn_operatorcxx . . $ grn_operator# op);
402 grn_rccxx . . $ grn_rc#
403 grn_hash_add_index_cursorcxx . . $ grn_hash_add_index_cursor(63f962fa8fd21495).(grn_ctxcxx . . $ grn_ctx# *ctx,
404 grn_hashcxx . . $ grn_hash# *hash,
405 grn_objcxx . . $ grn_obj# *cursor,
406 double additional_score,
407 double weight,
408 grn_operatorcxx . . $ grn_operator# op);
409 grn_rccxx . . $ grn_rc#
410 grn_hash_add_ii_cursorcxx . . $ grn_hash_add_ii_cursor(68eaa882e334ce87).(grn_ctxcxx . . $ grn_ctx# *ctx,
411 grn_hashcxx . . $ grn_hash# *hash,
412 grn_ii_cursorcxx . . $ grn_ii_cursor# *cursor,
413 double additional_score,
414 double weight,
415 grn_operatorcxx . . $ grn_operator# op);
416 grn_rccxx . . $ grn_rc#
417 grn_hash_add_ii_select_cursorcxx . . $ grn_hash_add_ii_select_cursor(a46c59bc63bc990a).(grn_ctxcxx . . $ grn_ctx# *ctx,
418 grn_hashcxx . . $ grn_hash# *hash,
419 grn_ii_select_cursorcxx . . $ grn_ii_select_cursor# *cursor,
420 grn_operatorcxx . . $ grn_operator# op);
421
422 int
423 grn_hash_get_key_valuecxx . . $ grn_hash_get_key_value(7f053b9451927ea0).(grn_ctxcxx . . $ grn_ctx# *ctx,
424 grn_hashcxx . . $ grn_hash# *hash,
425 grn_idcxx . . $ grn_id# id,
426 void *keybuf,
427 int bufsize,
428 void *valuebuf);
429
430 int
431 _grn_hash_get_key_valuecxx . . $ _grn_hash_get_key_value(be8a3d12c2b724f7).(
432 grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, grn_idcxx . . $ grn_id# id, void **key, void **value);
433
434 grn_idcxx . . $ grn_id#
435 grn_hash_nextcxx . . $ grn_hash_next(7edfe3b2585ad1cf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, grn_idcxx . . $ grn_id# id);
436
437 /* only valid for hash tables, GRN_OBJ_KEY_VAR_SIZE && GRN_HASH_TINY */
438 const char *
439 _grn_hash_strkey_by_valcxx . . $ _grn_hash_strkey_by_val(871dcb50966c6474).(void *v, uint16_tcxx . . $ uint16_t# *size);
440
441 const char *
442 grn_hash_get_value_cxx . . $ grn_hash_get_value_(9e5907222c08364c).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *size);
443
444 grn_rccxx . . $ grn_rc#
445 grn_hash_removecxx . . $ grn_hash_remove(cae1c943be750b4c).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *path);
446 grn_rccxx . . $ grn_rc#
447 grn_array_removecxx . . $ grn_array_remove(cae1c943be750b4c).(grn_ctxcxx . . $ grn_ctx# *ctx, const char *path);
448
449 grn_idcxx . . $ grn_id#
450 grn_hash_atcxx . . $ grn_hash_at(7edfe3b2585ad1cf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash, grn_idcxx . . $ grn_id# id);
451 grn_idcxx . . $ grn_id#
452 grn_array_atcxx . . $ grn_array_at(ccae661733a7e500).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_arraycxx . . $ grn_array# *array, grn_idcxx . . $ grn_id# id);
453
454 void
455 grn_hash_checkcxx . . $ grn_hash_check(57c8ed80822320b7).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
456
457 boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!
458 grn_hash_is_large_total_key_sizecxx . . $ grn_hash_is_large_total_key_size(f41fb6128cb68278).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
459
460 uint64_tcxx . . $ uint64_t#
461 grn_hash_total_key_sizecxx . . $ grn_hash_total_key_size(4f735bb6d75b18a1).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
462 uint64_tcxx . . $ uint64_t#
463 grn_hash_max_total_key_sizecxx . . $ grn_hash_max_total_key_size(4f735bb6d75b18a1).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
464
465 grn_rccxx . . $ grn_rc#
466 grn_hash_wal_recovercxx . . $ grn_hash_wal_recover(c005d027d163fb0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
467 grn_rccxx . . $ grn_rc#
468 grn_hash_warmcxx . . $ grn_hash_warm(c005d027d163fb0b).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_hashcxx . . $ grn_hash# *hash);
469
470 #ifdef __cplusplus
471 }
472 #endif