rroonga 0.9.3-x86-mingw32 → 0.9.4-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.ja.rdoc +13 -0
- data/NEWS.rdoc +13 -0
- data/Rakefile +1 -1
- data/ext/groonga/extconf.rb +4 -3
- data/ext/groonga/rb-grn.h +698 -0
- data/html/developer.html +10 -7
- data/html/index.html +1 -1
- data/lib/1.8/groonga.so +0 -0
- data/lib/1.9/groonga.so +0 -0
- data/pkg-config.rb +1 -1
- data/test/run-test.rb +9 -3
- data/vendor/local/bin/libgroonga-0.dll +0 -0
- data/vendor/local/include/groonga.h +2285 -0
- data/vendor/local/lib/libgroonga.la +41 -0
- metadata +37 -85
- data/ext/groonga/mkmf.log +0 -99
- data/test-unit/Rakefile +0 -40
- data/test-unit/TODO +0 -5
- data/test-unit/bin/testrb +0 -5
- data/test-unit/html/classic.html +0 -15
- data/test-unit/html/index.html +0 -25
- data/test-unit/html/index.html.ja +0 -27
- data/test-unit/lib/test/unit/assertionfailederror.rb +0 -25
- data/test-unit/lib/test/unit/assertions.rb +0 -1230
- data/test-unit/lib/test/unit/attribute.rb +0 -125
- data/test-unit/lib/test/unit/autorunner.rb +0 -360
- data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
- data/test-unit/lib/test/unit/collector/dir.rb +0 -108
- data/test-unit/lib/test/unit/collector/load.rb +0 -144
- data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
- data/test-unit/lib/test/unit/collector.rb +0 -36
- data/test-unit/lib/test/unit/color-scheme.rb +0 -102
- data/test-unit/lib/test/unit/color.rb +0 -96
- data/test-unit/lib/test/unit/diff.rb +0 -724
- data/test-unit/lib/test/unit/error.rb +0 -130
- data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
- data/test-unit/lib/test/unit/failure.rb +0 -136
- data/test-unit/lib/test/unit/fixture.rb +0 -176
- data/test-unit/lib/test/unit/notification.rb +0 -129
- data/test-unit/lib/test/unit/omission.rb +0 -191
- data/test-unit/lib/test/unit/pending.rb +0 -150
- data/test-unit/lib/test/unit/priority.rb +0 -180
- data/test-unit/lib/test/unit/runner/console.rb +0 -52
- data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
- data/test-unit/lib/test/unit/runner/tap.rb +0 -8
- data/test-unit/lib/test/unit/testcase.rb +0 -476
- data/test-unit/lib/test/unit/testresult.rb +0 -89
- data/test-unit/lib/test/unit/testsuite.rb +0 -110
- data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -466
- data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -63
- data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -92
- data/test-unit/lib/test/unit/ui/testrunner.rb +0 -28
- data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
- data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
- data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
- data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
- data/test-unit/lib/test/unit/util/observable.rb +0 -90
- data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
- data/test-unit/lib/test/unit/version.rb +0 -7
- data/test-unit/lib/test/unit.rb +0 -323
- data/test-unit/sample/adder.rb +0 -13
- data/test-unit/sample/subtracter.rb +0 -12
- data/test-unit/sample/test_adder.rb +0 -20
- data/test-unit/sample/test_subtracter.rb +0 -20
- data/test-unit/sample/test_user.rb +0 -23
- data/test-unit/test/collector/test-descendant.rb +0 -133
- data/test-unit/test/collector/test-load.rb +0 -442
- data/test-unit/test/collector/test_dir.rb +0 -406
- data/test-unit/test/collector/test_objectspace.rb +0 -100
- data/test-unit/test/run-test.rb +0 -15
- data/test-unit/test/test-attribute.rb +0 -86
- data/test-unit/test/test-color-scheme.rb +0 -67
- data/test-unit/test/test-color.rb +0 -47
- data/test-unit/test/test-diff.rb +0 -518
- data/test-unit/test/test-emacs-runner.rb +0 -60
- data/test-unit/test/test-fixture.rb +0 -287
- data/test-unit/test/test-notification.rb +0 -33
- data/test-unit/test/test-omission.rb +0 -81
- data/test-unit/test/test-pending.rb +0 -70
- data/test-unit/test/test-priority.rb +0 -119
- data/test-unit/test/test-testcase.rb +0 -544
- data/test-unit/test/test_assertions.rb +0 -1151
- data/test-unit/test/test_error.rb +0 -26
- data/test-unit/test/test_failure.rb +0 -33
- data/test-unit/test/test_testresult.rb +0 -113
- data/test-unit/test/test_testsuite.rb +0 -129
- data/test-unit/test/testunit-test-util.rb +0 -14
- data/test-unit/test/ui/test_testrunmediator.rb +0 -20
- data/test-unit/test/util/test-method-owner-finder.rb +0 -38
- data/test-unit/test/util/test_backtracefilter.rb +0 -41
- data/test-unit/test/util/test_observable.rb +0 -102
- data/test-unit/test/util/test_procwrapper.rb +0 -36
@@ -0,0 +1,698 @@
|
|
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 4
|
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_ACCESSOR_VIEW(object) ((RbGrnAccessor *)(object))
|
91
|
+
#define RB_GRN_EXPRESSION(object) ((RbGrnExpression *)(object))
|
92
|
+
#define RB_GRN_UNBIND_FUNCTION(function) ((RbGrnUnbindFunction)(function))
|
93
|
+
|
94
|
+
typedef void (*RbGrnUnbindFunction) (void *object);
|
95
|
+
|
96
|
+
typedef struct _RbGrnContext RbGrnContext;
|
97
|
+
struct _RbGrnContext
|
98
|
+
{
|
99
|
+
grn_ctx *context;
|
100
|
+
VALUE self;
|
101
|
+
};
|
102
|
+
|
103
|
+
typedef struct _RbGrnObject RbGrnObject;
|
104
|
+
struct _RbGrnObject
|
105
|
+
{
|
106
|
+
VALUE self;
|
107
|
+
grn_ctx *context;
|
108
|
+
grn_obj *object;
|
109
|
+
grn_obj *domain;
|
110
|
+
grn_id domain_id;
|
111
|
+
grn_obj *range;
|
112
|
+
grn_id range_id;
|
113
|
+
rb_grn_boolean need_close;
|
114
|
+
rb_grn_boolean have_finalizer;
|
115
|
+
};
|
116
|
+
|
117
|
+
typedef struct _RbGrnNamedObject RbGrnNamedObject;
|
118
|
+
struct _RbGrnNamedObject
|
119
|
+
{
|
120
|
+
RbGrnObject parent;
|
121
|
+
char *name;
|
122
|
+
unsigned name_size;
|
123
|
+
};
|
124
|
+
|
125
|
+
typedef struct _RbGrnTable RbGrnTable;
|
126
|
+
struct _RbGrnTable
|
127
|
+
{
|
128
|
+
RbGrnObject parent;
|
129
|
+
grn_obj *value;
|
130
|
+
VALUE columns;
|
131
|
+
};
|
132
|
+
|
133
|
+
typedef struct _RbGrnTableKeySupport RbGrnTableKeySupport;
|
134
|
+
struct _RbGrnTableKeySupport
|
135
|
+
{
|
136
|
+
RbGrnTable parent;
|
137
|
+
grn_obj *key;
|
138
|
+
};
|
139
|
+
|
140
|
+
typedef struct _RbGrnColumn RbGrnColumn;
|
141
|
+
struct _RbGrnColumn
|
142
|
+
{
|
143
|
+
RbGrnNamedObject parent;
|
144
|
+
grn_obj *value;
|
145
|
+
};
|
146
|
+
|
147
|
+
typedef struct _RbGrnIndexColumn RbGrnIndexColumn;
|
148
|
+
struct _RbGrnIndexColumn
|
149
|
+
{
|
150
|
+
RbGrnColumn parent;
|
151
|
+
grn_obj *old_value;
|
152
|
+
grn_obj *id_query;
|
153
|
+
grn_obj *string_query;
|
154
|
+
};
|
155
|
+
|
156
|
+
typedef struct _RbGrnAccessor RbGrnAccessor;
|
157
|
+
struct _RbGrnAccessor
|
158
|
+
{
|
159
|
+
RbGrnNamedObject parent;
|
160
|
+
};
|
161
|
+
|
162
|
+
typedef struct _RbGrnTableCursor RbGrnTableCursor;
|
163
|
+
struct _RbGrnTableCursor
|
164
|
+
{
|
165
|
+
RbGrnObject parent;
|
166
|
+
};
|
167
|
+
|
168
|
+
typedef struct _RbGrnVariable RbGrnVariable;
|
169
|
+
struct _RbGrnVariable
|
170
|
+
{
|
171
|
+
RbGrnObject parent;
|
172
|
+
};
|
173
|
+
|
174
|
+
typedef struct _RbGrnExpression RbGrnExpression;
|
175
|
+
struct _RbGrnExpression
|
176
|
+
{
|
177
|
+
RbGrnObject parent;
|
178
|
+
grn_obj *value;
|
179
|
+
};
|
180
|
+
|
181
|
+
RB_GRN_VAR rb_grn_boolean rb_grn_exited;
|
182
|
+
|
183
|
+
RB_GRN_VAR VALUE rb_eGrnError;
|
184
|
+
RB_GRN_VAR VALUE rb_eGrnObjectClosed;
|
185
|
+
RB_GRN_VAR VALUE rb_eGrnNoSuchColumn;
|
186
|
+
RB_GRN_VAR VALUE rb_eGrnInvalidArgument;
|
187
|
+
RB_GRN_VAR VALUE rb_cGrnObject;
|
188
|
+
RB_GRN_VAR VALUE rb_mGrnEncodingSupport;
|
189
|
+
RB_GRN_VAR VALUE rb_cGrnDatabase;
|
190
|
+
RB_GRN_VAR VALUE rb_cGrnTable;
|
191
|
+
RB_GRN_VAR VALUE rb_mGrnTableKeySupport;
|
192
|
+
RB_GRN_VAR VALUE rb_cGrnHash;
|
193
|
+
RB_GRN_VAR VALUE rb_cGrnPatriciaTrie;
|
194
|
+
RB_GRN_VAR VALUE rb_cGrnArray;
|
195
|
+
RB_GRN_VAR VALUE rb_cGrnView;
|
196
|
+
RB_GRN_VAR VALUE rb_cGrnTableCursor;
|
197
|
+
RB_GRN_VAR VALUE rb_mGrnTableCursorKeySupport;
|
198
|
+
RB_GRN_VAR VALUE rb_cGrnHashCursor;
|
199
|
+
RB_GRN_VAR VALUE rb_cGrnPatriciaTrieCursor;
|
200
|
+
RB_GRN_VAR VALUE rb_cGrnViewCursor;
|
201
|
+
RB_GRN_VAR VALUE rb_cGrnArrayCursor;
|
202
|
+
RB_GRN_VAR VALUE rb_cGrnType;
|
203
|
+
RB_GRN_VAR VALUE rb_cGrnProcedure;
|
204
|
+
RB_GRN_VAR VALUE rb_cGrnColumn;
|
205
|
+
RB_GRN_VAR VALUE rb_cGrnFixSizeColumn;
|
206
|
+
RB_GRN_VAR VALUE rb_cGrnVariableSizeColumn;
|
207
|
+
RB_GRN_VAR VALUE rb_cGrnIndexColumn;
|
208
|
+
RB_GRN_VAR VALUE rb_cGrnAccessor;
|
209
|
+
RB_GRN_VAR VALUE rb_cGrnViewAccessor;
|
210
|
+
RB_GRN_VAR VALUE rb_cGrnRecord;
|
211
|
+
RB_GRN_VAR VALUE rb_cGrnViewRecord;
|
212
|
+
RB_GRN_VAR VALUE rb_cGrnQuery;
|
213
|
+
RB_GRN_VAR VALUE rb_cGrnLogger;
|
214
|
+
RB_GRN_VAR VALUE rb_cGrnSnippet;
|
215
|
+
RB_GRN_VAR VALUE rb_cGrnVariable;
|
216
|
+
RB_GRN_VAR VALUE rb_cGrnOperation;
|
217
|
+
RB_GRN_VAR VALUE rb_cGrnExpression;
|
218
|
+
RB_GRN_VAR VALUE rb_cGrnRecordExpressionBuilder;
|
219
|
+
RB_GRN_VAR VALUE rb_cGrnColumnExpressionBuilder;
|
220
|
+
|
221
|
+
void rb_grn_init_utils (VALUE mGrn);
|
222
|
+
void rb_grn_init_exception (VALUE mGrn);
|
223
|
+
void rb_grn_init_encoding (VALUE mGrn);
|
224
|
+
void rb_grn_init_encoding_support (VALUE mGrn);
|
225
|
+
void rb_grn_init_context (VALUE mGrn);
|
226
|
+
void rb_grn_init_object (VALUE mGrn);
|
227
|
+
void rb_grn_init_database (VALUE mGrn);
|
228
|
+
void rb_grn_init_table (VALUE mGrn);
|
229
|
+
void rb_grn_init_table_key_support (VALUE mGrn);
|
230
|
+
void rb_grn_init_array (VALUE mGrn);
|
231
|
+
void rb_grn_init_hash (VALUE mGrn);
|
232
|
+
void rb_grn_init_patricia_trie (VALUE mGrn);
|
233
|
+
void rb_grn_init_view (VALUE mGrn);
|
234
|
+
void rb_grn_init_table_cursor (VALUE mGrn);
|
235
|
+
void rb_grn_init_table_cursor_key_support (VALUE mGrn);
|
236
|
+
void rb_grn_init_array_cursor (VALUE mGrn);
|
237
|
+
void rb_grn_init_hash_cursor (VALUE mGrn);
|
238
|
+
void rb_grn_init_patricia_trie_cursor (VALUE mGrn);
|
239
|
+
void rb_grn_init_view_cursor (VALUE mGrn);
|
240
|
+
void rb_grn_init_type (VALUE mGrn);
|
241
|
+
void rb_grn_init_procedure (VALUE mGrn);
|
242
|
+
void rb_grn_init_column (VALUE mGrn);
|
243
|
+
void rb_grn_init_fix_size_column (VALUE mGrn);
|
244
|
+
void rb_grn_init_variable_size_column (VALUE mGrn);
|
245
|
+
void rb_grn_init_index_column (VALUE mGrn);
|
246
|
+
void rb_grn_init_accessor (VALUE mGrn);
|
247
|
+
void rb_grn_init_view_accessor (VALUE mGrn);
|
248
|
+
void rb_grn_init_record (VALUE mGrn);
|
249
|
+
void rb_grn_init_view_record (VALUE mGrn);
|
250
|
+
void rb_grn_init_query (VALUE mGrn);
|
251
|
+
void rb_grn_init_variable (VALUE mGrn);
|
252
|
+
void rb_grn_init_operation (VALUE mGrn);
|
253
|
+
void rb_grn_init_expression (VALUE mGrn);
|
254
|
+
void rb_grn_init_expression_builder (VALUE mGrn);
|
255
|
+
void rb_grn_init_logger (VALUE mGrn);
|
256
|
+
void rb_grn_init_snippet (VALUE mGrn);
|
257
|
+
|
258
|
+
VALUE rb_grn_rc_to_exception (grn_rc rc);
|
259
|
+
const char *rb_grn_rc_to_message (grn_rc rc);
|
260
|
+
void rb_grn_rc_check (grn_rc rc,
|
261
|
+
VALUE related_object);
|
262
|
+
|
263
|
+
void rb_grn_context_fin (grn_ctx *context);
|
264
|
+
grn_ctx *rb_grn_context_ensure (VALUE *context);
|
265
|
+
VALUE rb_grn_context_get_default (void);
|
266
|
+
VALUE rb_grn_context_to_exception (grn_ctx *context,
|
267
|
+
VALUE related_object);
|
268
|
+
void rb_grn_context_check (grn_ctx *context,
|
269
|
+
VALUE related_object);
|
270
|
+
grn_obj *rb_grn_context_get_backward_compatibility
|
271
|
+
(grn_ctx *context,
|
272
|
+
const char *name,
|
273
|
+
unsigned int name_size);
|
274
|
+
|
275
|
+
const char *rb_grn_inspect (VALUE object);
|
276
|
+
void rb_grn_scan_options (VALUE options, ...)
|
277
|
+
RB_GRN_GNUC_NULL_TERMINATED;
|
278
|
+
rb_grn_boolean rb_grn_equal_option (VALUE option,
|
279
|
+
const char *key);
|
280
|
+
|
281
|
+
VALUE rb_grn_object_alloc (VALUE klass);
|
282
|
+
void rb_grn_object_bind (VALUE self,
|
283
|
+
VALUE rb_context,
|
284
|
+
RbGrnObject *rb_grn_object,
|
285
|
+
grn_ctx *context,
|
286
|
+
grn_obj *object);
|
287
|
+
void rb_grn_object_free (RbGrnObject *rb_grn_object);
|
288
|
+
void rb_grn_object_assign (VALUE klass,
|
289
|
+
VALUE self,
|
290
|
+
VALUE rb_context,
|
291
|
+
grn_ctx *context,
|
292
|
+
grn_obj *object);
|
293
|
+
void rb_grn_object_deconstruct (RbGrnObject *rb_grn_object,
|
294
|
+
grn_obj **object,
|
295
|
+
grn_ctx **context,
|
296
|
+
grn_id *domain_id,
|
297
|
+
grn_obj **domain,
|
298
|
+
grn_id *range_id,
|
299
|
+
grn_obj **range);
|
300
|
+
|
301
|
+
VALUE rb_grn_object_get_id (VALUE object);
|
302
|
+
VALUE rb_grn_object_array_reference (VALUE object,
|
303
|
+
VALUE rb_id);
|
304
|
+
VALUE rb_grn_object_set_raw (RbGrnObject *rb_grn_object,
|
305
|
+
grn_id id,
|
306
|
+
VALUE rb_value,
|
307
|
+
int flags,
|
308
|
+
VALUE related_object);
|
309
|
+
VALUE rb_grn_object_close (VALUE object);
|
310
|
+
VALUE rb_grn_object_closed_p (VALUE object);
|
311
|
+
VALUE rb_grn_object_inspect_object (VALUE inspected,
|
312
|
+
grn_ctx *context,
|
313
|
+
grn_obj *object);
|
314
|
+
VALUE rb_grn_object_inspect_object_content (VALUE inspected,
|
315
|
+
grn_ctx *context,
|
316
|
+
grn_obj *object);
|
317
|
+
VALUE rb_grn_object_inspect_header (VALUE object,
|
318
|
+
VALUE inspected);
|
319
|
+
VALUE rb_grn_object_inspect_content (VALUE object,
|
320
|
+
VALUE inspected);
|
321
|
+
VALUE rb_grn_object_inspect_footer (VALUE object,
|
322
|
+
VALUE inspected);
|
323
|
+
|
324
|
+
void rb_grn_named_object_bind (RbGrnNamedObject *rb_grn_named_object,
|
325
|
+
grn_ctx *context,
|
326
|
+
grn_obj *object);
|
327
|
+
void rb_grn_named_object_finalizer (grn_ctx *context,
|
328
|
+
grn_obj *column,
|
329
|
+
RbGrnNamedObject *rb_grn_named_object);
|
330
|
+
void rb_grn_named_object_set_name (RbGrnNamedObject *rb_grn_named_object,
|
331
|
+
const char *name,
|
332
|
+
unsigned name_size);
|
333
|
+
|
334
|
+
void rb_grn_table_bind (RbGrnTable *rb_grn_table,
|
335
|
+
grn_ctx *context,
|
336
|
+
grn_obj *table_key_support);
|
337
|
+
void rb_grn_table_finalizer (grn_ctx *context,
|
338
|
+
grn_obj *grn_object,
|
339
|
+
RbGrnTable *rb_grn_table);
|
340
|
+
void rb_grn_table_deconstruct (RbGrnTable *rb_grn_table,
|
341
|
+
grn_obj **table,
|
342
|
+
grn_ctx **context,
|
343
|
+
grn_id *domain_id,
|
344
|
+
grn_obj **domain,
|
345
|
+
grn_obj **value,
|
346
|
+
grn_id *range_id,
|
347
|
+
grn_obj **range,
|
348
|
+
VALUE *columns);
|
349
|
+
|
350
|
+
VALUE rb_grn_table_delete (VALUE self,
|
351
|
+
VALUE rb_id);
|
352
|
+
VALUE rb_grn_table_array_reference (VALUE self,
|
353
|
+
VALUE rb_id);
|
354
|
+
VALUE rb_grn_table_array_set (VALUE self,
|
355
|
+
VALUE rb_id,
|
356
|
+
VALUE rb_value);
|
357
|
+
VALUE rb_grn_table_get_value (VALUE self,
|
358
|
+
VALUE rb_id);
|
359
|
+
VALUE rb_grn_table_set_value (VALUE self,
|
360
|
+
VALUE rb_id,
|
361
|
+
VALUE rb_value);
|
362
|
+
VALUE rb_grn_table_get_column (VALUE self,
|
363
|
+
VALUE rb_name);
|
364
|
+
VALUE rb_grn_table_get_column_surely (VALUE self,
|
365
|
+
VALUE rb_name);
|
366
|
+
VALUE rb_grn_table_get_column_value_raw (VALUE self,
|
367
|
+
grn_id id,
|
368
|
+
VALUE rb_name);
|
369
|
+
VALUE rb_grn_table_get_column_value (VALUE self,
|
370
|
+
VALUE rb_id,
|
371
|
+
VALUE rb_name);
|
372
|
+
VALUE rb_grn_table_set_column_value_raw (VALUE self,
|
373
|
+
grn_id id,
|
374
|
+
VALUE rb_name,
|
375
|
+
VALUE rb_value);
|
376
|
+
VALUE rb_grn_table_set_column_value (VALUE self,
|
377
|
+
VALUE rb_id,
|
378
|
+
VALUE rb_name,
|
379
|
+
VALUE rb_value);
|
380
|
+
|
381
|
+
grn_ctx *rb_grn_table_cursor_ensure_context (VALUE cursor,
|
382
|
+
VALUE *rb_context);
|
383
|
+
|
384
|
+
void rb_grn_table_key_support_bind (RbGrnTableKeySupport *rb_grn_table_key_support,
|
385
|
+
grn_ctx *context,
|
386
|
+
grn_obj *table_key_support);
|
387
|
+
void rb_grn_table_key_support_finalizer (grn_ctx *context,
|
388
|
+
grn_obj *grn_object,
|
389
|
+
RbGrnTableKeySupport *rb_grn_table_key_support);
|
390
|
+
void rb_grn_table_key_support_deconstruct (RbGrnTableKeySupport *rb_grn_table_key_support,
|
391
|
+
grn_obj **table_key_support,
|
392
|
+
grn_ctx **context,
|
393
|
+
grn_obj **key,
|
394
|
+
grn_id *domain_id,
|
395
|
+
grn_obj **domain,
|
396
|
+
grn_obj **value,
|
397
|
+
grn_id *range_id,
|
398
|
+
grn_obj **range,
|
399
|
+
VALUE *columns);
|
400
|
+
grn_id rb_grn_table_key_support_get (VALUE self,
|
401
|
+
VALUE rb_key);
|
402
|
+
|
403
|
+
void rb_grn_column_bind (RbGrnColumn *rb_grn_column,
|
404
|
+
grn_ctx *context,
|
405
|
+
grn_obj *column);
|
406
|
+
void rb_grn_column_finalizer (grn_ctx *context,
|
407
|
+
grn_obj *column,
|
408
|
+
RbGrnColumn *rb_grn_column);
|
409
|
+
void rb_grn_column_deconstruct (RbGrnColumn *rb_grn_column,
|
410
|
+
grn_obj **column,
|
411
|
+
grn_ctx **context,
|
412
|
+
grn_id *domain_id,
|
413
|
+
grn_obj **domain,
|
414
|
+
grn_obj **value,
|
415
|
+
grn_id *range_id,
|
416
|
+
grn_obj **range);
|
417
|
+
|
418
|
+
void rb_grn_index_column_bind (RbGrnIndexColumn *rb_grn_index_column,
|
419
|
+
grn_ctx *context,
|
420
|
+
grn_obj *object);
|
421
|
+
void rb_grn_index_column_finalizer (grn_ctx *context,
|
422
|
+
grn_obj *grn_object,
|
423
|
+
RbGrnIndexColumn *rb_grn_index_column);
|
424
|
+
void rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_index_column,
|
425
|
+
grn_obj **column,
|
426
|
+
grn_ctx **context,
|
427
|
+
grn_id *domain_id,
|
428
|
+
grn_obj **domain,
|
429
|
+
grn_obj **value,
|
430
|
+
grn_obj **old_value,
|
431
|
+
grn_id *range_id,
|
432
|
+
grn_obj **range,
|
433
|
+
grn_obj **id_query,
|
434
|
+
grn_obj **string_query);
|
435
|
+
|
436
|
+
void rb_grn_accessor_bind (RbGrnAccessor *rb_grn_accessor,
|
437
|
+
grn_ctx *context,
|
438
|
+
grn_obj *accessor);
|
439
|
+
void rb_grn_accessor_finalizer (grn_ctx *context,
|
440
|
+
grn_obj *accessor,
|
441
|
+
RbGrnAccessor *rb_grn_accessor);
|
442
|
+
|
443
|
+
void rb_grn_expression_bind (RbGrnExpression *rb_grn_expression,
|
444
|
+
grn_ctx *context,
|
445
|
+
grn_obj *expression);
|
446
|
+
void rb_grn_expression_finalizer (grn_ctx *context,
|
447
|
+
grn_obj *grn_object,
|
448
|
+
RbGrnExpression *rb_grn_expression);
|
449
|
+
|
450
|
+
VALUE rb_grn_record_new (VALUE table,
|
451
|
+
grn_id id,
|
452
|
+
VALUE values);
|
453
|
+
VALUE rb_grn_record_new_raw (VALUE table,
|
454
|
+
VALUE id,
|
455
|
+
VALUE values);
|
456
|
+
|
457
|
+
VALUE rb_grn_view_record_new (VALUE view,
|
458
|
+
grn_obj *id);
|
459
|
+
VALUE rb_grn_view_record_new_raw (VALUE view,
|
460
|
+
VALUE id);
|
461
|
+
|
462
|
+
VALUE rb_grn_record_expression_builder_new (VALUE table,
|
463
|
+
VALUE name);
|
464
|
+
VALUE rb_grn_record_expression_builder_build
|
465
|
+
(VALUE self);
|
466
|
+
VALUE rb_grn_column_expression_builder_new (VALUE column,
|
467
|
+
VALUE name,
|
468
|
+
VALUE query);
|
469
|
+
VALUE rb_grn_column_expression_builder_build
|
470
|
+
(VALUE self);
|
471
|
+
|
472
|
+
|
473
|
+
#define RB_GRN_INTERN(string) (ID2SYM(rb_intern(string)))
|
474
|
+
|
475
|
+
#define RVAL2CBOOL(object) (RTEST(object))
|
476
|
+
#define CBOOL2RVAL(boolean) ((boolean) ? Qtrue : Qfalse)
|
477
|
+
|
478
|
+
#define RVAL2GRNENCODING(object, context) \
|
479
|
+
(rb_grn_encoding_from_ruby_object(object, context))
|
480
|
+
#define GRNENCODING2RVAL(encoding) (rb_grn_encoding_to_ruby_object(encoding))
|
481
|
+
|
482
|
+
#define RVAL2GRNCONTEXT(object) (rb_grn_context_from_ruby_object(object))
|
483
|
+
#define GRNCONTEXT2RVAL(context) (rb_grn_context_to_ruby_object(context))
|
484
|
+
|
485
|
+
#define RVAL2GRNOBJECT(rb_object, context) \
|
486
|
+
(rb_grn_object_from_ruby_object(rb_object, context))
|
487
|
+
#define GRNOBJECT2RVAL(klass, context, object, owner) \
|
488
|
+
(rb_grn_object_to_ruby_object(klass, context, object, owner))
|
489
|
+
#define GRNOBJECT2RCLASS(object) (rb_grn_object_to_ruby_class(object))
|
490
|
+
|
491
|
+
/* TODO: MORE BETTER NAME!!! PLEASE!!! */
|
492
|
+
#define RVAL2GRNOBJ(rb_object, context, object) \
|
493
|
+
(rb_grn_obj_from_ruby_object(rb_object, context, object))
|
494
|
+
#define GRNOBJ2RVAL(klass, context, object, related_object) \
|
495
|
+
(rb_grn_obj_to_ruby_object(klass, context, object, related_object))
|
496
|
+
|
497
|
+
#define RVAL2GRNDB(object) (rb_grn_database_from_ruby_object(object))
|
498
|
+
#define GRNDB2RVAL(context, db, owner) \
|
499
|
+
(rb_grn_database_to_ruby_object(context, db, owner))
|
500
|
+
|
501
|
+
#define RVAL2GRNTABLE(object, context)(rb_grn_table_from_ruby_object(object, context))
|
502
|
+
#define GRNTABLE2RVAL(context, table, owner) \
|
503
|
+
(rb_grn_table_to_ruby_object(context, table, owner))
|
504
|
+
|
505
|
+
#define RVAL2GRNTABLECURSOR(object) (rb_grn_table_cursor_from_ruby_object(object))
|
506
|
+
#define GRNTABLECURSOR2RVAL(klass, context, cursor) \
|
507
|
+
(rb_grn_table_cursor_to_ruby_object(klass, context, cursor, RB_GRN_TRUE))
|
508
|
+
#define GRNTABLECURSOR2RCLASS(object) (rb_grn_table_cursor_to_ruby_class(object))
|
509
|
+
|
510
|
+
#define RVAL2GRNCOLUMN(object, context) \
|
511
|
+
(rb_grn_column_from_ruby_object(object, context))
|
512
|
+
#define GRNCOLUMN2RVAL(klass, context, column, owner) \
|
513
|
+
(rb_grn_column_to_ruby_object(klass, context, column, owner))
|
514
|
+
|
515
|
+
#define RVAL2GRNQUERY(object) (rb_grn_query_from_ruby_object(object))
|
516
|
+
#define GRNQUERY2RVAL(context, column)(rb_grn_query_to_ruby_object(context, column))
|
517
|
+
|
518
|
+
#define RVAL2GRNOPERATOR(object) (rb_grn_operator_from_ruby_object(object))
|
519
|
+
|
520
|
+
#define RVAL2GRNLOGGER(object) (rb_grn_logger_from_ruby_object(object))
|
521
|
+
|
522
|
+
#define RVAL2GRNBULK(object, context, bulk) \
|
523
|
+
(rb_grn_bulk_from_ruby_object(object, context, bulk))
|
524
|
+
#define RVAL2GRNBULK_WITH_TYPE(object, context, bulk, type_id, type) \
|
525
|
+
(rb_grn_bulk_from_ruby_object_with_type(object, context, bulk, type_id, type))
|
526
|
+
#define GRNBULK2RVAL(context, bulk, range, related_object) \
|
527
|
+
(rb_grn_bulk_to_ruby_object(context, bulk, range, related_object))
|
528
|
+
|
529
|
+
#define RVAL2GRNVECTOR(object, context, vector) \
|
530
|
+
(rb_grn_vector_from_ruby_object(object, context, vector))
|
531
|
+
#define GRNVECTOR2RVAL(context, vector) \
|
532
|
+
(rb_grn_vector_to_ruby_object(context, vector))
|
533
|
+
|
534
|
+
#define RVAL2GRNUVECTOR(object, context, uvector, related_object) \
|
535
|
+
(rb_grn_uvector_from_ruby_object(object, context, uvector, related_object))
|
536
|
+
#define GRNUVECTOR2RVAL(context, uvector) \
|
537
|
+
(rb_grn_uvector_to_ruby_object(context, uvector))
|
538
|
+
|
539
|
+
#define GRNVALUE2RVAL(context, value, range, related_object) \
|
540
|
+
(rb_grn_value_to_ruby_object(context, value, range, related_object))
|
541
|
+
|
542
|
+
#define RVAL2GRNID(object, context, table, related_object) \
|
543
|
+
(rb_grn_id_from_ruby_object(object, context, table, related_object))
|
544
|
+
|
545
|
+
#define GRNKEY2RVAL(context, key, key_size, table, related_object) \
|
546
|
+
(rb_grn_key_to_ruby_object(context, key, key_size, table, related_object))
|
547
|
+
#define RVAL2GRNKEY(object, context, key, domain_id, domain, related_object) \
|
548
|
+
(rb_grn_key_from_ruby_object(object, context, key, domain_id, \
|
549
|
+
domain, related_object))
|
550
|
+
|
551
|
+
#define GRNVARIABLE2RVAL(context, variable) \
|
552
|
+
(rb_grn_variable_to_ruby_object(context, variable))
|
553
|
+
#define RVAL2GRNVARIABLE(object, context) \
|
554
|
+
(rb_grn_variable_from_ruby_object(object, context))
|
555
|
+
|
556
|
+
#define GRNSNIPPET2RVAL(context, snippet, owner) \
|
557
|
+
(rb_grn_snippet_to_ruby_object(context, snippet, owner))
|
558
|
+
#define RVAL2GRNSNIPPET(snippet) \
|
559
|
+
(rb_grn_snippet_from_ruby_object(snippet))
|
560
|
+
|
561
|
+
|
562
|
+
grn_encoding rb_grn_encoding_from_ruby_object (VALUE object,
|
563
|
+
grn_ctx *context);
|
564
|
+
VALUE rb_grn_encoding_to_ruby_object (grn_encoding encoding);
|
565
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
566
|
+
rb_encoding *rb_grn_encoding_to_ruby_encoding (grn_encoding encoding);
|
567
|
+
#endif
|
568
|
+
|
569
|
+
grn_ctx *rb_grn_context_from_ruby_object (VALUE object);
|
570
|
+
VALUE rb_grn_context_to_ruby_object (grn_ctx *context);
|
571
|
+
VALUE rb_grn_context_rb_string_new (grn_ctx *context,
|
572
|
+
const char *string,
|
573
|
+
long length);
|
574
|
+
VALUE rb_grn_context_rb_string_encode (grn_ctx *context,
|
575
|
+
VALUE rb_string);
|
576
|
+
void rb_grn_context_text_set (grn_ctx *context,
|
577
|
+
grn_obj *bulk,
|
578
|
+
VALUE rb_string);
|
579
|
+
|
580
|
+
grn_obj *rb_grn_object_from_ruby_object (VALUE object,
|
581
|
+
grn_ctx **context);
|
582
|
+
VALUE rb_grn_object_to_ruby_object (VALUE klass,
|
583
|
+
grn_ctx *context,
|
584
|
+
grn_obj *object,
|
585
|
+
rb_grn_boolean owner);
|
586
|
+
VALUE rb_grn_object_to_ruby_class (grn_obj *object);
|
587
|
+
|
588
|
+
grn_obj *rb_grn_database_from_ruby_object (VALUE object);
|
589
|
+
VALUE rb_grn_database_to_ruby_object (grn_ctx *context,
|
590
|
+
grn_obj *db,
|
591
|
+
rb_grn_boolean owner);
|
592
|
+
|
593
|
+
grn_obj *rb_grn_table_from_ruby_object (VALUE object,
|
594
|
+
grn_ctx **context);
|
595
|
+
VALUE rb_grn_table_to_ruby_object (grn_ctx *context,
|
596
|
+
grn_obj *table,
|
597
|
+
rb_grn_boolean owner);
|
598
|
+
|
599
|
+
grn_table_cursor *
|
600
|
+
rb_grn_table_cursor_from_ruby_object (VALUE object,
|
601
|
+
grn_ctx **context);
|
602
|
+
VALUE rb_grn_table_cursor_to_ruby_object (VALUE klass,
|
603
|
+
grn_ctx *context,
|
604
|
+
grn_table_cursor *cursor,
|
605
|
+
rb_grn_boolean owner);
|
606
|
+
VALUE rb_grn_table_cursor_to_ruby_class (grn_table_cursor *cursor);
|
607
|
+
void rb_grn_table_cursor_deconstruct (RbGrnTableCursor *rb_grn_table_cursor,
|
608
|
+
grn_table_cursor **cursor,
|
609
|
+
grn_ctx **context,
|
610
|
+
grn_id *domain_id,
|
611
|
+
grn_obj **domain,
|
612
|
+
grn_id *range_id,
|
613
|
+
grn_obj **range);
|
614
|
+
|
615
|
+
grn_obj *rb_grn_column_from_ruby_object (VALUE object,
|
616
|
+
grn_ctx **context);
|
617
|
+
VALUE rb_grn_column_to_ruby_object (VALUE klass,
|
618
|
+
grn_ctx *context,
|
619
|
+
grn_obj *column,
|
620
|
+
rb_grn_boolean owner);
|
621
|
+
|
622
|
+
grn_query *rb_grn_query_from_ruby_object (VALUE object);
|
623
|
+
VALUE rb_grn_query_to_ruby_object (grn_ctx *context,
|
624
|
+
grn_query *query);
|
625
|
+
|
626
|
+
grn_operator rb_grn_operator_from_ruby_object (VALUE object);
|
627
|
+
|
628
|
+
grn_logger_info *
|
629
|
+
rb_grn_logger_from_ruby_object (VALUE object);
|
630
|
+
|
631
|
+
grn_obj *rb_grn_bulk_from_ruby_object (VALUE object,
|
632
|
+
grn_ctx *context,
|
633
|
+
grn_obj *bulk);
|
634
|
+
grn_obj *rb_grn_bulk_from_ruby_object_with_type
|
635
|
+
(VALUE object,
|
636
|
+
grn_ctx *context,
|
637
|
+
grn_obj *bulk,
|
638
|
+
grn_id type_id,
|
639
|
+
grn_obj *type);
|
640
|
+
VALUE rb_grn_bulk_to_ruby_object (grn_ctx *context,
|
641
|
+
grn_obj *bulk,
|
642
|
+
grn_obj *range,
|
643
|
+
VALUE related_object);
|
644
|
+
grn_obj *rb_grn_vector_from_ruby_object (VALUE object,
|
645
|
+
grn_ctx *context,
|
646
|
+
grn_obj *vector);
|
647
|
+
VALUE rb_grn_vector_to_ruby_object (grn_ctx *context,
|
648
|
+
grn_obj *vector);
|
649
|
+
grn_obj *rb_grn_uvector_from_ruby_object (VALUE object,
|
650
|
+
grn_ctx *context,
|
651
|
+
grn_obj *uvector,
|
652
|
+
VALUE related_object);
|
653
|
+
VALUE rb_grn_uvector_to_ruby_object (grn_ctx *context,
|
654
|
+
grn_obj *uvector);
|
655
|
+
|
656
|
+
VALUE rb_grn_value_to_ruby_object (grn_ctx *context,
|
657
|
+
grn_obj *value,
|
658
|
+
grn_obj *range,
|
659
|
+
VALUE related_object);
|
660
|
+
|
661
|
+
grn_id rb_grn_id_from_ruby_object (VALUE object,
|
662
|
+
grn_ctx *context,
|
663
|
+
grn_obj *table,
|
664
|
+
VALUE related_object);
|
665
|
+
|
666
|
+
VALUE rb_grn_key_to_ruby_object (grn_ctx *context,
|
667
|
+
const void *key,
|
668
|
+
int key_size,
|
669
|
+
grn_obj *table,
|
670
|
+
VALUE related_object);
|
671
|
+
grn_obj *rb_grn_key_from_ruby_object (VALUE rb_key,
|
672
|
+
grn_ctx *context,
|
673
|
+
grn_obj *key,
|
674
|
+
grn_id domain_id,
|
675
|
+
grn_obj *domain,
|
676
|
+
VALUE related_object);
|
677
|
+
|
678
|
+
VALUE rb_grn_variable_to_ruby_object (grn_ctx *context,
|
679
|
+
grn_obj *variable);
|
680
|
+
grn_obj *rb_grn_variable_from_ruby_object (VALUE rb_variable,
|
681
|
+
grn_ctx **context);
|
682
|
+
|
683
|
+
grn_obj *rb_grn_obj_from_ruby_object (VALUE rb_object,
|
684
|
+
grn_ctx *context,
|
685
|
+
grn_obj **obj);
|
686
|
+
VALUE rb_grn_obj_to_ruby_object (VALUE klass,
|
687
|
+
grn_ctx *context,
|
688
|
+
grn_obj *obj,
|
689
|
+
VALUE related_object);
|
690
|
+
|
691
|
+
grn_snip *rb_grn_snippet_from_ruby_object (VALUE rb_snippet);
|
692
|
+
VALUE rb_grn_snippet_to_ruby_object (grn_ctx *context,
|
693
|
+
grn_snip *snippet,
|
694
|
+
rb_grn_boolean owner);
|
695
|
+
|
696
|
+
RB_GRN_END_DECLS
|
697
|
+
|
698
|
+
#endif
|