rroonga 1.0.8 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. data/NEWS.ja.rdoc +47 -0
  2. data/NEWS.rdoc +48 -0
  3. data/README.ja.rdoc +1 -0
  4. data/README.rdoc +1 -0
  5. data/Rakefile +32 -13
  6. data/benchmark/create-wikipedia-database.rb +212 -0
  7. data/benchmark/repeat-load.rb +213 -0
  8. data/benchmark/select.rb +1052 -0
  9. data/ext/groonga/mkmf.log +99 -0
  10. data/ext/groonga/rb-grn-column.c +57 -6
  11. data/ext/groonga/rb-grn-context.c +15 -9
  12. data/ext/groonga/rb-grn-expression.c +7 -7
  13. data/ext/groonga/{rb-grn-operation.c → rb-grn-operator.c} +89 -87
  14. data/ext/groonga/rb-grn-patricia-trie.c +5 -5
  15. data/ext/groonga/rb-grn-query.c +4 -4
  16. data/ext/groonga/rb-grn-table.c +16 -19
  17. data/ext/groonga/rb-grn.h +3 -3
  18. data/ext/groonga/rb-groonga.c +1 -1
  19. data/html/index.html +4 -4
  20. data/lib/groonga/context.rb +34 -0
  21. data/lib/groonga/expression-builder.rb +34 -2
  22. data/lib/groonga/record.rb +8 -6
  23. data/lib/groonga/schema.rb +40 -4
  24. data/rroonga-build.rb +2 -2
  25. data/test-unit/Rakefile +5 -18
  26. data/test-unit/html/classic.html +15 -0
  27. data/test-unit/html/index.html +13 -235
  28. data/test-unit/html/index.html.ja +15 -258
  29. data/test-unit/lib/test/unit.rb +1 -6
  30. data/test-unit/lib/test/unit/assertions.rb +11 -115
  31. data/test-unit/lib/test/unit/autorunner.rb +2 -5
  32. data/test-unit/lib/test/unit/collector/load.rb +1 -1
  33. data/test-unit/lib/test/unit/color-scheme.rb +2 -6
  34. data/test-unit/lib/test/unit/diff.rb +1 -17
  35. data/test-unit/lib/test/unit/testcase.rb +0 -7
  36. data/test-unit/lib/test/unit/testresult.rb +2 -34
  37. data/test-unit/lib/test/unit/ui/console/testrunner.rb +45 -9
  38. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +12 -2
  39. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -25
  40. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -1
  41. data/test-unit/lib/test/unit/version.rb +1 -1
  42. data/test-unit/test/test-color-scheme.rb +2 -4
  43. data/test-unit/test/test_assertions.rb +5 -51
  44. data/test/test-column.rb +31 -1
  45. data/test/test-context-select.rb +45 -14
  46. data/test/test-context.rb +36 -0
  47. data/test/test-database.rb +13 -0
  48. data/test/test-expression-builder.rb +32 -5
  49. data/test/test-record.rb +34 -1
  50. data/test/test-schema.rb +52 -2
  51. data/test/test-table-select-weight.rb +20 -1
  52. data/test/test-table.rb +58 -0
  53. metadata +13 -41
  54. data/test-unit-notify/Rakefile +0 -47
  55. data/test-unit-notify/lib/test/unit/notify.rb +0 -104
  56. data/test-unit/COPYING +0 -56
  57. data/test-unit/GPL +0 -340
  58. data/test-unit/PSFL +0 -271
  59. data/test-unit/html/bar.svg +0 -153
  60. data/test-unit/html/developer.svg +0 -469
  61. data/test-unit/html/favicon.ico +0 -0
  62. data/test-unit/html/favicon.svg +0 -82
  63. data/test-unit/html/heading-mark.svg +0 -393
  64. data/test-unit/html/install.svg +0 -636
  65. data/test-unit/html/logo.svg +0 -483
  66. data/test-unit/html/test-unit.css +0 -339
  67. data/test-unit/html/tutorial.svg +0 -559
  68. data/test-unit/lib/test/unit/util/output.rb +0 -31
  69. data/test-unit/test/ui/test_tap.rb +0 -33
  70. data/test-unit/test/util/test-output.rb +0 -11
@@ -0,0 +1,99 @@
1
+ checking for GCC... -------------------- yes
2
+
3
+ "gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -c conftest.c"
4
+ checked program was:
5
+ /* begin */
6
+ 1: /*top*/
7
+ 2: #ifndef __GNUC__
8
+ 3: # error
9
+ 4: >>>>>> __GNUC__ undefined <<<<<<
10
+ 5: #endif
11
+ /* end */
12
+
13
+ --------------------
14
+
15
+ checking for Win32 OS... -------------------- no
16
+
17
+ --------------------
18
+
19
+ have_macro: checking for HAVE_RUBY_ST_H in ruby.h... -------------------- no
20
+
21
+ "gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga -c conftest.c"
22
+ conftest.c:4:3: error: #error
23
+ conftest.c:5: error: expected identifier or ‘(’ before ‘>>’ token
24
+ checked program was:
25
+ /* begin */
26
+ 1: #include <ruby.h>
27
+ 2: /*top*/
28
+ 3: #ifndef HAVE_RUBY_ST_H
29
+ 4: # error
30
+ 5: >>>>>> HAVE_RUBY_ST_H undefined <<<<<<
31
+ 6: #endif
32
+ /* end */
33
+
34
+ --------------------
35
+
36
+ have_header: checking for ruby/st.h... -------------------- no
37
+
38
+ "gcc -E -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga conftest.c -o conftest.i"
39
+ conftest.c:1:21: error: ruby/st.h: そのようなファイルやディレクトリはありません
40
+ checked program was:
41
+ /* begin */
42
+ 1: #include <ruby/st.h>
43
+ /* end */
44
+
45
+ --------------------
46
+
47
+ have_func: checking for rb_errinfo() in ruby.h... -------------------- no
48
+
49
+ "gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/tmp/local/lib -lgroonga -lruby1.8-static -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc"
50
+ conftest.c: In function ‘t’:
51
+ conftest.c:5: error: ‘rb_errinfo’ undeclared (first use in this function)
52
+ conftest.c:5: error: (Each undeclared identifier is reported only once
53
+ conftest.c:5: error: for each function it appears in.)
54
+ checked program was:
55
+ /* begin */
56
+ 1: #include <ruby.h>
57
+ 2:
58
+ 3: /*top*/
59
+ 4: int main() { return 0; }
60
+ 5: int t() { void ((*volatile p)()); p = (void ((*)()))rb_errinfo; return 0; }
61
+ /* end */
62
+
63
+ "gcc -o conftest -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga conftest.c -L. -L/usr/lib -L. -rdynamic -Wl,-export-dynamic -L/tmp/local/lib -lgroonga -lruby1.8-static -lgroonga -lpthread -lrt -ldl -lcrypt -lm -lc"
64
+ conftest.c: In function ‘t’:
65
+ conftest.c:5: warning: implicit declaration of function ‘rb_errinfo’
66
+ /tmp/ccjMtfaX.o: In function `t':
67
+ /home/kou/work/ruby/rroonga.18/ext/groonga/conftest.c:5: undefined reference to `rb_errinfo'
68
+ collect2: ld returned 1 exit status
69
+ checked program was:
70
+ /* begin */
71
+ 1: #include <ruby.h>
72
+ 2:
73
+ 3: /*top*/
74
+ 4: int main() { return 0; }
75
+ 5: int t() { rb_errinfo(); return 0; }
76
+ /* end */
77
+
78
+ --------------------
79
+
80
+ have_type: checking for enum ruby_value_type in ruby.h... -------------------- no
81
+
82
+ "gcc -I. -I/usr/lib/ruby/1.8/x86_64-linux -I/home/kou/work/ruby/rroonga.18/ext/groonga -fno-strict-aliasing -g -g -O2 -fPIC -Wall -I/tmp/local/include/groonga -c conftest.c"
83
+ conftest.c:5: error: invalid application of ‘sizeof’ to incomplete type ‘conftest_type’
84
+ conftest.c:5: error: size of array ‘conftestval’ is negative
85
+ checked program was:
86
+ /* begin */
87
+ 1: #include <ruby.h>
88
+ 2:
89
+ 3: /*top*/
90
+ 4: typedef enum ruby_value_type conftest_type;
91
+ 5: int conftestval[sizeof(conftest_type)?1:-1];
92
+ /* end */
93
+
94
+ --------------------
95
+
96
+ checking for debug flag... -------------------- no
97
+
98
+ --------------------
99
+
@@ -1,7 +1,7 @@
1
1
  /* -*- c-file-style: "ruby" -*- */
2
2
  /* vim: set sts=4 sw=4 ts=8 noet: */
3
3
  /*
4
- Copyright (C) 2009-2010 Kouhei Sutou <kou@clear-code.com>
4
+ Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
5
5
 
6
6
  This library is free software; you can redistribute it and/or
7
7
  modify it under the terms of the GNU Lesser General Public
@@ -235,17 +235,17 @@ rb_grn_column_get_local_name (VALUE self)
235
235
  *
236
236
  * [+:operator+]
237
237
  * マッチしたレコードをどのように扱うか。指定可能な値は以
238
- * 下の通り。省略した場合はGroonga::Operation::OR。
238
+ * 下の通り。省略した場合はGroonga::Operator::OR。
239
239
  *
240
- * [Groonga::Operation::OR]
240
+ * [Groonga::Operator::OR]
241
241
  * マッチしたレコードを追加。すでにレコードが追加され
242
242
  * ている場合は何もしない。
243
- * [Groonga::Operation::AND]
243
+ * [Groonga::Operator::AND]
244
244
  * マッチしたレコードのスコアを増加。マッチしなかった
245
245
  * レコードを削除。
246
- * [Groonga::Operation::BUT]
246
+ * [Groonga::Operator::BUT]
247
247
  * マッチしたレコードを削除。
248
- * [Groonga::Operation::ADJUST]
248
+ * [Groonga::Operator::ADJUST]
249
249
  * マッチしたレコードのスコアを増加。
250
250
  *
251
251
  * [+:result+]
@@ -684,6 +684,55 @@ rb_grn_column_scalar_p (VALUE self)
684
684
  }
685
685
  }
686
686
 
687
+ /*
688
+ * Document-method: indexes
689
+ *
690
+ * call-seq:
691
+ * column.indexes(operator=Groonga::Operator::MATCH) -> [index_column, ...]
692
+ *
693
+ * _operation_を実行できる_column_のインデックスを返す。
694
+ *
695
+ * @since: 1.0.9
696
+ */
697
+ static VALUE
698
+ rb_grn_column_get_indexes (int argc, VALUE *argv, VALUE self)
699
+ {
700
+ grn_ctx *context;
701
+ grn_obj *column;
702
+ grn_obj **indexes = NULL;
703
+ int i, n_indexes;
704
+ grn_operator operator = GRN_OP_MATCH;
705
+ VALUE rb_operator, rb_indexes;
706
+
707
+ rb_scan_args(argc, argv, "01", &rb_operator);
708
+
709
+ rb_grn_column_deconstruct(SELF(self), &column, &context,
710
+ NULL, NULL,
711
+ NULL, NULL, NULL);
712
+
713
+ if (!NIL_P(rb_operator)) {
714
+ operator = RVAL2GRNOPERATOR(rb_operator);
715
+ }
716
+
717
+ rb_indexes = rb_ary_new();
718
+ n_indexes = grn_column_index(context, column, operator,
719
+ NULL, 0, NULL);
720
+ if (n_indexes == 0)
721
+ return rb_indexes;
722
+
723
+ indexes = xmalloc(sizeof(grn_obj *) * n_indexes);
724
+ n_indexes = grn_column_index(context, column, operator,
725
+ indexes, n_indexes, NULL);
726
+ for (i = 0; i < n_indexes; i++) {
727
+ VALUE rb_index;
728
+ rb_index = GRNOBJECT2RVAL(Qnil, context, indexes[i], GRN_FALSE);
729
+ rb_ary_push(rb_indexes, rb_index);
730
+ grn_obj_unlink(context, indexes[i]);
731
+ }
732
+ xfree(indexes);
733
+ return rb_indexes;
734
+ }
735
+
687
736
  void
688
737
  rb_grn_init_column (VALUE mGrn)
689
738
  {
@@ -707,6 +756,8 @@ rb_grn_init_column (VALUE mGrn)
707
756
  rb_define_method(rb_cGrnColumn, "vector?", rb_grn_column_vector_p, 0);
708
757
  rb_define_method(rb_cGrnColumn, "scalar?", rb_grn_column_scalar_p, 0);
709
758
 
759
+ rb_define_method(rb_cGrnColumn, "indexes", rb_grn_column_get_indexes, -1);
760
+
710
761
  rb_grn_init_fix_size_column(mGrn);
711
762
  rb_grn_init_variable_size_column(mGrn);
712
763
  rb_grn_init_index_column(mGrn);
@@ -370,15 +370,21 @@ rb_grn_context_inspect (VALUE self)
370
370
  rb_str_concat(inspected, rb_inspect(rb_obj_class(self)));
371
371
  rb_str_cat2(inspected, " ");
372
372
 
373
- rb_str_cat2(inspected, "encoding: <");
374
- rb_str_concat(inspected, rb_inspect(GRNENCODING2RVAL(context->encoding)));
375
- rb_str_cat2(inspected, ">, ");
376
-
377
- rb_str_cat2(inspected, "database: <");
378
- database = grn_ctx_db(context);
379
- rb_database = GRNDB2RVAL(context, database, GRN_FALSE);
380
- rb_str_concat(inspected, rb_inspect(rb_database));
381
- rb_str_cat2(inspected, ">");
373
+ if (rb_grn_exited) {
374
+ rb_str_cat2(inspected, "(finished)");
375
+ } else if (context) {
376
+ rb_str_cat2(inspected, "encoding: <");
377
+ rb_str_concat(inspected, rb_inspect(GRNENCODING2RVAL(context->encoding)));
378
+ rb_str_cat2(inspected, ">, ");
379
+
380
+ rb_str_cat2(inspected, "database: <");
381
+ database = grn_ctx_db(context);
382
+ rb_database = GRNDB2RVAL(context, database, GRN_FALSE);
383
+ rb_str_concat(inspected, rb_inspect(rb_database));
384
+ rb_str_cat2(inspected, ">");
385
+ } else {
386
+ rb_str_cat2(inspected, "(closed)");
387
+ }
382
388
 
383
389
  rb_str_cat2(inspected, ">");
384
390
  return inspected;
@@ -157,7 +157,7 @@ rb_grn_expression_define_variable (int argc, VALUE *argv, VALUE self)
157
157
  /*
158
158
  * call-seq:
159
159
  * expression.append_object(object,
160
- * operation=Groonga::Operation::PUSH,
160
+ * operation=Groonga::Operator::PUSH,
161
161
  * n_arguments=1) -> self
162
162
  *
163
163
  * _object_を追加し、_n_arguments_個の引数を取る_operation_を追加する。
@@ -193,7 +193,7 @@ rb_grn_expression_append_object (int argc, VALUE *argv, VALUE self)
193
193
  /*
194
194
  * call-seq:
195
195
  * expression.append_constant(constant,
196
- * operation=Groonga::Operation::PUSH,
196
+ * operation=Groonga::Operator::PUSH,
197
197
  * n_arguments=1) -> self
198
198
  *
199
199
  * _constant_を追加し、_n_arguments_個の引数を取る_operation_を追加する。
@@ -270,19 +270,19 @@ rb_grn_expression_append_operation (VALUE self, VALUE rb_operation,
270
270
  * [+:default_operator+]
271
271
  * "+"や"OR"で繋がれず、ただ列挙された複数の条件があった時、
272
272
  * _expression_全体として各レコードをヒットとみなすかの論理
273
- * 条件を指定する。省略した場合はGroonga::Operation::AND。
273
+ * 条件を指定する。省略した場合はGroonga::Operator::AND。
274
274
  *
275
- * [Groonga::Operation::OR]
275
+ * [Groonga::Operator::OR]
276
276
  * レコードはいずれかの条件にマッチすればいい。
277
- * [Groonga::Operation::AND]
277
+ * [Groonga::Operator::AND]
278
278
  * レコードは全ての条件にマッチしなければならない。
279
- * [Groonga::Operation::BUT]
279
+ * [Groonga::Operator::BUT]
280
280
  * 最初の条件にレコードはマッチし、残りの条件にレコードは
281
281
  * マッチしてはならない。
282
282
  *
283
283
  * [+:default_mode+]
284
284
  * 検索時のモードを指定する。省略した場合は
285
- * Groonga::Operation::MATCH。(FIXME: モードによってどう
285
+ * Groonga::Operator::MATCH。(FIXME: モードによってどう
286
286
  * いう動作になるかを書く。)
287
287
  *
288
288
  * [+:syntax+]
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby" -*- */
2
2
  /*
3
- Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
3
+ Copyright (C) 2009-2011 Kouhei Sutou <kou@clear-code.com>
4
4
 
5
5
  This library is free software; you can redistribute it and/or
6
6
  modify it under the terms of the GNU Lesser General Public
@@ -18,181 +18,183 @@
18
18
 
19
19
  #include "rb-grn.h"
20
20
 
21
- VALUE rb_mGrnOperation;
21
+ VALUE rb_mGrnOperator;
22
22
 
23
23
  void
24
- rb_grn_init_operation (VALUE mGrn)
24
+ rb_grn_init_operator (VALUE mGrn)
25
25
  {
26
- rb_mGrnOperation = rb_define_module_under(mGrn, "Operation");
26
+ rb_mGrnOperator = rb_define_module_under(mGrn, "Operator");
27
+ /* deprecated: backward compatibility. */
28
+ rb_define_const(mGrn, "Operation", rb_mGrnOperator);
27
29
 
28
- rb_define_const(rb_mGrnOperation, "PUSH",
30
+ rb_define_const(rb_mGrnOperator, "PUSH",
29
31
  UINT2NUM(GRN_OP_PUSH));
30
- rb_define_const(rb_mGrnOperation, "POP",
32
+ rb_define_const(rb_mGrnOperator, "POP",
31
33
  UINT2NUM(GRN_OP_POP));
32
- rb_define_const(rb_mGrnOperation, "NO_OPERATION",
34
+ rb_define_const(rb_mGrnOperator, "NO_OPERATION",
33
35
  UINT2NUM(GRN_OP_NOP));
34
- rb_define_const(rb_mGrnOperation, "CALL",
36
+ rb_define_const(rb_mGrnOperator, "CALL",
35
37
  UINT2NUM(GRN_OP_CALL));
36
- rb_define_const(rb_mGrnOperation, "INTERN",
38
+ rb_define_const(rb_mGrnOperator, "INTERN",
37
39
  UINT2NUM(GRN_OP_INTERN));
38
- rb_define_const(rb_mGrnOperation, "GET_REFERENCE",
40
+ rb_define_const(rb_mGrnOperator, "GET_REFERENCE",
39
41
  UINT2NUM(GRN_OP_GET_REF));
40
- rb_define_const(rb_mGrnOperation, "GET_VALUE",
42
+ rb_define_const(rb_mGrnOperator, "GET_VALUE",
41
43
  UINT2NUM(GRN_OP_GET_VALUE));
42
- rb_define_const(rb_mGrnOperation, "AND",
44
+ rb_define_const(rb_mGrnOperator, "AND",
43
45
  UINT2NUM(GRN_OP_AND));
44
- rb_define_const(rb_mGrnOperation, "BUT",
46
+ rb_define_const(rb_mGrnOperator, "BUT",
45
47
  UINT2NUM(GRN_OP_BUT));
46
- rb_define_const(rb_mGrnOperation, "OR",
48
+ rb_define_const(rb_mGrnOperator, "OR",
47
49
  UINT2NUM(GRN_OP_OR));
48
- rb_define_const(rb_mGrnOperation, "ASSIGN",
50
+ rb_define_const(rb_mGrnOperator, "ASSIGN",
49
51
  UINT2NUM(GRN_OP_ASSIGN));
50
- rb_define_const(rb_mGrnOperation, "STAR_ASSIGN",
52
+ rb_define_const(rb_mGrnOperator, "STAR_ASSIGN",
51
53
  UINT2NUM(GRN_OP_STAR_ASSIGN));
52
- rb_define_const(rb_mGrnOperation, "SLASH_ASSIGN",
54
+ rb_define_const(rb_mGrnOperator, "SLASH_ASSIGN",
53
55
  UINT2NUM(GRN_OP_SLASH_ASSIGN));
54
- rb_define_const(rb_mGrnOperation, "MODULO_ASSIGN",
56
+ rb_define_const(rb_mGrnOperator, "MODULO_ASSIGN",
55
57
  UINT2NUM(GRN_OP_MOD_ASSIGN));
56
- rb_define_const(rb_mGrnOperation, "PLUS_ASSIGN",
58
+ rb_define_const(rb_mGrnOperator, "PLUS_ASSIGN",
57
59
  UINT2NUM(GRN_OP_PLUS_ASSIGN));
58
- rb_define_const(rb_mGrnOperation, "MINUS_ASSIGN",
60
+ rb_define_const(rb_mGrnOperator, "MINUS_ASSIGN",
59
61
  UINT2NUM(GRN_OP_MINUS_ASSIGN));
60
- rb_define_const(rb_mGrnOperation, "SHIFTL_ASSIGN",
62
+ rb_define_const(rb_mGrnOperator, "SHIFTL_ASSIGN",
61
63
  UINT2NUM(GRN_OP_SHIFTL_ASSIGN));
62
- rb_define_const(rb_mGrnOperation, "SHIRTR_ASSIGN",
64
+ rb_define_const(rb_mGrnOperator, "SHIRTR_ASSIGN",
63
65
  UINT2NUM(GRN_OP_SHIFTR_ASSIGN));
64
- rb_define_const(rb_mGrnOperation, "SHIFTRR_ASSIGN",
66
+ rb_define_const(rb_mGrnOperator, "SHIFTRR_ASSIGN",
65
67
  UINT2NUM(GRN_OP_SHIFTRR_ASSIGN));
66
- rb_define_const(rb_mGrnOperation, "AND_ASSIGN",
68
+ rb_define_const(rb_mGrnOperator, "AND_ASSIGN",
67
69
  UINT2NUM(GRN_OP_AND_ASSIGN));
68
- rb_define_const(rb_mGrnOperation, "XOR_ASSIGN",
70
+ rb_define_const(rb_mGrnOperator, "XOR_ASSIGN",
69
71
  UINT2NUM(GRN_OP_XOR_ASSIGN));
70
- rb_define_const(rb_mGrnOperation, "OR_ASSIGN",
72
+ rb_define_const(rb_mGrnOperator, "OR_ASSIGN",
71
73
  UINT2NUM(GRN_OP_OR_ASSIGN));
72
- rb_define_const(rb_mGrnOperation, "JUMP",
74
+ rb_define_const(rb_mGrnOperator, "JUMP",
73
75
  UINT2NUM(GRN_OP_JUMP));
74
- rb_define_const(rb_mGrnOperation, "CJUMP",
76
+ rb_define_const(rb_mGrnOperator, "CJUMP",
75
77
  UINT2NUM(GRN_OP_CJUMP));
76
- rb_define_const(rb_mGrnOperation, "COMMA",
78
+ rb_define_const(rb_mGrnOperator, "COMMA",
77
79
  UINT2NUM(GRN_OP_COMMA));
78
- rb_define_const(rb_mGrnOperation, "BITWISE_OR",
80
+ rb_define_const(rb_mGrnOperator, "BITWISE_OR",
79
81
  UINT2NUM(GRN_OP_BITWISE_OR));
80
- rb_define_const(rb_mGrnOperation, "BITWISE_XOR",
82
+ rb_define_const(rb_mGrnOperator, "BITWISE_XOR",
81
83
  UINT2NUM(GRN_OP_BITWISE_XOR));
82
- rb_define_const(rb_mGrnOperation, "BITWISE_AND",
84
+ rb_define_const(rb_mGrnOperator, "BITWISE_AND",
83
85
  UINT2NUM(GRN_OP_BITWISE_AND));
84
- rb_define_const(rb_mGrnOperation, "BITWISE_NOT",
86
+ rb_define_const(rb_mGrnOperator, "BITWISE_NOT",
85
87
  UINT2NUM(GRN_OP_BITWISE_NOT));
86
- rb_define_const(rb_mGrnOperation, "EQUAL",
88
+ rb_define_const(rb_mGrnOperator, "EQUAL",
87
89
  UINT2NUM(GRN_OP_EQUAL));
88
- rb_define_const(rb_mGrnOperation, "NOT_EQUAL",
90
+ rb_define_const(rb_mGrnOperator, "NOT_EQUAL",
89
91
  UINT2NUM(GRN_OP_NOT_EQUAL));
90
- rb_define_const(rb_mGrnOperation, "LESS",
92
+ rb_define_const(rb_mGrnOperator, "LESS",
91
93
  UINT2NUM(GRN_OP_LESS));
92
- rb_define_const(rb_mGrnOperation, "GREATER",
94
+ rb_define_const(rb_mGrnOperator, "GREATER",
93
95
  UINT2NUM(GRN_OP_GREATER));
94
- rb_define_const(rb_mGrnOperation, "LESS_EQUAL",
96
+ rb_define_const(rb_mGrnOperator, "LESS_EQUAL",
95
97
  UINT2NUM(GRN_OP_LESS_EQUAL));
96
- rb_define_const(rb_mGrnOperation, "GREATER_EQUAL",
98
+ rb_define_const(rb_mGrnOperator, "GREATER_EQUAL",
97
99
  UINT2NUM(GRN_OP_GREATER_EQUAL));
98
- rb_define_const(rb_mGrnOperation, "IN",
100
+ rb_define_const(rb_mGrnOperator, "IN",
99
101
  UINT2NUM(GRN_OP_IN));
100
- rb_define_const(rb_mGrnOperation, "MATCH",
102
+ rb_define_const(rb_mGrnOperator, "MATCH",
101
103
  UINT2NUM(GRN_OP_MATCH));
102
- rb_define_const(rb_mGrnOperation, "NEAR",
104
+ rb_define_const(rb_mGrnOperator, "NEAR",
103
105
  UINT2NUM(GRN_OP_NEAR));
104
- rb_define_const(rb_mGrnOperation, "NEAR2",
106
+ rb_define_const(rb_mGrnOperator, "NEAR2",
105
107
  UINT2NUM(GRN_OP_NEAR2));
106
- rb_define_const(rb_mGrnOperation, "SIMILAR",
108
+ rb_define_const(rb_mGrnOperator, "SIMILAR",
107
109
  UINT2NUM(GRN_OP_SIMILAR));
108
- rb_define_const(rb_mGrnOperation, "TERM_EXTRACT",
110
+ rb_define_const(rb_mGrnOperator, "TERM_EXTRACT",
109
111
  UINT2NUM(GRN_OP_TERM_EXTRACT));
110
- rb_define_const(rb_mGrnOperation, "SHIFTL",
112
+ rb_define_const(rb_mGrnOperator, "SHIFTL",
111
113
  UINT2NUM(GRN_OP_SHIFTL));
112
- rb_define_const(rb_mGrnOperation, "SHIFTR",
114
+ rb_define_const(rb_mGrnOperator, "SHIFTR",
113
115
  UINT2NUM(GRN_OP_SHIFTR));
114
- rb_define_const(rb_mGrnOperation, "SHIFTRR",
116
+ rb_define_const(rb_mGrnOperator, "SHIFTRR",
115
117
  UINT2NUM(GRN_OP_SHIFTRR));
116
- rb_define_const(rb_mGrnOperation, "PLUS",
118
+ rb_define_const(rb_mGrnOperator, "PLUS",
117
119
  UINT2NUM(GRN_OP_PLUS));
118
- rb_define_const(rb_mGrnOperation, "MINUS",
120
+ rb_define_const(rb_mGrnOperator, "MINUS",
119
121
  UINT2NUM(GRN_OP_MINUS));
120
- rb_define_const(rb_mGrnOperation, "STAR",
122
+ rb_define_const(rb_mGrnOperator, "STAR",
121
123
  UINT2NUM(GRN_OP_STAR));
122
- rb_define_const(rb_mGrnOperation, "SLASH",
124
+ rb_define_const(rb_mGrnOperator, "SLASH",
123
125
  UINT2NUM(GRN_OP_SLASH));
124
- rb_define_const(rb_mGrnOperation, "MODULO",
126
+ rb_define_const(rb_mGrnOperator, "MODULO",
125
127
  UINT2NUM(GRN_OP_MOD));
126
- rb_define_const(rb_mGrnOperation, "DELETE",
128
+ rb_define_const(rb_mGrnOperator, "DELETE",
127
129
  UINT2NUM(GRN_OP_DELETE));
128
- rb_define_const(rb_mGrnOperation, "INCREMENT",
130
+ rb_define_const(rb_mGrnOperator, "INCREMENT",
129
131
  UINT2NUM(GRN_OP_INCR));
130
- rb_define_const(rb_mGrnOperation, "DECREMENT",
132
+ rb_define_const(rb_mGrnOperator, "DECREMENT",
131
133
  UINT2NUM(GRN_OP_DECR));
132
- rb_define_const(rb_mGrnOperation, "INCREMENT_POST",
134
+ rb_define_const(rb_mGrnOperator, "INCREMENT_POST",
133
135
  UINT2NUM(GRN_OP_INCR_POST));
134
- rb_define_const(rb_mGrnOperation, "DECREMENT_POST",
136
+ rb_define_const(rb_mGrnOperator, "DECREMENT_POST",
135
137
  UINT2NUM(GRN_OP_DECR_POST));
136
- rb_define_const(rb_mGrnOperation, "NOT",
138
+ rb_define_const(rb_mGrnOperator, "NOT",
137
139
  UINT2NUM(GRN_OP_NOT));
138
- rb_define_const(rb_mGrnOperation, "ADJUST",
140
+ rb_define_const(rb_mGrnOperator, "ADJUST",
139
141
  UINT2NUM(GRN_OP_ADJUST));
140
- rb_define_const(rb_mGrnOperation, "EXACT",
142
+ rb_define_const(rb_mGrnOperator, "EXACT",
141
143
  UINT2NUM(GRN_OP_EXACT));
142
- rb_define_const(rb_mGrnOperation, "LONGEST_COMMON_PREFIX",
144
+ rb_define_const(rb_mGrnOperator, "LONGEST_COMMON_PREFIX",
143
145
  UINT2NUM(GRN_OP_LCP));
144
- rb_define_const(rb_mGrnOperation, "PARTIAL",
146
+ rb_define_const(rb_mGrnOperator, "PARTIAL",
145
147
  UINT2NUM(GRN_OP_PARTIAL));
146
- rb_define_const(rb_mGrnOperation, "UNSPLIT",
148
+ rb_define_const(rb_mGrnOperator, "UNSPLIT",
147
149
  UINT2NUM(GRN_OP_UNSPLIT));
148
- rb_define_const(rb_mGrnOperation, "PREFIX",
150
+ rb_define_const(rb_mGrnOperator, "PREFIX",
149
151
  UINT2NUM(GRN_OP_PREFIX));
150
- rb_define_const(rb_mGrnOperation, "SUFFIX",
152
+ rb_define_const(rb_mGrnOperator, "SUFFIX",
151
153
  UINT2NUM(GRN_OP_SUFFIX));
152
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE1",
154
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE1",
153
155
  UINT2NUM(GRN_OP_GEO_DISTANCE1));
154
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE2",
156
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE2",
155
157
  UINT2NUM(GRN_OP_GEO_DISTANCE2));
156
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE3",
158
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE3",
157
159
  UINT2NUM(GRN_OP_GEO_DISTANCE3));
158
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE4",
160
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE4",
159
161
  UINT2NUM(GRN_OP_GEO_DISTANCE4));
160
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP5",
162
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP5",
161
163
  UINT2NUM(GRN_OP_GEO_WITHINP5));
162
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP6",
164
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP6",
163
165
  UINT2NUM(GRN_OP_GEO_WITHINP6));
164
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP8",
166
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP8",
165
167
  UINT2NUM(GRN_OP_GEO_WITHINP8));
166
- rb_define_const(rb_mGrnOperation, "OBJECT_SEARCH",
168
+ rb_define_const(rb_mGrnOperator, "OBJECT_SEARCH",
167
169
  UINT2NUM(GRN_OP_OBJ_SEARCH));
168
- rb_define_const(rb_mGrnOperation, "EXPRESSION_GET_VARIABLE",
170
+ rb_define_const(rb_mGrnOperator, "EXPRESSION_GET_VARIABLE",
169
171
  UINT2NUM(GRN_OP_EXPR_GET_VAR));
170
- rb_define_const(rb_mGrnOperation, "TABLE_CREATE",
172
+ rb_define_const(rb_mGrnOperator, "TABLE_CREATE",
171
173
  UINT2NUM(GRN_OP_TABLE_CREATE));
172
- rb_define_const(rb_mGrnOperation, "TABLE_SELECT",
174
+ rb_define_const(rb_mGrnOperator, "TABLE_SELECT",
173
175
  UINT2NUM(GRN_OP_TABLE_SELECT));
174
- rb_define_const(rb_mGrnOperation, "TABLE_SORT",
176
+ rb_define_const(rb_mGrnOperator, "TABLE_SORT",
175
177
  UINT2NUM(GRN_OP_TABLE_SORT));
176
- rb_define_const(rb_mGrnOperation, "TABLE_GROUP",
178
+ rb_define_const(rb_mGrnOperator, "TABLE_GROUP",
177
179
  UINT2NUM(GRN_OP_TABLE_GROUP));
178
- rb_define_const(rb_mGrnOperation, "JSON_PUT",
180
+ rb_define_const(rb_mGrnOperator, "JSON_PUT",
179
181
  UINT2NUM(GRN_OP_JSON_PUT));
180
182
 
181
183
 
182
184
  /*
183
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE1",
185
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE1",
184
186
  UINT2NUM(GRN_OP_GEO_DISTANCE1));
185
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE2",
187
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE2",
186
188
  UINT2NUM(GRN_OP_GEO_DISTANCE2));
187
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE3",
189
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE3",
188
190
  UINT2NUM(GRN_OP_GEO_DISTANCE3));
189
- rb_define_const(rb_mGrnOperation, "GEO_DISTANCE4",
191
+ rb_define_const(rb_mGrnOperator, "GEO_DISTANCE4",
190
192
  UINT2NUM(GRN_OP_GEO_DISTANCE4));
191
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP5",
193
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP5",
192
194
  UINT2NUM(GRN_OP_GEO_WITHINP5));
193
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP6",
195
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP6",
194
196
  UINT2NUM(GRN_OP_GEO_WITHINP6));
195
- rb_define_const(rb_mGrnOperation, "GEO_WITHINP8",
197
+ rb_define_const(rb_mGrnOperator, "GEO_WITHINP8",
196
198
  UINT2NUM(GRN_OP_GEO_WITHINP8));
197
199
  */
198
200
  }