groonga 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. metadata +38 -227
  2. data/AUTHORS +0 -5
  3. data/NEWS.ja.rdoc +0 -114
  4. data/NEWS.rdoc +0 -116
  5. data/README.ja.rdoc +0 -63
  6. data/README.rdoc +0 -64
  7. data/Rakefile +0 -216
  8. data/benchmark/common.rb +0 -49
  9. data/benchmark/read-write-many-small-items.rb +0 -144
  10. data/benchmark/write-many-small-items.rb +0 -135
  11. data/example/bookmark.rb +0 -161
  12. data/example/index-html.rb +0 -89
  13. data/example/search/config.ru +0 -211
  14. data/example/search/public/css/groonga.css +0 -122
  15. data/ext/.gitignore +0 -2
  16. data/ext/rb-grn-accessor.c +0 -52
  17. data/ext/rb-grn-array-cursor.c +0 -36
  18. data/ext/rb-grn-array.c +0 -210
  19. data/ext/rb-grn-column.c +0 -570
  20. data/ext/rb-grn-context.c +0 -655
  21. data/ext/rb-grn-database.c +0 -415
  22. data/ext/rb-grn-encoding-support.c +0 -64
  23. data/ext/rb-grn-encoding.c +0 -257
  24. data/ext/rb-grn-exception.c +0 -1110
  25. data/ext/rb-grn-expression-builder.c +0 -75
  26. data/ext/rb-grn-expression.c +0 -732
  27. data/ext/rb-grn-fix-size-column.c +0 -166
  28. data/ext/rb-grn-hash-cursor.c +0 -38
  29. data/ext/rb-grn-hash.c +0 -294
  30. data/ext/rb-grn-index-column.c +0 -488
  31. data/ext/rb-grn-logger.c +0 -325
  32. data/ext/rb-grn-object.c +0 -1335
  33. data/ext/rb-grn-operation.c +0 -198
  34. data/ext/rb-grn-patricia-trie-cursor.c +0 -39
  35. data/ext/rb-grn-patricia-trie.c +0 -488
  36. data/ext/rb-grn-procedure.c +0 -52
  37. data/ext/rb-grn-query.c +0 -260
  38. data/ext/rb-grn-record.c +0 -40
  39. data/ext/rb-grn-snippet.c +0 -328
  40. data/ext/rb-grn-table-cursor-key-support.c +0 -69
  41. data/ext/rb-grn-table-cursor.c +0 -246
  42. data/ext/rb-grn-table-key-support.c +0 -731
  43. data/ext/rb-grn-table.c +0 -2038
  44. data/ext/rb-grn-type.c +0 -181
  45. data/ext/rb-grn-utils.c +0 -769
  46. data/ext/rb-grn-variable-size-column.c +0 -36
  47. data/ext/rb-grn-variable.c +0 -108
  48. data/ext/rb-grn.h +0 -684
  49. data/ext/rb-groonga.c +0 -113
  50. data/extconf.rb +0 -216
  51. data/html/bar.svg +0 -153
  52. data/html/developer.html +0 -121
  53. data/html/developer.svg +0 -469
  54. data/html/download.svg +0 -253
  55. data/html/favicon.ico +0 -0
  56. data/html/favicon.xcf +0 -0
  57. data/html/footer.html.erb +0 -28
  58. data/html/head.html.erb +0 -4
  59. data/html/header.html.erb +0 -17
  60. data/html/index.html +0 -147
  61. data/html/install.svg +0 -636
  62. data/html/logo.xcf +0 -0
  63. data/html/ranguba.css +0 -248
  64. data/html/tutorial.svg +0 -559
  65. data/lib/groonga.rb +0 -83
  66. data/lib/groonga/expression-builder.rb +0 -285
  67. data/lib/groonga/patricia-trie.rb +0 -53
  68. data/lib/groonga/record.rb +0 -276
  69. data/lib/groonga/schema.rb +0 -916
  70. data/license/GPL +0 -340
  71. data/license/LGPL +0 -504
  72. data/license/RUBY +0 -59
  73. data/misc/grnop2ruby.rb +0 -49
  74. data/pkg-config.rb +0 -333
  75. data/src/rb-grn-table-cursor.c +0 -296
  76. data/test-unit/Rakefile +0 -40
  77. data/test-unit/TODO +0 -5
  78. data/test-unit/bin/testrb +0 -5
  79. data/test-unit/html/classic.html +0 -15
  80. data/test-unit/html/index.html +0 -25
  81. data/test-unit/html/index.html.ja +0 -27
  82. data/test-unit/lib/test/unit.rb +0 -323
  83. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
  84. data/test-unit/lib/test/unit/assertions.rb +0 -1230
  85. data/test-unit/lib/test/unit/attribute.rb +0 -125
  86. data/test-unit/lib/test/unit/autorunner.rb +0 -353
  87. data/test-unit/lib/test/unit/collector.rb +0 -36
  88. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  89. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  90. data/test-unit/lib/test/unit/collector/load.rb +0 -136
  91. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  92. data/test-unit/lib/test/unit/color-scheme.rb +0 -102
  93. data/test-unit/lib/test/unit/color.rb +0 -96
  94. data/test-unit/lib/test/unit/diff.rb +0 -724
  95. data/test-unit/lib/test/unit/error.rb +0 -130
  96. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  97. data/test-unit/lib/test/unit/failure.rb +0 -136
  98. data/test-unit/lib/test/unit/fixture.rb +0 -176
  99. data/test-unit/lib/test/unit/notification.rb +0 -129
  100. data/test-unit/lib/test/unit/omission.rb +0 -191
  101. data/test-unit/lib/test/unit/pending.rb +0 -150
  102. data/test-unit/lib/test/unit/priority.rb +0 -181
  103. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  104. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  105. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  106. data/test-unit/lib/test/unit/testcase.rb +0 -476
  107. data/test-unit/lib/test/unit/testresult.rb +0 -89
  108. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  109. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  110. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -464
  111. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
  112. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -92
  113. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -28
  114. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  115. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  116. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
  117. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  118. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  119. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  120. data/test-unit/lib/test/unit/version.rb +0 -7
  121. data/test-unit/sample/adder.rb +0 -13
  122. data/test-unit/sample/subtracter.rb +0 -12
  123. data/test-unit/sample/test_adder.rb +0 -20
  124. data/test-unit/sample/test_subtracter.rb +0 -20
  125. data/test-unit/sample/test_user.rb +0 -23
  126. data/test-unit/test/collector/test-descendant.rb +0 -133
  127. data/test-unit/test/collector/test-load.rb +0 -329
  128. data/test-unit/test/collector/test_dir.rb +0 -406
  129. data/test-unit/test/collector/test_objectspace.rb +0 -100
  130. data/test-unit/test/run-test.rb +0 -15
  131. data/test-unit/test/test-attribute.rb +0 -86
  132. data/test-unit/test/test-color-scheme.rb +0 -67
  133. data/test-unit/test/test-color.rb +0 -47
  134. data/test-unit/test/test-diff.rb +0 -518
  135. data/test-unit/test/test-emacs-runner.rb +0 -60
  136. data/test-unit/test/test-fixture.rb +0 -287
  137. data/test-unit/test/test-notification.rb +0 -33
  138. data/test-unit/test/test-omission.rb +0 -81
  139. data/test-unit/test/test-pending.rb +0 -70
  140. data/test-unit/test/test-priority.rb +0 -119
  141. data/test-unit/test/test-testcase.rb +0 -554
  142. data/test-unit/test/test_assertions.rb +0 -1151
  143. data/test-unit/test/test_error.rb +0 -26
  144. data/test-unit/test/test_failure.rb +0 -33
  145. data/test-unit/test/test_testresult.rb +0 -113
  146. data/test-unit/test/test_testsuite.rb +0 -129
  147. data/test-unit/test/testunit-test-util.rb +0 -14
  148. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  149. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  150. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  151. data/test-unit/test/util/test_observable.rb +0 -102
  152. data/test-unit/test/util/test_procwrapper.rb +0 -36
  153. data/test/.gitignore +0 -1
  154. data/test/groonga-test-utils.rb +0 -106
  155. data/test/run-test.rb +0 -58
  156. data/test/test-array.rb +0 -97
  157. data/test/test-column.rb +0 -298
  158. data/test/test-context.rb +0 -73
  159. data/test/test-database.rb +0 -113
  160. data/test/test-encoding.rb +0 -33
  161. data/test/test-exception.rb +0 -93
  162. data/test/test-expression-builder.rb +0 -156
  163. data/test/test-expression.rb +0 -133
  164. data/test/test-fix-size-column.rb +0 -65
  165. data/test/test-gqtp.rb +0 -70
  166. data/test/test-hash.rb +0 -312
  167. data/test/test-index-column.rb +0 -81
  168. data/test/test-patricia-trie.rb +0 -189
  169. data/test/test-procedure.rb +0 -37
  170. data/test/test-query.rb +0 -22
  171. data/test/test-record.rb +0 -268
  172. data/test/test-remote.rb +0 -53
  173. data/test/test-schema.rb +0 -416
  174. data/test/test-snippet.rb +0 -121
  175. data/test/test-table-cursor.rb +0 -153
  176. data/test/test-table-offset-and-limit.rb +0 -102
  177. data/test/test-table-select-normalize.rb +0 -48
  178. data/test/test-table-select.rb +0 -145
  179. data/test/test-table.rb +0 -642
  180. data/test/test-type.rb +0 -61
  181. data/test/test-variable-size-column.rb +0 -98
  182. data/test/test-variable.rb +0 -28
  183. data/test/test-vector-column.rb +0 -76
  184. data/test/test-version.rb +0 -31
  185. data/text/TUTORIAL.ja.rdoc +0 -392
  186. data/text/expression.rdoc +0 -284
@@ -1,36 +0,0 @@
1
- /* -*- c-file-style: "ruby" -*- */
2
- /*
3
- Copyright (C) 2009 Kouhei Sutou <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 version 2.1 as published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
- */
18
-
19
- #include "rb-grn.h"
20
-
21
- #define SELF(object) ((RbGrnVariableSizeColumn *)DATA_PTR(object))
22
-
23
- VALUE rb_cGrnVariableSizeColumn;
24
-
25
- /*
26
- * Document-class: Groonga::VariableSizeColumn < Groonga::Column
27
- *
28
- * 可変長データ用のカラム。
29
- */
30
-
31
- void
32
- rb_grn_init_variable_size_column (VALUE mGrn)
33
- {
34
- rb_cGrnVariableSizeColumn =
35
- rb_define_class_under(mGrn, "VariableSizeColumn", rb_cGrnColumn);
36
- }
@@ -1,108 +0,0 @@
1
- /* -*- c-file-style: "ruby" -*- */
2
- /*
3
- Copyright (C) 2009 Kouhei Sutou <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 version 2.1 as published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
- */
18
-
19
- #include "rb-grn.h"
20
-
21
- #define SELF(object) ((RbGrnVariable *)DATA_PTR(object))
22
-
23
- VALUE rb_cGrnVariable;
24
-
25
- /*
26
- * Document-class: Groonga::Variable < Groonga::Object
27
- *
28
- * Groonga::Expressionで使われる変数。
29
- */
30
-
31
- grn_obj *
32
- rb_grn_variable_from_ruby_object (VALUE variable, grn_ctx **context)
33
- {
34
- return rb_grn_object_from_ruby_object(variable, context);
35
- }
36
-
37
- VALUE
38
- rb_grn_variable_to_ruby_object (grn_ctx *context, grn_obj *variable)
39
- {
40
- return rb_grn_object_to_ruby_object(rb_cGrnVariable, context, variable,
41
- RB_GRN_TRUE);
42
- }
43
-
44
- void
45
- rb_grn_variable_deconstruct (RbGrnVariable *rb_grn_variable,
46
- grn_obj **variable,
47
- grn_ctx **context,
48
- grn_id *domain_id,
49
- grn_obj **domain,
50
- grn_id *range_id,
51
- grn_obj **range)
52
- {
53
- RbGrnObject *rb_grn_object;
54
-
55
- rb_grn_object = RB_GRN_OBJECT(rb_grn_variable);
56
- rb_grn_object_deconstruct(rb_grn_object, variable, context,
57
- domain_id, domain,
58
- range_id, range);
59
- }
60
-
61
- /*
62
- * call-seq:
63
- * variable.value -> Groonga::Object
64
- *
65
- * 変数の値を返す。
66
- */
67
- static VALUE
68
- rb_grn_variable_get_value (VALUE self)
69
- {
70
- grn_ctx *context = NULL;
71
- grn_obj *variable;
72
-
73
- rb_grn_variable_deconstruct(SELF(self), &variable, &context,
74
- NULL, NULL,
75
- NULL, NULL);
76
-
77
- return GRNOBJ2RVAL(Qnil, context, variable, self);
78
- }
79
-
80
- /*
81
- * call-seq:
82
- * variable.value=(value)
83
- *
84
- * 変数の値を_value_に設定する。
85
- */
86
- static VALUE
87
- rb_grn_variable_set_value (VALUE self, VALUE value)
88
- {
89
- grn_ctx *context = NULL;
90
- grn_obj *variable;
91
-
92
- rb_grn_variable_deconstruct(SELF(self), &variable, &context,
93
- NULL, NULL,
94
- NULL, NULL);
95
- RVAL2GRNOBJ(value, context, &variable);
96
- return Qnil;
97
- }
98
-
99
- void
100
- rb_grn_init_variable (VALUE mGrn)
101
- {
102
- rb_cGrnVariable = rb_define_class_under(mGrn, "Variable", rb_cGrnObject);
103
-
104
- rb_define_method(rb_cGrnVariable, "value",
105
- rb_grn_variable_get_value, 0);
106
- rb_define_method(rb_cGrnVariable, "value=",
107
- rb_grn_variable_set_value, 1);
108
- }
data/ext/rb-grn.h DELETED
@@ -1,684 +0,0 @@
1
- /* -*- c-file-style: "ruby" -*- */
2
- /*
3
- Copyright (C) 2009-2010 Kouhei Sutou <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 version 2.1 as published by the Free Software Foundation.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
- */
18
-
19
- #ifndef __RB_GRN_H__
20
- #define __RB_GRN_H__
21
-
22
- #include <ruby.h>
23
-
24
- #ifdef HAVE_RUBY_ENCODING_H
25
- # include <ruby/encoding.h>
26
- #endif
27
-
28
- #include <groonga.h>
29
-
30
- #if defined(__cplusplus)
31
- # define RB_GRN_BEGIN_DECLS extern "C" {
32
- # define RB_GRN_END_DECLS }
33
- #else
34
- # define RB_GRN_BEGIN_DECLS
35
- # define RB_GRN_END_DECLS
36
- #endif
37
-
38
- RB_GRN_BEGIN_DECLS
39
-
40
- #if __GNUC__ >= 4
41
- # define RB_GRN_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
42
- #else
43
- # define RB_GRN_GNUC_NULL_TERMINATED
44
- #endif
45
-
46
- #if defined(RUBY_GRN_PLATFORM_WIN32) && !defined(RB_GRN_PLATFORM_WIN32)
47
- # define RB_GRN_PLATFORM_WIN32 RUBY_GRN_PLATFORM_WIN32
48
- #endif
49
-
50
- #if defined(RUBY_GRN_STATIC_COMPILATION) && !defined(RB_GRN_STATIC_COMPILATION)
51
- # define RB_GRN_STATIC_COMPILATION RUBY_GRN_STATIC_COMPILATION
52
- #endif
53
-
54
- #if defined(RB_GRN_PLATFORM_WIN32) && !defined(RB_GRN_STATIC_COMPILATION)
55
- # ifdef RB_GRN_COMPILATION
56
- # define RB_GRN_VAR __declspec(dllexport)
57
- # else
58
- # define RB_GRN_VAR extern __declspec(dllimport)
59
- # endif
60
- #else
61
- # define RB_GRN_VAR extern
62
- #endif
63
-
64
- #ifdef RB_GRN_DEBUG
65
- # define debug(...) fprintf(stderr, __VA_ARGS__)
66
- #else
67
- # define debug(...)
68
- #endif
69
-
70
- #define RB_GRN_MAJOR_VERSION 0
71
- #define RB_GRN_MINOR_VERSION 9
72
- #define RB_GRN_MICRO_VERSION 1
73
-
74
- typedef int rb_grn_boolean;
75
- #define RB_GRN_FALSE (0)
76
- #define RB_GRN_TRUE (!RB_GRN_FALSE)
77
-
78
- #define RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS 32
79
-
80
- #include <stdint.h>
81
-
82
- #define RB_GRN_OBJECT(object) ((RbGrnObject *)(object))
83
- #define RB_GRN_NAMED_OBJECT(object) ((RbGrnNamedObject *)(object))
84
- #define RB_GRN_TABLE(object) ((RbGrnTable *)(object))
85
- #define RB_GRN_TABLE_KEY_SUPPORT(object) ((RbGrnTableKeySupport *)(object))
86
- #define RB_GRN_TABLE_CURSOR(object) ((RbGrnTableCursort *)(object))
87
- #define RB_GRN_COLUMN(object) ((RbGrnColumn *)(object))
88
- #define RB_GRN_INDEX_COLUMN(object) ((RbGrnIndexColumn *)(object))
89
- #define RB_GRN_ACCESSOR(object) ((RbGrnAccessor *)(object))
90
- #define RB_GRN_EXPRESSION(object) ((RbGrnExpression *)(object))
91
- #define RB_GRN_UNBIND_FUNCTION(function) ((RbGrnUnbindFunction)(function))
92
-
93
- typedef void (*RbGrnUnbindFunction) (void *object);
94
-
95
- typedef struct _RbGrnContext RbGrnContext;
96
- struct _RbGrnContext
97
- {
98
- grn_ctx *context;
99
- VALUE self;
100
- };
101
-
102
- typedef struct _RbGrnObject RbGrnObject;
103
- struct _RbGrnObject
104
- {
105
- VALUE self;
106
- grn_ctx *context;
107
- grn_obj *object;
108
- grn_obj *domain;
109
- grn_id domain_id;
110
- grn_obj *range;
111
- grn_id range_id;
112
- rb_grn_boolean need_close;
113
- };
114
-
115
- typedef struct _RbGrnNamedObject RbGrnNamedObject;
116
- struct _RbGrnNamedObject
117
- {
118
- RbGrnObject parent;
119
- char *name;
120
- unsigned name_size;
121
- };
122
-
123
- typedef struct _RbGrnTable RbGrnTable;
124
- struct _RbGrnTable
125
- {
126
- RbGrnObject parent;
127
- grn_obj *value;
128
- VALUE columns;
129
- };
130
-
131
- typedef struct _RbGrnTableKeySupport RbGrnTableKeySupport;
132
- struct _RbGrnTableKeySupport
133
- {
134
- RbGrnTable parent;
135
- grn_obj *key;
136
- };
137
-
138
- typedef struct _RbGrnColumn RbGrnColumn;
139
- struct _RbGrnColumn
140
- {
141
- RbGrnNamedObject parent;
142
- grn_obj *value;
143
- };
144
-
145
- typedef struct _RbGrnIndexColumn RbGrnIndexColumn;
146
- struct _RbGrnIndexColumn
147
- {
148
- RbGrnColumn parent;
149
- grn_obj *old_value;
150
- grn_obj *id_query;
151
- grn_obj *string_query;
152
- };
153
-
154
- typedef struct _RbGrnAccessor RbGrnAccessor;
155
- struct _RbGrnAccessor
156
- {
157
- RbGrnNamedObject parent;
158
- };
159
-
160
- typedef struct _RbGrnTableCursor RbGrnTableCursor;
161
- struct _RbGrnTableCursor
162
- {
163
- RbGrnObject parent;
164
- };
165
-
166
- typedef struct _RbGrnVariable RbGrnVariable;
167
- struct _RbGrnVariable
168
- {
169
- RbGrnObject parent;
170
- };
171
-
172
- typedef struct _RbGrnExpression RbGrnExpression;
173
- struct _RbGrnExpression
174
- {
175
- RbGrnObject parent;
176
- grn_obj *value;
177
- };
178
-
179
- RB_GRN_VAR rb_grn_boolean rb_grn_exited;
180
-
181
- RB_GRN_VAR VALUE rb_eGrnError;
182
- RB_GRN_VAR VALUE rb_eGrnObjectClosed;
183
- RB_GRN_VAR VALUE rb_eGrnNoSuchColumn;
184
- RB_GRN_VAR VALUE rb_cGrnObject;
185
- RB_GRN_VAR VALUE rb_mGrnEncodingSupport;
186
- RB_GRN_VAR VALUE rb_cGrnDatabase;
187
- RB_GRN_VAR VALUE rb_cGrnTable;
188
- RB_GRN_VAR VALUE rb_mGrnTableKeySupport;
189
- RB_GRN_VAR VALUE rb_cGrnHash;
190
- RB_GRN_VAR VALUE rb_cGrnPatriciaTrie;
191
- RB_GRN_VAR VALUE rb_cGrnArray;
192
- RB_GRN_VAR VALUE rb_cGrnTableCursor;
193
- RB_GRN_VAR VALUE rb_mGrnTableCursorKeySupport;
194
- RB_GRN_VAR VALUE rb_cGrnHashCursor;
195
- RB_GRN_VAR VALUE rb_cGrnPatriciaTrieCursor;
196
- RB_GRN_VAR VALUE rb_cGrnArrayCursor;
197
- RB_GRN_VAR VALUE rb_cGrnType;
198
- RB_GRN_VAR VALUE rb_cGrnProcedure;
199
- RB_GRN_VAR VALUE rb_cGrnColumn;
200
- RB_GRN_VAR VALUE rb_cGrnFixSizeColumn;
201
- RB_GRN_VAR VALUE rb_cGrnVariableSizeColumn;
202
- RB_GRN_VAR VALUE rb_cGrnIndexColumn;
203
- RB_GRN_VAR VALUE rb_cGrnAccessor;
204
- RB_GRN_VAR VALUE rb_cGrnRecord;
205
- RB_GRN_VAR VALUE rb_cGrnQuery;
206
- RB_GRN_VAR VALUE rb_cGrnLogger;
207
- RB_GRN_VAR VALUE rb_cGrnSnippet;
208
- RB_GRN_VAR VALUE rb_cGrnVariable;
209
- RB_GRN_VAR VALUE rb_cGrnOperation;
210
- RB_GRN_VAR VALUE rb_cGrnExpression;
211
- RB_GRN_VAR VALUE rb_cGrnRecordExpressionBuilder;
212
- RB_GRN_VAR VALUE rb_cGrnColumnExpressionBuilder;
213
-
214
- void rb_grn_init_utils (VALUE mGrn);
215
- void rb_grn_init_exception (VALUE mGrn);
216
- void rb_grn_init_encoding (VALUE mGrn);
217
- void rb_grn_init_encoding_support (VALUE mGrn);
218
- void rb_grn_init_context (VALUE mGrn);
219
- void rb_grn_init_object (VALUE mGrn);
220
- void rb_grn_init_database (VALUE mGrn);
221
- void rb_grn_init_table (VALUE mGrn);
222
- void rb_grn_init_table_key_support (VALUE mGrn);
223
- void rb_grn_init_array (VALUE mGrn);
224
- void rb_grn_init_hash (VALUE mGrn);
225
- void rb_grn_init_patricia_trie (VALUE mGrn);
226
- void rb_grn_init_table_cursor (VALUE mGrn);
227
- void rb_grn_init_table_cursor_key_support (VALUE mGrn);
228
- void rb_grn_init_array_cursor (VALUE mGrn);
229
- void rb_grn_init_hash_cursor (VALUE mGrn);
230
- void rb_grn_init_patricia_trie_cursor (VALUE mGrn);
231
- void rb_grn_init_type (VALUE mGrn);
232
- void rb_grn_init_procedure (VALUE mGrn);
233
- void rb_grn_init_column (VALUE mGrn);
234
- void rb_grn_init_fix_size_column (VALUE mGrn);
235
- void rb_grn_init_variable_size_column (VALUE mGrn);
236
- void rb_grn_init_index_column (VALUE mGrn);
237
- void rb_grn_init_accessor (VALUE mGrn);
238
- void rb_grn_init_record (VALUE mGrn);
239
- void rb_grn_init_query (VALUE mGrn);
240
- void rb_grn_init_variable (VALUE mGrn);
241
- void rb_grn_init_operation (VALUE mGrn);
242
- void rb_grn_init_expression (VALUE mGrn);
243
- void rb_grn_init_expression_builder (VALUE mGrn);
244
- void rb_grn_init_logger (VALUE mGrn);
245
- void rb_grn_init_snippet (VALUE mGrn);
246
-
247
- VALUE rb_grn_rc_to_exception (grn_rc rc);
248
- const char *rb_grn_rc_to_message (grn_rc rc);
249
- void rb_grn_rc_check (grn_rc rc,
250
- VALUE related_object);
251
-
252
- void rb_grn_context_fin (grn_ctx *context);
253
- grn_ctx *rb_grn_context_ensure (VALUE *context);
254
- VALUE rb_grn_context_get_default (void);
255
- VALUE rb_grn_context_to_exception (grn_ctx *context,
256
- VALUE related_object);
257
- void rb_grn_context_check (grn_ctx *context,
258
- VALUE related_object);
259
- grn_obj *rb_grn_context_get_backward_compatibility
260
- (grn_ctx *context,
261
- const char *name,
262
- unsigned int name_size);
263
-
264
- const char *rb_grn_inspect (VALUE object);
265
- void rb_grn_scan_options (VALUE options, ...)
266
- RB_GRN_GNUC_NULL_TERMINATED;
267
- rb_grn_boolean rb_grn_equal_option (VALUE option,
268
- const char *key);
269
-
270
- VALUE rb_grn_object_alloc (VALUE klass);
271
- void rb_grn_object_bind (VALUE self,
272
- VALUE rb_context,
273
- RbGrnObject *rb_grn_object,
274
- grn_ctx *context,
275
- grn_obj *object);
276
- void rb_grn_object_free (RbGrnObject *rb_grn_object);
277
- void rb_grn_object_assign (VALUE klass,
278
- VALUE self,
279
- VALUE rb_context,
280
- grn_ctx *context,
281
- grn_obj *object);
282
- void rb_grn_object_deconstruct (RbGrnObject *rb_grn_object,
283
- grn_obj **object,
284
- grn_ctx **context,
285
- grn_id *domain_id,
286
- grn_obj **domain,
287
- grn_id *range_id,
288
- grn_obj **range);
289
-
290
- VALUE rb_grn_object_get_id (VALUE object);
291
- VALUE rb_grn_object_array_reference (VALUE object,
292
- VALUE rb_id);
293
- VALUE rb_grn_object_set_raw (RbGrnObject *rb_grn_object,
294
- grn_id id,
295
- VALUE rb_value,
296
- int flags,
297
- VALUE related_object);
298
- VALUE rb_grn_object_close (VALUE object);
299
- VALUE rb_grn_object_closed_p (VALUE object);
300
- VALUE rb_grn_object_inspect_object (VALUE inspected,
301
- grn_ctx *context,
302
- grn_obj *object);
303
- VALUE rb_grn_object_inspect_object_content (VALUE inspected,
304
- grn_ctx *context,
305
- grn_obj *object);
306
- VALUE rb_grn_object_inspect_header (VALUE object,
307
- VALUE inspected);
308
- VALUE rb_grn_object_inspect_content (VALUE object,
309
- VALUE inspected);
310
- VALUE rb_grn_object_inspect_footer (VALUE object,
311
- VALUE inspected);
312
-
313
- void rb_grn_named_object_bind (RbGrnNamedObject *rb_grn_named_object,
314
- grn_ctx *context,
315
- grn_obj *object);
316
- void rb_grn_named_object_finalizer (grn_ctx *context,
317
- grn_obj *column,
318
- RbGrnNamedObject *rb_grn_named_object);
319
- void rb_grn_named_object_set_name (RbGrnNamedObject *rb_grn_named_object,
320
- const char *name,
321
- unsigned name_size);
322
-
323
- void rb_grn_table_bind (RbGrnTable *rb_grn_table,
324
- grn_ctx *context,
325
- grn_obj *table_key_support);
326
- void rb_grn_table_finalizer (grn_ctx *context,
327
- grn_obj *grn_object,
328
- RbGrnTable *rb_grn_table);
329
- void rb_grn_table_deconstruct (RbGrnTable *rb_grn_table,
330
- grn_obj **table,
331
- grn_ctx **context,
332
- grn_id *domain_id,
333
- grn_obj **domain,
334
- grn_obj **value,
335
- grn_id *range_id,
336
- grn_obj **range,
337
- VALUE *columns);
338
-
339
- grn_obj *rb_grn_table_open_raw (int argc,
340
- VALUE *argv,
341
- grn_ctx **context,
342
- VALUE *rb_context);
343
-
344
- VALUE rb_grn_table_delete (VALUE self,
345
- VALUE rb_id);
346
- VALUE rb_grn_table_array_reference (VALUE self,
347
- VALUE rb_id);
348
- VALUE rb_grn_table_array_set (VALUE self,
349
- VALUE rb_id,
350
- VALUE rb_value);
351
- VALUE rb_grn_table_get_value (VALUE self,
352
- VALUE rb_id);
353
- VALUE rb_grn_table_set_value (VALUE self,
354
- VALUE rb_id,
355
- VALUE rb_value);
356
- VALUE rb_grn_table_get_column (VALUE self,
357
- VALUE rb_name);
358
- VALUE rb_grn_table_get_column_surely (VALUE self,
359
- VALUE rb_name);
360
- VALUE rb_grn_table_get_column_value_raw (VALUE self,
361
- grn_id id,
362
- VALUE rb_name);
363
- VALUE rb_grn_table_get_column_value (VALUE self,
364
- VALUE rb_id,
365
- VALUE rb_name);
366
- VALUE rb_grn_table_set_column_value_raw (VALUE self,
367
- grn_id id,
368
- VALUE rb_name,
369
- VALUE rb_value);
370
- VALUE rb_grn_table_set_column_value (VALUE self,
371
- VALUE rb_id,
372
- VALUE rb_name,
373
- VALUE rb_value);
374
-
375
- grn_ctx *rb_grn_table_cursor_ensure_context (VALUE cursor,
376
- VALUE *rb_context);
377
-
378
- void rb_grn_table_key_support_bind (RbGrnTableKeySupport *rb_grn_table_key_support,
379
- grn_ctx *context,
380
- grn_obj *table_key_support);
381
- void rb_grn_table_key_support_finalizer (grn_ctx *context,
382
- grn_obj *grn_object,
383
- RbGrnTableKeySupport *rb_grn_table_key_support);
384
- void rb_grn_table_key_support_deconstruct (RbGrnTableKeySupport *rb_grn_table_key_support,
385
- grn_obj **table_key_support,
386
- grn_ctx **context,
387
- grn_obj **key,
388
- grn_id *domain_id,
389
- grn_obj **domain,
390
- grn_obj **value,
391
- grn_id *range_id,
392
- grn_obj **range,
393
- VALUE *columns);
394
- grn_id rb_grn_table_key_support_get (VALUE self,
395
- VALUE rb_key);
396
-
397
- void rb_grn_column_bind (RbGrnColumn *rb_grn_column,
398
- grn_ctx *context,
399
- grn_obj *column);
400
- void rb_grn_column_finalizer (grn_ctx *context,
401
- grn_obj *column,
402
- RbGrnColumn *rb_grn_column);
403
- void rb_grn_column_deconstruct (RbGrnColumn *rb_grn_column,
404
- grn_obj **column,
405
- grn_ctx **context,
406
- grn_id *domain_id,
407
- grn_obj **domain,
408
- grn_obj **value,
409
- grn_id *range_id,
410
- grn_obj **range);
411
-
412
- void rb_grn_index_column_bind (RbGrnIndexColumn *rb_grn_index_column,
413
- grn_ctx *context,
414
- grn_obj *object);
415
- void rb_grn_index_column_finalizer (grn_ctx *context,
416
- grn_obj *grn_object,
417
- RbGrnIndexColumn *rb_grn_index_column);
418
- void rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_index_column,
419
- grn_obj **column,
420
- grn_ctx **context,
421
- grn_id *domain_id,
422
- grn_obj **domain,
423
- grn_obj **value,
424
- grn_obj **old_value,
425
- grn_id *range_id,
426
- grn_obj **range,
427
- grn_obj **id_query,
428
- grn_obj **string_query);
429
-
430
- void rb_grn_accessor_bind (RbGrnAccessor *rb_grn_accessor,
431
- grn_ctx *context,
432
- grn_obj *accessor);
433
- void rb_grn_accessor_finalizer (grn_ctx *context,
434
- grn_obj *accessor,
435
- RbGrnAccessor *rb_grn_accessor);
436
-
437
- void rb_grn_expression_bind (RbGrnExpression *rb_grn_expression,
438
- grn_ctx *context,
439
- grn_obj *expression);
440
- void rb_grn_expression_finalizer (grn_ctx *context,
441
- grn_obj *grn_object,
442
- RbGrnExpression *rb_grn_expression);
443
-
444
- VALUE rb_grn_record_new (VALUE table,
445
- grn_id id,
446
- VALUE values);
447
- VALUE rb_grn_record_new_raw (VALUE table,
448
- VALUE id,
449
- VALUE values);
450
-
451
- VALUE rb_grn_record_expression_builder_new (VALUE table,
452
- VALUE name);
453
- VALUE rb_grn_record_expression_builder_build
454
- (VALUE self);
455
- VALUE rb_grn_column_expression_builder_new (VALUE column,
456
- VALUE name,
457
- VALUE query);
458
- VALUE rb_grn_column_expression_builder_build
459
- (VALUE self);
460
-
461
-
462
- #define RB_GRN_INTERN(string) (ID2SYM(rb_intern(string)))
463
-
464
- #define RVAL2CBOOL(object) (RTEST(object))
465
- #define CBOOL2RVAL(boolean) ((boolean) ? Qtrue : Qfalse)
466
-
467
- #define RVAL2GRNENCODING(object, context) \
468
- (rb_grn_encoding_from_ruby_object(object, context))
469
- #define GRNENCODING2RVAL(encoding) (rb_grn_encoding_to_ruby_object(encoding))
470
-
471
- #define RVAL2GRNCONTEXT(object) (rb_grn_context_from_ruby_object(object))
472
- #define GRNCONTEXT2RVAL(context) (rb_grn_context_to_ruby_object(context))
473
-
474
- #define RVAL2GRNOBJECT(rb_object, context) \
475
- (rb_grn_object_from_ruby_object(rb_object, context))
476
- #define GRNOBJECT2RVAL(klass, context, object, owner) \
477
- (rb_grn_object_to_ruby_object(klass, context, object, owner))
478
- #define GRNOBJECT2RCLASS(object) (rb_grn_object_to_ruby_class(object))
479
-
480
- /* TODO: MORE BETTER NAME!!! PLEASE!!! */
481
- #define RVAL2GRNOBJ(rb_object, context, object) \
482
- (rb_grn_obj_from_ruby_object(rb_object, context, object))
483
- #define GRNOBJ2RVAL(klass, context, object, related_object) \
484
- (rb_grn_obj_to_ruby_object(klass, context, object, related_object))
485
-
486
- #define RVAL2GRNDB(object) (rb_grn_database_from_ruby_object(object))
487
- #define GRNDB2RVAL(context, db, owner) \
488
- (rb_grn_database_to_ruby_object(context, db, owner))
489
-
490
- #define RVAL2GRNTABLE(object, context)(rb_grn_table_from_ruby_object(object, context))
491
- #define GRNTABLE2RVAL(context, table, owner) \
492
- (rb_grn_table_to_ruby_object(context, table, owner))
493
-
494
- #define RVAL2GRNTABLECURSOR(object) (rb_grn_table_cursor_from_ruby_object(object))
495
- #define GRNTABLECURSOR2RVAL(klass, context, cursor) \
496
- (rb_grn_table_cursor_to_ruby_object(klass, context, cursor, RB_GRN_TRUE))
497
- #define GRNTABLECURSOR2RCLASS(object) (rb_grn_table_cursor_to_ruby_class(object))
498
-
499
- #define RVAL2GRNCOLUMN(object, context) \
500
- (rb_grn_column_from_ruby_object(object, context))
501
- #define GRNCOLUMN2RVAL(klass, context, column, owner) \
502
- (rb_grn_column_to_ruby_object(klass, context, column, owner))
503
-
504
- #define RVAL2GRNQUERY(object) (rb_grn_query_from_ruby_object(object))
505
- #define GRNQUERY2RVAL(context, column)(rb_grn_query_to_ruby_object(context, column))
506
-
507
- #define RVAL2GRNOPERATOR(object) (rb_grn_operator_from_ruby_object(object))
508
-
509
- #define RVAL2GRNLOGGER(object) (rb_grn_logger_from_ruby_object(object))
510
-
511
- #define RVAL2GRNBULK(object, context, bulk) \
512
- (rb_grn_bulk_from_ruby_object(object, context, bulk))
513
- #define RVAL2GRNBULK_WITH_TYPE(object, context, bulk, type_id, type) \
514
- (rb_grn_bulk_from_ruby_object_with_type(object, context, bulk, type_id, type))
515
- #define GRNBULK2RVAL(context, bulk, range, related_object) \
516
- (rb_grn_bulk_to_ruby_object(context, bulk, range, related_object))
517
-
518
- #define RVAL2GRNVECTOR(object, context, vector) \
519
- (rb_grn_vector_from_ruby_object(object, context, vector))
520
- #define GRNVECTOR2RVAL(context, vector) \
521
- (rb_grn_vector_to_ruby_object(context, vector))
522
-
523
- #define RVAL2GRNUVECTOR(object, context, uvector, related_object) \
524
- (rb_grn_uvector_from_ruby_object(object, context, uvector, related_object))
525
- #define GRNUVECTOR2RVAL(context, uvector) \
526
- (rb_grn_uvector_to_ruby_object(context, uvector))
527
-
528
- #define GRNVALUE2RVAL(context, value, range, related_object) \
529
- (rb_grn_value_to_ruby_object(context, value, range, related_object))
530
-
531
- #define RVAL2GRNID(object, context, table, related_object) \
532
- (rb_grn_id_from_ruby_object(object, context, table, related_object))
533
-
534
- #define GRNKEY2RVAL(context, key, key_size, table, related_object) \
535
- (rb_grn_key_to_ruby_object(context, key, key_size, table, related_object))
536
- #define RVAL2GRNKEY(object, context, key, domain_id, domain, related_object) \
537
- (rb_grn_key_from_ruby_object(object, context, key, domain_id, \
538
- domain, related_object))
539
-
540
- #define GRNVARIABLE2RVAL(context, variable) \
541
- (rb_grn_variable_to_ruby_object(context, variable))
542
- #define RVAL2GRNVARIABLE(object, context) \
543
- (rb_grn_variable_from_ruby_object(object, context))
544
-
545
- #define GRNSNIPPET2RVAL(context, snippet, owner) \
546
- (rb_grn_snippet_to_ruby_object(context, snippet, owner))
547
- #define RVAL2GRNSNIPPET(snippet) \
548
- (rb_grn_snippet_from_ruby_object(snippet))
549
-
550
-
551
- grn_encoding rb_grn_encoding_from_ruby_object (VALUE object,
552
- grn_ctx *context);
553
- VALUE rb_grn_encoding_to_ruby_object (grn_encoding encoding);
554
- #ifdef HAVE_RUBY_ENCODING_H
555
- rb_encoding *rb_grn_encoding_to_ruby_encoding (grn_encoding encoding);
556
- #endif
557
-
558
- grn_ctx *rb_grn_context_from_ruby_object (VALUE object);
559
- VALUE rb_grn_context_to_ruby_object (grn_ctx *context);
560
- VALUE rb_grn_context_rb_string_new (grn_ctx *context,
561
- const char *string,
562
- long length);
563
- VALUE rb_grn_context_rb_string_encode (grn_ctx *context,
564
- VALUE rb_string);
565
-
566
- grn_obj *rb_grn_object_from_ruby_object (VALUE object,
567
- grn_ctx **context);
568
- VALUE rb_grn_object_to_ruby_object (VALUE klass,
569
- grn_ctx *context,
570
- grn_obj *object,
571
- rb_grn_boolean owner);
572
- VALUE rb_grn_object_to_ruby_class (grn_obj *object);
573
-
574
- grn_obj *rb_grn_database_from_ruby_object (VALUE object);
575
- VALUE rb_grn_database_to_ruby_object (grn_ctx *context,
576
- grn_obj *db,
577
- rb_grn_boolean owner);
578
-
579
- grn_obj *rb_grn_table_from_ruby_object (VALUE object,
580
- grn_ctx **context);
581
- VALUE rb_grn_table_to_ruby_object (grn_ctx *context,
582
- grn_obj *table,
583
- rb_grn_boolean owner);
584
-
585
- grn_table_cursor *
586
- rb_grn_table_cursor_from_ruby_object (VALUE object,
587
- grn_ctx **context);
588
- VALUE rb_grn_table_cursor_to_ruby_object (VALUE klass,
589
- grn_ctx *context,
590
- grn_table_cursor *cursor,
591
- rb_grn_boolean owner);
592
- VALUE rb_grn_table_cursor_to_ruby_class (grn_table_cursor *cursor);
593
- void rb_grn_table_cursor_deconstruct (RbGrnTableCursor *rb_grn_table_cursor,
594
- grn_table_cursor **cursor,
595
- grn_ctx **context,
596
- grn_id *domain_id,
597
- grn_obj **domain,
598
- grn_id *range_id,
599
- grn_obj **range);
600
-
601
- grn_obj *rb_grn_column_from_ruby_object (VALUE object,
602
- grn_ctx **context);
603
- VALUE rb_grn_column_to_ruby_object (VALUE klass,
604
- grn_ctx *context,
605
- grn_obj *column,
606
- rb_grn_boolean owner);
607
-
608
- grn_query *rb_grn_query_from_ruby_object (VALUE object);
609
- VALUE rb_grn_query_to_ruby_object (grn_ctx *context,
610
- grn_query *query);
611
-
612
- grn_operator rb_grn_operator_from_ruby_object (VALUE object);
613
-
614
- grn_logger_info *
615
- rb_grn_logger_from_ruby_object (VALUE object);
616
-
617
- grn_obj *rb_grn_bulk_from_ruby_object (VALUE object,
618
- grn_ctx *context,
619
- grn_obj *bulk);
620
- grn_obj *rb_grn_bulk_from_ruby_object_with_type
621
- (VALUE object,
622
- grn_ctx *context,
623
- grn_obj *bulk,
624
- grn_id type_id,
625
- grn_obj *type);
626
- VALUE rb_grn_bulk_to_ruby_object (grn_ctx *context,
627
- grn_obj *bulk,
628
- grn_obj *range,
629
- VALUE related_object);
630
- grn_obj *rb_grn_vector_from_ruby_object (VALUE object,
631
- grn_ctx *context,
632
- grn_obj *vector);
633
- VALUE rb_grn_vector_to_ruby_object (grn_ctx *context,
634
- grn_obj *vector);
635
- grn_obj *rb_grn_uvector_from_ruby_object (VALUE object,
636
- grn_ctx *context,
637
- grn_obj *uvector,
638
- VALUE related_object);
639
- VALUE rb_grn_uvector_to_ruby_object (grn_ctx *context,
640
- grn_obj *uvector);
641
-
642
- VALUE rb_grn_value_to_ruby_object (grn_ctx *context,
643
- grn_obj *value,
644
- grn_obj *range,
645
- VALUE related_object);
646
-
647
- grn_id rb_grn_id_from_ruby_object (VALUE object,
648
- grn_ctx *context,
649
- grn_obj *table,
650
- VALUE related_object);
651
-
652
- VALUE rb_grn_key_to_ruby_object (grn_ctx *context,
653
- const void *key,
654
- int key_size,
655
- grn_obj *table,
656
- VALUE related_object);
657
- grn_obj *rb_grn_key_from_ruby_object (VALUE rb_key,
658
- grn_ctx *context,
659
- grn_obj *key,
660
- grn_id domain_id,
661
- grn_obj *domain,
662
- VALUE related_object);
663
-
664
- VALUE rb_grn_variable_to_ruby_object (grn_ctx *context,
665
- grn_obj *variable);
666
- grn_obj *rb_grn_variable_from_ruby_object (VALUE rb_variable,
667
- grn_ctx **context);
668
-
669
- grn_obj *rb_grn_obj_from_ruby_object (VALUE rb_object,
670
- grn_ctx *context,
671
- grn_obj **obj);
672
- VALUE rb_grn_obj_to_ruby_object (VALUE klass,
673
- grn_ctx *context,
674
- grn_obj *obj,
675
- VALUE related_object);
676
-
677
- grn_snip *rb_grn_snippet_from_ruby_object (VALUE rb_snippet);
678
- VALUE rb_grn_snippet_to_ruby_object (grn_ctx *context,
679
- grn_snip *snippet,
680
- rb_grn_boolean owner);
681
-
682
- RB_GRN_END_DECLS
683
-
684
- #endif