rroonga 3.0.5-x86-mingw32 → 3.0.6-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/AUTHORS +5 -0
- data/Gemfile +20 -0
- data/Rakefile +187 -0
- data/doc/text/news.textile +7 -0
- data/doc/text/tutorial.textile +0 -2
- data/ext/groonga/extconf.rb +7 -1
- data/ext/groonga/rb-grn-accessor.c +11 -11
- data/ext/groonga/rb-grn-array.c +25 -25
- data/ext/groonga/rb-grn-column.c +106 -106
- data/ext/groonga/rb-grn-context.c +121 -121
- data/ext/groonga/rb-grn-database.c +78 -78
- data/ext/groonga/rb-grn-double-array-trie.c +92 -92
- data/ext/groonga/rb-grn-encoding-support.c +1 -1
- data/ext/groonga/rb-grn-encoding.c +28 -28
- data/ext/groonga/rb-grn-exception.c +9 -9
- data/ext/groonga/rb-grn-expression-builder.c +6 -6
- data/ext/groonga/rb-grn-expression.c +87 -87
- data/ext/groonga/rb-grn-fix-size-column.c +12 -12
- data/ext/groonga/rb-grn-geo-point.c +2 -2
- data/ext/groonga/rb-grn-hash.c +38 -38
- data/ext/groonga/rb-grn-index-column.c +191 -191
- data/ext/groonga/rb-grn-index-cursor.c +29 -29
- data/ext/groonga/rb-grn-logger.c +36 -36
- data/ext/groonga/rb-grn-normalizer.c +10 -10
- data/ext/groonga/rb-grn-patricia-trie.c +196 -196
- data/ext/groonga/rb-grn-plugin.c +5 -5
- data/ext/groonga/rb-grn-posting.c +2 -2
- data/ext/groonga/rb-grn-procedure.c +2 -2
- data/ext/groonga/rb-grn-query-logger.c +1 -1
- data/ext/groonga/rb-grn-record.c +1 -1
- data/ext/groonga/rb-grn-snippet.c +14 -14
- data/ext/groonga/rb-grn-table-cursor-key-support.c +4 -4
- data/ext/groonga/rb-grn-table-cursor.c +52 -52
- data/ext/groonga/rb-grn-table-key-support.c +209 -209
- data/ext/groonga/rb-grn-type.c +18 -18
- data/ext/groonga/rb-grn-utils.c +332 -314
- data/ext/groonga/rb-grn-variable-size-column.c +34 -34
- data/ext/groonga/rb-grn-variable.c +2 -2
- data/ext/groonga/rb-grn.h +240 -232
- data/ext/groonga/rb-groonga.c +10 -10
- data/lib/1.9/groonga.so +0 -0
- data/lib/2.0/groonga.so +0 -0
- data/rroonga-build.rb +7 -0
- data/rroonga.gemspec +1 -1
- data/test/test-hash.rb +4 -4
- data/test/test-index-column.rb +271 -257
- data/test/test-table-key-support.rb +78 -0
- data/test/test-table.rb +78 -51
- metadata +8 -3
@@ -55,42 +55,42 @@ rb_grn_variable_size_column_compressed_p (int argc, VALUE *argv, VALUE self)
|
|
55
55
|
rb_scan_args(argc, argv, "01", &type);
|
56
56
|
|
57
57
|
if (NIL_P(type)) {
|
58
|
-
|
58
|
+
accept_any_type = GRN_TRUE;
|
59
59
|
} else {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
if (rb_grn_equal_option(type, "zlib")) {
|
61
|
+
need_zlib_check = GRN_TRUE;
|
62
|
+
} else if (rb_grn_equal_option(type, "lzo")) {
|
63
|
+
need_lzo_check = GRN_TRUE;
|
64
|
+
} else {
|
65
|
+
rb_raise(rb_eArgError,
|
66
|
+
"compressed type should be <:zlib> or <:lzo>: <%s>",
|
67
|
+
rb_grn_inspect(type));
|
68
|
+
}
|
69
69
|
}
|
70
70
|
|
71
71
|
rb_grn_column = SELF(self);
|
72
72
|
rb_grn_object_deconstruct(RB_GRN_OBJECT(rb_grn_column), &column, &context,
|
73
|
-
|
74
|
-
|
73
|
+
NULL, NULL,
|
74
|
+
NULL, NULL);
|
75
75
|
|
76
76
|
flags = column->header.flags;
|
77
77
|
switch (flags & GRN_OBJ_COMPRESS_MASK) {
|
78
78
|
case GRN_OBJ_COMPRESS_ZLIB:
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
79
|
+
if (accept_any_type || need_zlib_check) {
|
80
|
+
grn_obj support_p;
|
81
|
+
GRN_BOOL_INIT(&support_p, 0);
|
82
|
+
grn_obj_get_info(context, NULL, GRN_INFO_SUPPORT_ZLIB, &support_p);
|
83
|
+
compressed_p = GRN_BOOL_VALUE(&support_p);
|
84
|
+
}
|
85
|
+
break;
|
86
86
|
case GRN_OBJ_COMPRESS_LZO:
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
87
|
+
if (accept_any_type || need_lzo_check) {
|
88
|
+
grn_obj support_p;
|
89
|
+
GRN_BOOL_INIT(&support_p, 0);
|
90
|
+
grn_obj_get_info(context, NULL, GRN_INFO_SUPPORT_LZO, &support_p);
|
91
|
+
compressed_p = GRN_BOOL_VALUE(&support_p);
|
92
|
+
}
|
93
|
+
break;
|
94
94
|
}
|
95
95
|
|
96
96
|
return CBOOL2RVAL(compressed_p);
|
@@ -121,16 +121,16 @@ rb_grn_variable_size_column_defrag (int argc, VALUE *argv, VALUE self)
|
|
121
121
|
|
122
122
|
rb_scan_args(argc, argv, "01", &options);
|
123
123
|
rb_grn_scan_options(options,
|
124
|
-
|
125
|
-
|
124
|
+
"threshold", &rb_threshold,
|
125
|
+
NULL);
|
126
126
|
if (!NIL_P(rb_threshold)) {
|
127
|
-
|
127
|
+
threshold = NUM2INT(rb_threshold);
|
128
128
|
}
|
129
129
|
|
130
130
|
rb_grn_column = SELF(self);
|
131
131
|
rb_grn_object_deconstruct(RB_GRN_OBJECT(rb_grn_column), &column, &context,
|
132
|
-
|
133
|
-
|
132
|
+
NULL, NULL,
|
133
|
+
NULL, NULL);
|
134
134
|
n_segments = grn_obj_defrag(context, column, threshold);
|
135
135
|
rb_grn_context_check(context, self);
|
136
136
|
|
@@ -141,10 +141,10 @@ void
|
|
141
141
|
rb_grn_init_variable_size_column (VALUE mGrn)
|
142
142
|
{
|
143
143
|
rb_cGrnVariableSizeColumn =
|
144
|
-
|
144
|
+
rb_define_class_under(mGrn, "VariableSizeColumn", rb_cGrnColumn);
|
145
145
|
|
146
146
|
rb_define_method(rb_cGrnVariableSizeColumn, "compressed?",
|
147
|
-
|
147
|
+
rb_grn_variable_size_column_compressed_p, -1);
|
148
148
|
rb_define_method(rb_cGrnVariableSizeColumn, "defrag",
|
149
|
-
|
149
|
+
rb_grn_variable_size_column_defrag, -1);
|
150
150
|
}
|
@@ -54,8 +54,8 @@ rb_grn_variable_deconstruct (RbGrnVariable *rb_grn_variable,
|
|
54
54
|
|
55
55
|
rb_grn_object = RB_GRN_OBJECT(rb_grn_variable);
|
56
56
|
rb_grn_object_deconstruct(rb_grn_object, variable, context,
|
57
|
-
|
58
|
-
|
57
|
+
domain_id, domain,
|
58
|
+
range_id, range);
|
59
59
|
}
|
60
60
|
|
61
61
|
/*
|
data/ext/groonga/rb-grn.h
CHANGED
@@ -32,6 +32,14 @@
|
|
32
32
|
# define RETURN_ENUMERATOR(obj, argc, argv)
|
33
33
|
#endif
|
34
34
|
|
35
|
+
#ifndef NUM2SHORT
|
36
|
+
# define NUM2SHORT(object) NUM2INT(object)
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef NUM2USHORT
|
40
|
+
# define NUM2USHORT(object) NUM2UINT(object)
|
41
|
+
#endif
|
42
|
+
|
35
43
|
#include <groonga.h>
|
36
44
|
|
37
45
|
#if defined(__cplusplus)
|
@@ -76,7 +84,7 @@ RB_GRN_BEGIN_DECLS
|
|
76
84
|
|
77
85
|
#define RB_GRN_MAJOR_VERSION 3
|
78
86
|
#define RB_GRN_MINOR_VERSION 0
|
79
|
-
#define RB_GRN_MICRO_VERSION
|
87
|
+
#define RB_GRN_MICRO_VERSION 6
|
80
88
|
|
81
89
|
#define RB_GRN_QUERY_DEFAULT_MAX_EXPRESSIONS 32
|
82
90
|
|
@@ -293,7 +301,7 @@ void rb_grn_init_normalizer (VALUE mGrn);
|
|
293
301
|
VALUE rb_grn_rc_to_exception (grn_rc rc);
|
294
302
|
const char *rb_grn_rc_to_message (grn_rc rc);
|
295
303
|
void rb_grn_rc_check (grn_rc rc,
|
296
|
-
|
304
|
+
VALUE related_object);
|
297
305
|
|
298
306
|
void rb_grn_context_register_floating_object
|
299
307
|
(RbGrnObject *rb_grn_object);
|
@@ -302,26 +310,26 @@ void rb_grn_context_unregister_floating_object
|
|
302
310
|
void rb_grn_context_close_floating_objects(RbGrnContext *rb_grn_context);
|
303
311
|
void rb_grn_context_reset_floating_objects(RbGrnContext *rb_grn_context);
|
304
312
|
void rb_grn_context_mark_grn_id (grn_ctx *context,
|
305
|
-
|
313
|
+
grn_id id);
|
306
314
|
grn_ctx *rb_grn_context_ensure (VALUE *context);
|
307
315
|
VALUE rb_grn_context_get_default (void);
|
308
316
|
VALUE rb_grn_context_to_exception (grn_ctx *context,
|
309
|
-
|
317
|
+
VALUE related_object);
|
310
318
|
void rb_grn_context_check (grn_ctx *context,
|
311
|
-
|
319
|
+
VALUE related_object);
|
312
320
|
grn_obj *rb_grn_context_get_backward_compatibility
|
313
321
|
(grn_ctx *context,
|
314
|
-
|
315
|
-
|
322
|
+
const char *name,
|
323
|
+
unsigned int name_size);
|
316
324
|
void rb_grn_context_object_created (VALUE rb_context,
|
317
|
-
|
325
|
+
VALUE rb_object);
|
318
326
|
|
319
327
|
const char *rb_grn_inspect (VALUE object);
|
320
328
|
const char *rb_grn_inspect_type (unsigned char type);
|
321
329
|
void rb_grn_scan_options (VALUE options, ...)
|
322
330
|
RB_GRN_GNUC_NULL_TERMINATED;
|
323
331
|
grn_bool rb_grn_equal_option (VALUE option,
|
324
|
-
|
332
|
+
const char *key);
|
325
333
|
grn_bool rb_grn_equal_string (const char *string1,
|
326
334
|
const char *string2);
|
327
335
|
VALUE rb_grn_convert_to_array (VALUE object);
|
@@ -331,220 +339,220 @@ VALUE rb_grn_check_convert_to_hash (VALUE object);
|
|
331
339
|
|
332
340
|
VALUE rb_grn_object_alloc (VALUE klass);
|
333
341
|
void rb_grn_object_bind (VALUE self,
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
342
|
+
VALUE rb_context,
|
343
|
+
RbGrnObject *rb_grn_object,
|
344
|
+
grn_ctx *context,
|
345
|
+
grn_obj *object);
|
338
346
|
void rb_grn_object_free (RbGrnObject *rb_grn_object);
|
339
347
|
void rb_grn_object_assign (VALUE klass,
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
348
|
+
VALUE self,
|
349
|
+
VALUE rb_context,
|
350
|
+
grn_ctx *context,
|
351
|
+
grn_obj *object);
|
344
352
|
void rb_grn_object_deconstruct (RbGrnObject *rb_grn_object,
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
353
|
+
grn_obj **object,
|
354
|
+
grn_ctx **context,
|
355
|
+
grn_id *domain_id,
|
356
|
+
grn_obj **domain,
|
357
|
+
grn_id *range_id,
|
358
|
+
grn_obj **range);
|
351
359
|
|
352
360
|
VALUE rb_grn_object_get_id (VALUE object);
|
353
361
|
VALUE rb_grn_object_array_reference (VALUE object,
|
354
|
-
|
362
|
+
VALUE rb_id);
|
355
363
|
VALUE rb_grn_object_set_raw (RbGrnObject *rb_grn_object,
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
364
|
+
grn_id id,
|
365
|
+
VALUE rb_value,
|
366
|
+
int flags,
|
367
|
+
VALUE related_object);
|
360
368
|
VALUE rb_grn_object_close (VALUE object);
|
361
369
|
VALUE rb_grn_object_closed_p (VALUE object);
|
362
370
|
VALUE rb_grn_object_inspect_object (VALUE inspected,
|
363
|
-
|
364
|
-
|
371
|
+
grn_ctx *context,
|
372
|
+
grn_obj *object);
|
365
373
|
VALUE rb_grn_object_inspect_object_content (VALUE inspected,
|
366
|
-
|
367
|
-
|
374
|
+
grn_ctx *context,
|
375
|
+
grn_obj *object);
|
368
376
|
VALUE rb_grn_object_inspect_object_content_name
|
369
377
|
(VALUE inspected,
|
370
|
-
|
371
|
-
|
378
|
+
grn_ctx *context,
|
379
|
+
grn_obj *object);
|
372
380
|
VALUE rb_grn_object_inspect_header (VALUE object,
|
373
|
-
|
381
|
+
VALUE inspected);
|
374
382
|
VALUE rb_grn_object_inspect_content (VALUE object,
|
375
|
-
|
383
|
+
VALUE inspected);
|
376
384
|
VALUE rb_grn_object_inspect_footer (VALUE object,
|
377
|
-
|
385
|
+
VALUE inspected);
|
378
386
|
|
379
387
|
void rb_grn_database_finalizer (grn_ctx *context,
|
380
|
-
|
381
|
-
|
382
|
-
|
388
|
+
RbGrnContext *rb_grn_context,
|
389
|
+
grn_obj *column,
|
390
|
+
RbGrnObject *rb_grn_database);
|
383
391
|
|
384
392
|
void rb_grn_named_object_bind (RbGrnNamedObject *rb_grn_named_object,
|
385
|
-
|
386
|
-
|
393
|
+
grn_ctx *context,
|
394
|
+
grn_obj *object);
|
387
395
|
void rb_grn_named_object_finalizer (grn_ctx *context,
|
388
|
-
|
389
|
-
|
396
|
+
grn_obj *column,
|
397
|
+
RbGrnNamedObject *rb_grn_named_object);
|
390
398
|
void rb_grn_named_object_set_name (RbGrnNamedObject *rb_grn_named_object,
|
391
|
-
|
392
|
-
|
399
|
+
const char *name,
|
400
|
+
unsigned name_size);
|
393
401
|
|
394
402
|
void rb_grn_table_bind (RbGrnTable *rb_grn_table,
|
395
|
-
|
396
|
-
|
403
|
+
grn_ctx *context,
|
404
|
+
grn_obj *table_key_support);
|
397
405
|
void rb_grn_table_finalizer (grn_ctx *context,
|
398
|
-
|
399
|
-
|
406
|
+
grn_obj *grn_object,
|
407
|
+
RbGrnTable *rb_grn_table);
|
400
408
|
void rb_grn_table_deconstruct (RbGrnTable *rb_grn_table,
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
+
grn_obj **table,
|
410
|
+
grn_ctx **context,
|
411
|
+
grn_id *domain_id,
|
412
|
+
grn_obj **domain,
|
413
|
+
grn_obj **value,
|
414
|
+
grn_id *range_id,
|
415
|
+
grn_obj **range,
|
416
|
+
VALUE *columns);
|
409
417
|
|
410
418
|
VALUE rb_grn_table_delete_by_id (VALUE self,
|
411
|
-
|
419
|
+
VALUE rb_id);
|
412
420
|
VALUE rb_grn_table_delete_by_expression (VALUE self);
|
413
421
|
VALUE rb_grn_table_array_reference (VALUE self,
|
414
|
-
|
422
|
+
VALUE rb_id);
|
415
423
|
VALUE rb_grn_table_array_set (VALUE self,
|
416
|
-
|
417
|
-
|
424
|
+
VALUE rb_id,
|
425
|
+
VALUE rb_value);
|
418
426
|
VALUE rb_grn_table_get_value (VALUE self,
|
419
|
-
|
427
|
+
VALUE rb_id);
|
420
428
|
VALUE rb_grn_table_set_value (VALUE self,
|
421
|
-
|
422
|
-
|
429
|
+
VALUE rb_id,
|
430
|
+
VALUE rb_value);
|
423
431
|
VALUE rb_grn_table_get_column (VALUE self,
|
424
|
-
|
432
|
+
VALUE rb_name);
|
425
433
|
VALUE rb_grn_table_get_column_surely (VALUE self,
|
426
|
-
|
434
|
+
VALUE rb_name);
|
427
435
|
VALUE rb_grn_table_get_column_value_raw (VALUE self,
|
428
|
-
|
429
|
-
|
436
|
+
grn_id id,
|
437
|
+
VALUE rb_name);
|
430
438
|
VALUE rb_grn_table_get_column_value (VALUE self,
|
431
|
-
|
432
|
-
|
439
|
+
VALUE rb_id,
|
440
|
+
VALUE rb_name);
|
433
441
|
VALUE rb_grn_table_set_column_value_raw (VALUE self,
|
434
|
-
|
435
|
-
|
436
|
-
|
442
|
+
grn_id id,
|
443
|
+
VALUE rb_name,
|
444
|
+
VALUE rb_value);
|
437
445
|
VALUE rb_grn_table_set_column_value (VALUE self,
|
438
|
-
|
439
|
-
|
440
|
-
|
446
|
+
VALUE rb_id,
|
447
|
+
VALUE rb_name,
|
448
|
+
VALUE rb_value);
|
441
449
|
VALUE rb_grn_table_inspect_content (VALUE object,
|
442
|
-
|
450
|
+
VALUE inspected);
|
443
451
|
|
444
452
|
grn_ctx *rb_grn_table_cursor_ensure_context (VALUE cursor,
|
445
|
-
|
453
|
+
VALUE *rb_context);
|
446
454
|
int rb_grn_table_cursor_order_to_flag (VALUE rb_order);
|
447
455
|
int rb_grn_table_cursor_order_by_to_flag (unsigned char table_type,
|
448
|
-
|
449
|
-
|
456
|
+
VALUE rb_table,
|
457
|
+
VALUE rb_order_by);
|
450
458
|
|
451
459
|
void rb_grn_table_key_support_bind (RbGrnTableKeySupport *rb_grn_table_key_support,
|
452
|
-
|
453
|
-
|
460
|
+
grn_ctx *context,
|
461
|
+
grn_obj *table_key_support);
|
454
462
|
void rb_grn_table_key_support_finalizer (grn_ctx *context,
|
455
|
-
|
456
|
-
|
463
|
+
grn_obj *grn_object,
|
464
|
+
RbGrnTableKeySupport *rb_grn_table_key_support);
|
457
465
|
void rb_grn_table_key_support_deconstruct (RbGrnTableKeySupport *rb_grn_table_key_support,
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
466
|
+
grn_obj **table_key_support,
|
467
|
+
grn_ctx **context,
|
468
|
+
grn_obj **key,
|
469
|
+
grn_id *domain_id,
|
470
|
+
grn_obj **domain,
|
471
|
+
grn_obj **value,
|
472
|
+
grn_id *range_id,
|
473
|
+
grn_obj **range,
|
474
|
+
VALUE *columns);
|
467
475
|
grn_id rb_grn_table_key_support_get (VALUE self,
|
468
|
-
|
476
|
+
VALUE rb_key);
|
469
477
|
|
470
478
|
void rb_grn_column_bind (RbGrnColumn *rb_grn_column,
|
471
|
-
|
472
|
-
|
479
|
+
grn_ctx *context,
|
480
|
+
grn_obj *column);
|
473
481
|
void rb_grn_column_finalizer (grn_ctx *context,
|
474
|
-
|
475
|
-
|
482
|
+
grn_obj *column,
|
483
|
+
RbGrnColumn *rb_grn_column);
|
476
484
|
void rb_grn_column_deconstruct (RbGrnColumn *rb_grn_column,
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
485
|
+
grn_obj **column,
|
486
|
+
grn_ctx **context,
|
487
|
+
grn_id *domain_id,
|
488
|
+
grn_obj **domain,
|
489
|
+
grn_obj **value,
|
490
|
+
grn_id *range_id,
|
491
|
+
grn_obj **range);
|
484
492
|
|
485
493
|
void rb_grn_index_column_bind (RbGrnIndexColumn *rb_grn_index_column,
|
486
|
-
|
487
|
-
|
494
|
+
grn_ctx *context,
|
495
|
+
grn_obj *object);
|
488
496
|
void rb_grn_index_column_finalizer (grn_ctx *context,
|
489
|
-
|
490
|
-
|
497
|
+
grn_obj *grn_object,
|
498
|
+
RbGrnIndexColumn *rb_grn_index_column);
|
491
499
|
void rb_grn_index_column_deconstruct (RbGrnIndexColumn *rb_grn_index_column,
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
500
|
+
grn_obj **column,
|
501
|
+
grn_ctx **context,
|
502
|
+
grn_id *domain_id,
|
503
|
+
grn_obj **domain,
|
504
|
+
grn_obj **value,
|
505
|
+
grn_obj **old_value,
|
506
|
+
grn_id *range_id,
|
507
|
+
grn_obj **range,
|
508
|
+
grn_obj **id_query,
|
509
|
+
grn_obj **string_query);
|
502
510
|
|
503
511
|
void rb_grn_accessor_bind (RbGrnAccessor *rb_grn_accessor,
|
504
|
-
|
505
|
-
|
512
|
+
grn_ctx *context,
|
513
|
+
grn_obj *accessor);
|
506
514
|
void rb_grn_accessor_finalizer (grn_ctx *context,
|
507
|
-
|
508
|
-
|
515
|
+
grn_obj *accessor,
|
516
|
+
RbGrnAccessor *rb_grn_accessor);
|
509
517
|
|
510
518
|
void rb_grn_expression_bind (RbGrnExpression *rb_grn_expression,
|
511
|
-
|
512
|
-
|
519
|
+
grn_ctx *context,
|
520
|
+
grn_obj *expression);
|
513
521
|
void rb_grn_expression_finalizer (grn_ctx *context,
|
514
|
-
|
515
|
-
|
522
|
+
grn_obj *grn_object,
|
523
|
+
RbGrnExpression *rb_grn_expression);
|
516
524
|
|
517
525
|
VALUE rb_grn_posting_new (grn_posting *posting,
|
518
|
-
|
519
|
-
|
520
|
-
|
526
|
+
grn_id term_id,
|
527
|
+
VALUE rb_table,
|
528
|
+
VALUE rb_lexicon);
|
521
529
|
|
522
530
|
VALUE rb_grn_tokyo_geo_point_new (int latitude,
|
523
|
-
|
531
|
+
int longitude);
|
524
532
|
VALUE rb_grn_wgs84_geo_point_new (int latitude,
|
525
|
-
|
533
|
+
int longitude);
|
526
534
|
VALUE rb_grn_tokyo_geo_point_new_raw (VALUE latitude,
|
527
|
-
|
535
|
+
VALUE longitude);
|
528
536
|
VALUE rb_grn_wgs84_geo_point_new_raw (VALUE latitude,
|
529
|
-
|
537
|
+
VALUE longitude);
|
530
538
|
|
531
539
|
VALUE rb_grn_record_new (VALUE table,
|
532
|
-
|
533
|
-
|
540
|
+
grn_id id,
|
541
|
+
VALUE values);
|
534
542
|
VALUE rb_grn_record_new_added (VALUE table,
|
535
|
-
|
536
|
-
|
543
|
+
grn_id id,
|
544
|
+
VALUE values);
|
537
545
|
VALUE rb_grn_record_new_raw (VALUE table,
|
538
|
-
|
539
|
-
|
546
|
+
VALUE id,
|
547
|
+
VALUE values);
|
540
548
|
|
541
549
|
VALUE rb_grn_record_expression_builder_new (VALUE table,
|
542
|
-
|
550
|
+
VALUE name);
|
543
551
|
VALUE rb_grn_record_expression_builder_build
|
544
552
|
(VALUE self);
|
545
553
|
VALUE rb_grn_column_expression_builder_new (VALUE column,
|
546
|
-
|
547
|
-
|
554
|
+
VALUE name,
|
555
|
+
VALUE query);
|
548
556
|
VALUE rb_grn_column_expression_builder_build
|
549
557
|
(VALUE self);
|
550
558
|
|
@@ -568,9 +576,9 @@ VALUE rb_grn_column_expression_builder_build
|
|
568
576
|
#define GRNOBJECT2RCLASS(object) (rb_grn_object_to_ruby_class(object))
|
569
577
|
|
570
578
|
/* TODO: MORE BETTER NAME!!! PLEASE!!! */
|
571
|
-
#define RVAL2GRNOBJ(rb_object, context, object)
|
579
|
+
#define RVAL2GRNOBJ(rb_object, context, object) \
|
572
580
|
(rb_grn_obj_from_ruby_object(rb_object, context, object))
|
573
|
-
#define GRNOBJ2RVAL(klass, context, object, related_object)
|
581
|
+
#define GRNOBJ2RVAL(klass, context, object, related_object) \
|
574
582
|
(rb_grn_obj_to_ruby_object(klass, context, object, related_object))
|
575
583
|
|
576
584
|
#define RVAL2GRNDB(object) (rb_grn_database_from_ruby_object(object))
|
@@ -593,7 +601,7 @@ VALUE rb_grn_column_expression_builder_build
|
|
593
601
|
|
594
602
|
#define GRNINDEXCURSOR2RVAL(context, cursor, rb_table, rb_lexicon) \
|
595
603
|
(rb_grn_index_cursor_to_ruby_object(context, cursor, rb_table, rb_lexicon, \
|
596
|
-
|
604
|
+
GRN_TRUE))
|
597
605
|
|
598
606
|
#define RVAL2GRNACCESSOR(object) \
|
599
607
|
(rb_grn_accessor_from_ruby_object(object))
|
@@ -607,17 +615,17 @@ VALUE rb_grn_column_expression_builder_build
|
|
607
615
|
|
608
616
|
#define RVAL2GRNBULK(object, context, bulk) \
|
609
617
|
(rb_grn_bulk_from_ruby_object(object, context, bulk))
|
610
|
-
#define RVAL2GRNBULK_WITH_TYPE(object, context, bulk, type_id, type)
|
618
|
+
#define RVAL2GRNBULK_WITH_TYPE(object, context, bulk, type_id, type) \
|
611
619
|
(rb_grn_bulk_from_ruby_object_with_type(object, context, bulk, type_id, type))
|
612
|
-
#define GRNBULK2RVAL(context, bulk, range, related_object)
|
620
|
+
#define GRNBULK2RVAL(context, bulk, range, related_object) \
|
613
621
|
(rb_grn_bulk_to_ruby_object(context, bulk, range, related_object))
|
614
622
|
|
615
|
-
#define RVAL2GRNVECTOR(object, context, vector)
|
623
|
+
#define RVAL2GRNVECTOR(object, context, vector) \
|
616
624
|
(rb_grn_vector_from_ruby_object(object, context, vector))
|
617
625
|
#define GRNVECTOR2RVAL(context, vector) \
|
618
626
|
(rb_grn_vector_to_ruby_object(context, vector))
|
619
627
|
|
620
|
-
#define RVAL2GRNUVECTOR(object, context, uvector, related_object)
|
628
|
+
#define RVAL2GRNUVECTOR(object, context, uvector, related_object) \
|
621
629
|
(rb_grn_uvector_from_ruby_object(object, context, uvector, related_object))
|
622
630
|
#define GRNUVECTOR2RVAL(context, uvector, range, related_object) \
|
623
631
|
(rb_grn_uvector_to_ruby_object(context, uvector, range, related_object))
|
@@ -631,8 +639,8 @@ VALUE rb_grn_column_expression_builder_build
|
|
631
639
|
#define GRNKEY2RVAL(context, key, key_size, table, related_object) \
|
632
640
|
(rb_grn_key_to_ruby_object(context, key, key_size, table, related_object))
|
633
641
|
#define RVAL2GRNKEY(object, context, key, domain_id, domain, related_object) \
|
634
|
-
(rb_grn_key_from_ruby_object(object, context, key, domain_id,
|
635
|
-
|
642
|
+
(rb_grn_key_from_ruby_object(object, context, key, domain_id, \
|
643
|
+
domain, related_object))
|
636
644
|
|
637
645
|
#define RVAL2GRNVALUE(object, context, key, domain_id, domain) \
|
638
646
|
(rb_grn_value_from_ruby_object(object, context, key, domain_id, domain))
|
@@ -644,7 +652,7 @@ VALUE rb_grn_column_expression_builder_build
|
|
644
652
|
|
645
653
|
|
646
654
|
grn_encoding rb_grn_encoding_from_ruby_object (VALUE object,
|
647
|
-
|
655
|
+
grn_ctx *context);
|
648
656
|
VALUE rb_grn_encoding_to_ruby_object (grn_encoding encoding);
|
649
657
|
#ifdef HAVE_RUBY_ENCODING_H
|
650
658
|
rb_encoding *rb_grn_encoding_to_ruby_encoding (grn_encoding encoding);
|
@@ -655,60 +663,60 @@ VALUE rb_grn_encoding_to_ruby_encoding_object
|
|
655
663
|
grn_ctx *rb_grn_context_from_ruby_object (VALUE object);
|
656
664
|
VALUE rb_grn_context_to_ruby_object (grn_ctx *context);
|
657
665
|
VALUE rb_grn_context_rb_string_new (grn_ctx *context,
|
658
|
-
|
659
|
-
|
666
|
+
const char *string,
|
667
|
+
long length);
|
660
668
|
VALUE rb_grn_context_rb_string_encode (grn_ctx *context,
|
661
|
-
|
669
|
+
VALUE rb_string);
|
662
670
|
void rb_grn_context_text_set (grn_ctx *context,
|
663
|
-
|
664
|
-
|
671
|
+
grn_obj *bulk,
|
672
|
+
VALUE rb_string);
|
665
673
|
|
666
674
|
grn_obj *rb_grn_object_from_ruby_object (VALUE object,
|
667
|
-
|
675
|
+
grn_ctx **context);
|
668
676
|
VALUE rb_grn_object_to_ruby_object (VALUE klass,
|
669
|
-
|
670
|
-
|
671
|
-
|
677
|
+
grn_ctx *context,
|
678
|
+
grn_obj *object,
|
679
|
+
grn_bool owner);
|
672
680
|
VALUE rb_grn_object_to_ruby_class (grn_obj *object);
|
673
681
|
|
674
682
|
grn_obj *rb_grn_database_from_ruby_object (VALUE object);
|
675
683
|
VALUE rb_grn_database_to_ruby_object (grn_ctx *context,
|
676
|
-
|
677
|
-
|
684
|
+
grn_obj *db,
|
685
|
+
grn_bool owner);
|
678
686
|
|
679
687
|
grn_obj *rb_grn_table_from_ruby_object (VALUE object,
|
680
|
-
|
688
|
+
grn_ctx **context);
|
681
689
|
VALUE rb_grn_table_to_ruby_object (grn_ctx *context,
|
682
|
-
|
683
|
-
|
690
|
+
grn_obj *table,
|
691
|
+
grn_bool owner);
|
684
692
|
|
685
693
|
grn_table_cursor *
|
686
694
|
rb_grn_table_cursor_from_ruby_object (VALUE object,
|
687
|
-
|
695
|
+
grn_ctx **context);
|
688
696
|
VALUE rb_grn_table_cursor_to_ruby_object (VALUE klass,
|
689
|
-
|
690
|
-
|
691
|
-
|
697
|
+
grn_ctx *context,
|
698
|
+
grn_table_cursor *cursor,
|
699
|
+
grn_bool owner);
|
692
700
|
VALUE rb_grn_table_cursor_to_ruby_class (grn_table_cursor *cursor);
|
693
701
|
void rb_grn_table_cursor_deconstruct (RbGrnTableCursor *rb_grn_table_cursor,
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
702
|
+
grn_table_cursor **cursor,
|
703
|
+
grn_ctx **context,
|
704
|
+
grn_id *domain_id,
|
705
|
+
grn_obj **domain,
|
706
|
+
grn_id *range_id,
|
707
|
+
grn_obj **range);
|
700
708
|
|
701
709
|
grn_obj *rb_grn_column_from_ruby_object (VALUE object,
|
702
|
-
|
710
|
+
grn_ctx **context);
|
703
711
|
VALUE rb_grn_column_to_ruby_object (VALUE klass,
|
704
|
-
|
705
|
-
|
706
|
-
|
712
|
+
grn_ctx *context,
|
713
|
+
grn_obj *column,
|
714
|
+
grn_bool owner);
|
707
715
|
VALUE rb_grn_index_cursor_to_ruby_object (grn_ctx *context,
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
716
|
+
grn_obj *cursor,
|
717
|
+
VALUE rb_table,
|
718
|
+
VALUE rb_lexicon,
|
719
|
+
grn_bool owner);
|
712
720
|
|
713
721
|
grn_operator rb_grn_operator_from_ruby_object (VALUE object);
|
714
722
|
|
@@ -716,78 +724,78 @@ grn_logger_info *
|
|
716
724
|
rb_grn_logger_from_ruby_object (VALUE object);
|
717
725
|
|
718
726
|
grn_obj *rb_grn_bulk_from_ruby_object (VALUE object,
|
719
|
-
|
720
|
-
|
727
|
+
grn_ctx *context,
|
728
|
+
grn_obj *bulk);
|
721
729
|
grn_obj *rb_grn_bulk_from_ruby_object_with_type
|
722
730
|
(VALUE object,
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
731
|
+
grn_ctx *context,
|
732
|
+
grn_obj *bulk,
|
733
|
+
grn_id type_id,
|
734
|
+
grn_obj *type);
|
727
735
|
VALUE rb_grn_bulk_to_ruby_object (grn_ctx *context,
|
728
|
-
|
729
|
-
|
730
|
-
|
736
|
+
grn_obj *bulk,
|
737
|
+
grn_obj *range,
|
738
|
+
VALUE related_object);
|
731
739
|
grn_obj *rb_grn_vector_from_ruby_object (VALUE object,
|
732
|
-
|
733
|
-
|
740
|
+
grn_ctx *context,
|
741
|
+
grn_obj *vector);
|
734
742
|
VALUE rb_grn_vector_to_ruby_object (grn_ctx *context,
|
735
|
-
|
743
|
+
grn_obj *vector);
|
736
744
|
grn_obj *rb_grn_uvector_from_ruby_object (VALUE object,
|
737
|
-
|
738
|
-
|
739
|
-
|
745
|
+
grn_ctx *context,
|
746
|
+
grn_obj *uvector,
|
747
|
+
VALUE related_object);
|
740
748
|
VALUE rb_grn_uvector_to_ruby_object (grn_ctx *context,
|
741
|
-
|
749
|
+
grn_obj *uvector,
|
742
750
|
grn_obj *range,
|
743
751
|
VALUE related_object);
|
744
752
|
|
745
753
|
VALUE rb_grn_value_to_ruby_object (grn_ctx *context,
|
746
|
-
|
747
|
-
|
748
|
-
|
754
|
+
grn_obj *value,
|
755
|
+
grn_obj *range,
|
756
|
+
VALUE related_object);
|
749
757
|
|
750
758
|
grn_id rb_grn_id_from_ruby_object (VALUE object,
|
751
|
-
|
752
|
-
|
753
|
-
|
759
|
+
grn_ctx *context,
|
760
|
+
grn_obj *table,
|
761
|
+
VALUE related_object);
|
754
762
|
|
755
763
|
VALUE rb_grn_key_to_ruby_object (grn_ctx *context,
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
764
|
+
const void *key,
|
765
|
+
int key_size,
|
766
|
+
grn_obj *table,
|
767
|
+
VALUE related_object);
|
760
768
|
grn_obj *rb_grn_key_from_ruby_object (VALUE rb_key,
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
769
|
+
grn_ctx *context,
|
770
|
+
grn_obj *key,
|
771
|
+
grn_id domain_id,
|
772
|
+
grn_obj *domain,
|
773
|
+
VALUE related_object);
|
766
774
|
grn_obj *rb_grn_value_from_ruby_object (VALUE rb_key,
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
775
|
+
grn_ctx *context,
|
776
|
+
grn_obj *value,
|
777
|
+
grn_id domain_id,
|
778
|
+
grn_obj *domain);
|
771
779
|
|
772
780
|
VALUE rb_grn_variable_to_ruby_object (grn_ctx *context,
|
773
|
-
|
781
|
+
grn_obj *variable);
|
774
782
|
grn_obj *rb_grn_variable_from_ruby_object (VALUE rb_variable,
|
775
|
-
|
783
|
+
grn_ctx **context);
|
776
784
|
|
777
785
|
grn_obj *rb_grn_obj_from_ruby_object (VALUE rb_object,
|
778
|
-
|
779
|
-
|
786
|
+
grn_ctx *context,
|
787
|
+
grn_obj **obj);
|
780
788
|
VALUE rb_grn_obj_to_ruby_object (VALUE klass,
|
781
|
-
|
782
|
-
|
783
|
-
|
789
|
+
grn_ctx *context,
|
790
|
+
grn_obj *obj,
|
791
|
+
VALUE related_object);
|
784
792
|
|
785
793
|
void rb_grn_snippet_bind (RbGrnSnippet *rb_grn_snippet,
|
786
|
-
|
787
|
-
|
794
|
+
grn_ctx *context,
|
795
|
+
grn_obj *snippet);
|
788
796
|
void rb_grn_snippet_finalizer (grn_ctx *context,
|
789
|
-
|
790
|
-
|
797
|
+
grn_obj *grn_object,
|
798
|
+
RbGrnSnippet *rb_grn_snippet);
|
791
799
|
RB_GRN_END_DECLS
|
792
800
|
|
793
801
|
#endif
|