| 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_db.h"cxx . . $ `<file>/lib/grn_db.h`/ |
| 24 | #include "grn_hash.h"cxx . . $ `<file>/lib/grn_hash.h`/ |
| 25 | #include "grn_table_module.h"cxx . . $ `<file>/lib/grn_table_module.h`/ |
| 26 | |
| 27 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 28 | extern "C" { |
| 29 | #endif |
| 30 | |
| 31 | #define GRN_PAT_MAX_KEY_SIZEcxx . . $ `lib/grn_pat.h:31:9`! GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`! |
| 32 | |
| 33 | struct _grn_patcxx . . $ _grn_pat# { |
| 34 | grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_pat#obj.; |
| 35 | grn_iocxx . . $ grn_io# *iocxx . . $ _grn_pat#io.; |
| 36 | struct grn_pat_headercxx . . $ grn_pat_header# *headercxx . . $ _grn_pat#header.; |
| 37 | grn_encodingcxx . . $ grn_encoding# encodingcxx . . $ _grn_pat#encoding.; |
| 38 | uint32_tcxx . . $ uint32_t# key_sizecxx . . $ _grn_pat#key_size.; |
| 39 | uint32_tcxx . . $ uint32_t# value_sizecxx . . $ _grn_pat#value_size.; |
| 40 | grn_table_modulecxx . . $ grn_table_module# tokenizercxx . . $ _grn_pat#tokenizer.; |
| 41 | grn_objcxx . . $ grn_obj# normalizerscxx . . $ _grn_pat#normalizers.; |
| 42 | grn_objcxx . . $ grn_obj# token_filterscxx . . $ _grn_pat#token_filters.; |
| 43 | /* For backward compatibility */ |
| 44 | grn_objcxx . . $ grn_obj# token_filter_procscxx . . $ _grn_pat#token_filter_procs.; |
| 45 | grn_objcxx . . $ grn_obj# extractorscxx . . $ _grn_pat#extractors.; |
| 46 | grn_idcxx . . $ grn_id# *cachecxx . . $ _grn_pat#cache.; |
| 47 | uint32_tcxx . . $ uint32_t# cache_sizecxx . . $ _grn_pat#cache_size.; |
| 48 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! is_dirtycxx . . $ _grn_pat#is_dirty.; |
| 49 | grn_critical_sectioncxx . . $ grn_critical_section# lockcxx . . $ _grn_pat#lock.; |
| 50 | }; |
| 51 | |
| 52 | #define GRN_PAT_NDELINFOScxx . . $ `lib/grn_pat.h:52:9`! 0x100 |
| 53 | |
| 54 | typedef structcxx . . $ $anonymous_type_3cbf03c15cd18141_0# { |
| 55 | grn_idcxx . . $ grn_id# dcxx . . $ $anonymous_type_3cbf03c15cd18141_0#d.; /* The ID of a deleting node. */ |
| 56 | grn_idcxx . . $ grn_id# ldcxx . . $ $anonymous_type_3cbf03c15cd18141_0#ld.; /* The ID of the parent node of a deleting node. */ |
| 57 | /* delinfo->ld is set if required. */ |
| 58 | uint32_tcxx . . $ uint32_t# statcxx . . $ $anonymous_type_3cbf03c15cd18141_0#stat.; /* DL_EMPTY, DL_PHASE1, or DL_PHASE2. */ |
| 59 | uint32_tcxx . . $ uint32_t# sharedcxx . . $ $anonymous_type_3cbf03c15cd18141_0#shared.; /* This flag is used if GRN_OBJ_KEY_WITH_SIS is set. */ |
| 60 | } grn_pat_delinfocxx . . $ grn_pat_delinfo#; |
| 61 | |
| 62 | struct grn_pat_headercxx . . $ grn_pat_header# { |
| 63 | uint32_tcxx . . $ uint32_t# flagscxx . . $ grn_pat_header#flags.; |
| 64 | grn_encodingcxx . . $ grn_encoding# encodingcxx . . $ grn_pat_header#encoding.; |
| 65 | uint32_tcxx . . $ uint32_t# key_sizecxx . . $ grn_pat_header#key_size.; |
| 66 | uint32_tcxx . . $ uint32_t# value_sizecxx . . $ grn_pat_header#value_size.; |
| 67 | grn_idcxx . . $ grn_id# tokenizercxx . . $ grn_pat_header#tokenizer.; |
| 68 | uint32_tcxx . . $ uint32_t# n_entriescxx . . $ grn_pat_header#n_entries.; |
| 69 | uint32_tcxx . . $ uint32_t# curr_reccxx . . $ grn_pat_header#curr_rec.; |
| 70 | uint32_tcxx . . $ uint32_t# curr_keycxx . . $ grn_pat_header#curr_key.; |
| 71 | uint32_tcxx . . $ uint32_t# curr_delcxx . . $ grn_pat_header#curr_del.; |
| 72 | uint32_tcxx . . $ uint32_t# curr_del2cxx . . $ grn_pat_header#curr_del2.; |
| 73 | uint32_tcxx . . $ uint32_t# curr_del3cxx . . $ grn_pat_header#curr_del3.; |
| 74 | uint32_tcxx . . $ uint32_t# n_garbagescxx . . $ grn_pat_header#n_garbages.; |
| 75 | grn_idcxx . . $ grn_id# normalizercxx . . $ grn_pat_header#normalizer.; |
| 76 | uint32_tcxx . . $ uint32_t# truncatedcxx . . $ grn_pat_header#truncated.; |
| 77 | uint32_tcxx . . $ uint32_t# n_dirty_openscxx . . $ grn_pat_header#n_dirty_opens.; |
| 78 | uint64_tcxx . . $ uint64_t# wal_idcxx . . $ grn_pat_header#wal_id.; |
| 79 | uint64_tcxx . . $ uint64_t# curr_key_largecxx . . $ grn_pat_header#curr_key_large.; |
| 80 | uint32_tcxx . . $ uint32_t# reservedcxx . . $ grn_pat_header#reserved.[998]; |
| 81 | grn_pat_delinfocxx . . $ grn_pat_delinfo# delinfoscxx . . $ grn_pat_header#delinfos.[GRN_PAT_NDELINFOScxx . . $ `lib/grn_pat.h:52:9`!]; |
| 82 | grn_idcxx . . $ grn_id# garbagescxx . . $ grn_pat_header#garbages.[GRN_PAT_MAX_KEY_SIZEcxx . . $ `lib/grn_pat.h:31:9`! + 1]; |
| 83 | }; |
| 84 | |
| 85 | struct _grn_pat_cursor_entrycxx . . $ _grn_pat_cursor_entry# { |
| 86 | grn_idcxx . . $ grn_id# idcxx . . $ _grn_pat_cursor_entry#id.; |
| 87 | uint16_tcxx . . $ uint16_t# checkcxx . . $ _grn_pat_cursor_entry#check.; |
| 88 | }; |
| 89 | |
| 90 | typedef struct _grn_pat_cursor_entrycxx . . $ _grn_pat_cursor_entry# grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry#; |
| 91 | |
| 92 | struct _grn_pat_cursorcxx . . $ _grn_pat_cursor# { |
| 93 | grn_db_objcxx . . $ grn_db_obj# objcxx . . $ _grn_pat_cursor#obj.; |
| 94 | grn_idcxx . . $ grn_id# curr_reccxx . . $ _grn_pat_cursor#curr_rec.; /* ID of the latest record */ |
| 95 | grn_patcxx . . $ grn_pat# *patcxx . . $ _grn_pat_cursor#pat.; |
| 96 | grn_ctxcxx . . $ grn_ctx# *ctxcxx . . $ _grn_pat_cursor#ctx.; |
| 97 | uint32_tcxx . . $ uint32_t# sizecxx . . $ _grn_pat_cursor#size.; /* stack size (the maximum number of entries) */ |
| 98 | uint32_tcxx . . $ uint32_t# spcxx . . $ _grn_pat_cursor#sp.; /* stack pointer (the number of entries) */ |
| 99 | grn_idcxx . . $ grn_id# tailcxx . . $ _grn_pat_cursor#tail.; /* sentinel (the end of the traversal) */ |
| 100 | uint32_tcxx . . $ uint32_t# restcxx . . $ _grn_pat_cursor#rest.; /* limit rest (the number of remaining records) */ |
| 101 | grn_pat_cursor_entrycxx . . $ grn_pat_cursor_entry# *sscxx . . $ _grn_pat_cursor#ss.; /* stack buffer (pointer to entries) */ |
| 102 | uint8_tcxx . . $ uint8_t# curr_keycxx . . $ _grn_pat_cursor#curr_key.[GRN_TABLE_MAX_KEY_SIZEcxx . . $ `include/groonga/table.h:26:9`!]; |
| 103 | }; |
| 104 | |
| 105 | GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_idcxx . . $ grn_id# |
| 106 | grn_pat_curr_idcxx . . $ grn_pat_curr_id(801003d623e3bbf5).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 107 | |
| 108 | /* private */ |
| 109 | GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_rccxx . . $ grn_rc# |
| 110 | grn_pat_truncatecxx . . $ grn_pat_truncate(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 111 | const char * |
| 112 | _grn_pat_keycxx . . $ _grn_pat_key(5b74e3d4f3bf1aa4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *key_size); |
| 113 | grn_idcxx . . $ grn_id# |
| 114 | grn_pat_nextcxx . . $ grn_pat_next(c27224444ab48125).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id); |
| 115 | const char * |
| 116 | grn_pat_get_value_cxx . . $ grn_pat_get_value_(5b74e3d4f3bf1aa4).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id, uint32_tcxx . . $ uint32_t# *size); |
| 117 | GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_idcxx . . $ grn_id# |
| 118 | grn_pat_atcxx . . $ grn_pat_at(c27224444ab48125).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_idcxx . . $ grn_id# id); |
| 119 | void |
| 120 | grn_pat_checkcxx . . $ grn_pat_check(ff189d7ae511a139).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 121 | void |
| 122 | grn_pat_inspect_nodescxx . . $ grn_pat_inspect_nodes(542fb80be6c64613).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, grn_objcxx . . $ grn_obj# *buf); |
| 123 | void |
| 124 | grn_pat_cursor_inspectcxx . . $ grn_pat_cursor_inspect(b7bb675372818c70).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_pat_cursorcxx . . $ grn_pat_cursor# *c, grn_objcxx . . $ grn_obj# *buf); |
| 125 | |
| 126 | grn_rccxx . . $ grn_rc# |
| 127 | grn_pat_cache_enablecxx . . $ grn_pat_cache_enable(39634e5b6eb066c6).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat, uint32_tcxx . . $ uint32_t# cache_size); |
| 128 | void |
| 129 | grn_pat_cache_disablecxx . . $ grn_pat_cache_disable(ff189d7ae511a139).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 130 | |
| 131 | GRN_APIcxx . . $ `lib/grn.h:84:13`! grn_rccxx . . $ grn_rc# |
| 132 | grn_pat_fuzzy_searchcxx . . $ grn_pat_fuzzy_search(75e4f8a949dfaa71).(grn_ctxcxx . . $ grn_ctx# *ctx, |
| 133 | grn_patcxx . . $ grn_pat# *pat, |
| 134 | const void *key, |
| 135 | unsigned int key_size, |
| 136 | grn_fuzzy_search_optargcxx . . $ grn_fuzzy_search_optarg# *args, |
| 137 | grn_hashcxx . . $ grn_hash# *h); |
| 138 | |
| 139 | uint64_tcxx . . $ uint64_t# |
| 140 | grn_pat_total_key_sizecxx . . $ grn_pat_total_key_size(3626315f4fc444a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 141 | uint64_tcxx . . $ uint64_t# |
| 142 | grn_pat_max_total_key_sizecxx . . $ grn_pat_max_total_key_size(3626315f4fc444a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 143 | |
| 144 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! |
| 145 | grn_pat_is_key_encodedcxx . . $ grn_pat_is_key_encoded(dc1a7a7f3d29367f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 146 | |
| 147 | grn_rccxx . . $ grn_rc# |
| 148 | grn_pat_dirtycxx . . $ grn_pat_dirty(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 149 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! |
| 150 | grn_pat_is_dirtycxx . . $ grn_pat_is_dirty(dc1a7a7f3d29367f).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 151 | grn_rccxx . . $ grn_rc# |
| 152 | grn_pat_cleancxx . . $ grn_pat_clean(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 153 | grn_rccxx . . $ grn_rc# |
| 154 | grn_pat_clear_dirtycxx . . $ grn_pat_clear_dirty(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 155 | grn_rccxx . . $ grn_rc# |
| 156 | grn_pat_wal_recovercxx . . $ grn_pat_wal_recover(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 157 | grn_rccxx . . $ grn_rc# |
| 158 | grn_pat_warmcxx . . $ grn_pat_warm(6044f5e1d38adedf).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 159 | uint64_tcxx . . $ uint64_t# |
| 160 | grn_pat_defragcxx . . $ grn_pat_defrag(3626315f4fc444a).(grn_ctxcxx . . $ grn_ctx# *ctx, grn_patcxx . . $ grn_pat# *pat); |
| 161 | |
| 162 | #ifdef __cpluspluscxx . . $ `<built-in>:470:9`! |
| 163 | } |
| 164 | #endif |