1 /* 2 Copyright(C) 2009-2017 Brazil 3 Copyright(C) 2020 Sutou Kouhei <kou@clear-code.com> 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 module groonga_d.operator; 20 21 22 private static import groonga_d.groonga; 23 24 extern(C): 25 nothrow @nogc: 26 27 //typedef ubyte grn_operator_exec_func(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 28 alias grn_operator_exec_func = extern (C) nothrow @nogc groonga_d.groonga.grn_bool function(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 29 30 //GRN_API 31 const (char)* grn_operator_to_string(groonga_d.groonga.grn_operator op); 32 33 //GRN_API 34 const (char)* grn_operator_to_script_syntax(groonga_d.groonga.grn_operator op); 35 36 //GRN_API 37 grn_operator_exec_func* grn_operator_to_exec_func(groonga_d.groonga.grn_operator op); 38 39 //GRN_API 40 groonga_d.groonga.grn_bool grn_operator_exec_equal(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 41 42 //GRN_API 43 groonga_d.groonga.grn_bool grn_operator_exec_not_equal(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 44 45 //GRN_API 46 groonga_d.groonga.grn_bool grn_operator_exec_less(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 47 48 //GRN_API 49 groonga_d.groonga.grn_bool grn_operator_exec_greater(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 50 51 //GRN_API 52 groonga_d.groonga.grn_bool grn_operator_exec_less_equal(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 53 54 //GRN_API 55 groonga_d.groonga.grn_bool grn_operator_exec_greater_equal(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* x, groonga_d.groonga.grn_obj* y); 56 57 //GRN_API 58 groonga_d.groonga.grn_bool grn_operator_exec_match(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* target, groonga_d.groonga.grn_obj* sub_text); 59 60 //GRN_API 61 groonga_d.groonga.grn_bool grn_operator_exec_prefix(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* target, groonga_d.groonga.grn_obj* prefix); 62 63 //GRN_API 64 groonga_d.groonga.grn_bool grn_operator_exec_regexp(groonga_d.groonga.grn_ctx* ctx, groonga_d.groonga.grn_obj* target, groonga_d.groonga.grn_obj* pattern);