1 /*
2   Copyright(C) 2009-2017 Brazil
3 
4   This library is free software; you can redistribute it and/or
5   modify it under the terms of the GNU Lesser General Public
6   License as published by the Free Software Foundation; either
7   version 2.1 of the License, or (at your option) any later version.
8 
9   This library is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12   Lesser General Public License for more details.
13 
14   You should have received a copy of the GNU Lesser General Public
15   License along with this library; if not, write to the Free Software
16   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1335  USA
17 */
18 
19 #pragma once
20 
21 #ifdef  __cplusplus
22 extern "C" {
23 #endif
24 
25 typedef grn_bool grn_operator_exec_func(grn_ctx *ctx,
26                                         grn_obj *x,
27                                         grn_obj *y);
28 
29 GRN_API const char *grn_operator_to_string(grn_operator op);
30 GRN_API grn_operator_exec_func *grn_operator_to_exec_func(grn_operator op);
31 GRN_API grn_bool grn_operator_exec_equal(grn_ctx *ctx, grn_obj *x, grn_obj *y);
32 GRN_API grn_bool grn_operator_exec_not_equal(grn_ctx *ctx,
33                                              grn_obj *x, grn_obj *y);
34 GRN_API grn_bool grn_operator_exec_less(grn_ctx *ctx, grn_obj *x, grn_obj *y);
35 GRN_API grn_bool grn_operator_exec_greater(grn_ctx *ctx, grn_obj *x, grn_obj *y);
36 GRN_API grn_bool grn_operator_exec_less_equal(grn_ctx *ctx,
37                                               grn_obj *x, grn_obj *y);
38 GRN_API grn_bool grn_operator_exec_greater_equal(grn_ctx *ctx,
39                                                  grn_obj *x, grn_obj *y);
40 GRN_API grn_bool grn_operator_exec_match(grn_ctx *ctx,
41                                          grn_obj *target, grn_obj *sub_text);
42 GRN_API grn_bool grn_operator_exec_prefix(grn_ctx *ctx,
43                                           grn_obj *target, grn_obj *prefix);
44 GRN_API grn_bool grn_operator_exec_regexp(grn_ctx *ctx,
45                                           grn_obj *target, grn_obj *pattern);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50