Debian Codegraph @

storage/innobase/include/fts0plugin.h

raw
1 /*****************************************************************************
2
3 Copyright (c) 2013, 2026, Oracle and/or its affiliates.
4
5 This program is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License, version 2.0, as published by the
7 Free Software Foundation.
8
9 This program is designed to work with certain software (including
10 but not limited to OpenSSL) that is licensed under separate terms,
11 as designated in a particular file or component or in included license
12 documentation. The authors of MySQL hereby grant you an additional
13 permission to link the program and your derivative works with the
14 separately licensed software that they have either included with
15 the program or referenced in the documentation.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20 for more details.
21
22 You should have received a copy of the GNU General Public License along with
23 this program; if not, write to the Free Software Foundation, Inc.,
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26 *****************************************************************************/
27
28 /** @file include/fts0plugin.h
29 Full text search plugin header file
30
31 Created 2013/06/04 Shaohua Wang
32 ***********************************************************************/
33
34 #ifndef INNOBASE_FTS0PLUGIN_H
35 #define INNOBASE_FTS0PLUGIN_H
36
37 #include "ha_prototypes.h"
38
39 extern struct st_mysql_ftparser fts_default_parser;
40
41 struct fts_ast_state_t;
42
43 #define PARSER_INIT(parser, arg) \
44 if (parser->init) { \
45 parser->init(arg); \
46 }
47 #define PARSER_DEINIT(parser, arg) \
48 if (parser->deinit) { \
49 parser->deinit(arg); \
50 }
51
52 /** fts parse query by plugin parser.
53 @return 0 if parse successfully, or return non-zero. */
54 int fts_parse_by_parser(bool mode, /*!< in: query boolean mode */
55 uchar *query, /*!< in: query string */
56 ulint len, /*!< in: query string length */
57 st_mysql_ftparser *parse, /*!< in: fts plugin parser */
58 fts_ast_state_t *state); /*!< in: query parser state */
59
60 #endif /* INNOBASE_FTS0PLUGIN_H */