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