rroonga 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +5 -1
- data/ext/groonga/extconf.rb +36 -4
- data/ext/groonga/rb-grn-accessor.c +8 -10
- data/ext/groonga/rb-grn-array-cursor.c +2 -2
- data/ext/groonga/rb-grn-array.c +35 -59
- data/ext/groonga/rb-grn-column.c +105 -192
- data/ext/groonga/rb-grn-context.c +60 -63
- data/ext/groonga/rb-grn-database.c +27 -37
- data/ext/groonga/rb-grn-double-array-trie-cursor.c +3 -3
- data/ext/groonga/rb-grn-double-array-trie.c +75 -126
- data/ext/groonga/rb-grn-encoding.c +27 -27
- data/ext/groonga/rb-grn-expression.c +29 -24
- data/ext/groonga/rb-grn-fix-size-column.c +7 -9
- data/ext/groonga/rb-grn-hash-cursor.c +3 -3
- data/ext/groonga/rb-grn-hash.c +57 -108
- data/ext/groonga/rb-grn-index-column.c +17 -29
- data/ext/groonga/rb-grn-logger.c +11 -14
- data/ext/groonga/rb-grn-object.c +51 -94
- data/ext/groonga/rb-grn-patricia-trie-cursor.c +2 -2
- data/ext/groonga/rb-grn-patricia-trie.c +161 -276
- data/ext/groonga/rb-grn-plugin.c +6 -10
- data/ext/groonga/rb-grn-table-cursor.c +14 -21
- data/ext/groonga/rb-grn-table-key-support.c +32 -35
- data/ext/groonga/rb-grn-table.c +149 -252
- data/ext/groonga/rb-grn-variable.c +6 -7
- data/ext/groonga/rb-grn-view-accessor.c +1 -1
- data/ext/groonga/rb-grn-view-cursor.c +2 -2
- data/ext/groonga/rb-grn-view.c +28 -45
- data/ext/groonga/rb-grn.h +1 -1
- data/ext/groonga/rb-groonga.c +6 -6
- data/lib/groonga/database.rb +1 -1
- data/lib/groonga/dumper.rb +109 -33
- data/lib/groonga/expression-builder.rb +24 -0
- data/lib/groonga/pagination.rb +30 -24
- data/lib/groonga/record.rb +21 -18
- data/lib/groonga/schema.rb +156 -140
- data/test/test-command-select.rb +66 -1
- data/test/test-database-dumper.rb +50 -10
- data/test/test-expression-builder.rb +41 -0
- metadata +4 -4
@@ -23,9 +23,9 @@ VALUE rb_cGrnPatriciaTrieCursor;
|
|
23
23
|
/*
|
24
24
|
* Document-class: Groonga::PatriciaTrieCursor < Groonga::TableCursor
|
25
25
|
*
|
26
|
-
* Groonga::PatriciaTrieに登録されているレコードを順番に取り
|
26
|
+
* {Groonga::PatriciaTrie} に登録されているレコードを順番に取り
|
27
27
|
* 出すためのオブジェクト。利用できるメソッドは
|
28
|
-
* Groonga::TableCursorとGroonga::TableCursor::KeySupportを
|
28
|
+
* {Groonga::TableCursor} と {Groonga::TableCursor::KeySupport} を
|
29
29
|
* 参照。
|
30
30
|
*/
|
31
31
|
|
@@ -62,12 +62,12 @@ VALUE rb_cGrnPatriciaTrie;
|
|
62
62
|
* #(キーの種類を表すオブジェクトは文字列で指定。)
|
63
63
|
* Groonga::PatriciaTrie.create(:key_type => "ShortText")
|
64
64
|
*
|
65
|
-
*
|
65
|
+
* #キーとしてBookmarksテーブルのレコードを使用す
|
66
66
|
* #る無名一時テーブルを生成する。
|
67
67
|
* bookmarks = Groonga::PatriciaTrie.create(:name => "Bookmarks")
|
68
68
|
* Groonga::PatriciaTrie.create(:key_type => bookmarks)
|
69
69
|
*
|
70
|
-
*
|
70
|
+
* #キーとしてBookmarksテーブルのレコードを使用す
|
71
71
|
* #る無名一時テーブルを生成する。
|
72
72
|
* #(テーブルは文字列で指定。)
|
73
73
|
* Groonga::PatriciaTrie.create(:name => "Bookmarks")
|
@@ -84,120 +84,67 @@ VALUE rb_cGrnPatriciaTrie;
|
|
84
84
|
*
|
85
85
|
* @overload create(options={})
|
86
86
|
* @return [Groonga::PatriciaTrie]
|
87
|
-
*
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
91
|
-
*
|
92
|
-
*
|
93
|
-
*
|
94
|
-
*
|
95
|
-
*
|
96
|
-
*
|
97
|
-
*
|
98
|
-
*
|
99
|
-
*
|
100
|
-
*
|
101
|
-
*
|
102
|
-
*
|
103
|
-
*
|
104
|
-
*
|
105
|
-
*
|
106
|
-
*
|
107
|
-
*
|
108
|
-
*
|
109
|
-
*
|
110
|
-
*
|
111
|
-
*
|
112
|
-
*
|
113
|
-
*
|
114
|
-
*
|
115
|
-
*
|
116
|
-
*
|
117
|
-
*
|
118
|
-
*
|
119
|
-
*
|
120
|
-
*
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
124
|
-
*
|
125
|
-
*
|
126
|
-
*
|
127
|
-
*
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
131
|
-
*
|
132
|
-
*
|
133
|
-
*
|
134
|
-
*
|
135
|
-
*
|
136
|
-
*
|
137
|
-
*
|
138
|
-
*
|
139
|
-
*
|
140
|
-
*
|
141
|
-
*
|
142
|
-
*
|
87
|
+
* @!macro [new] patricia_trie.create.options
|
88
|
+
* @param options [::Hash] The name and value
|
89
|
+
* pairs. Omitted names are initialized as the default value.
|
90
|
+
* @option options [Groonga::Context] :context (Groonga::Context.default)
|
91
|
+
* テーブルが利用する {Groonga::Context} 。
|
92
|
+
* @option options :name
|
93
|
+
* テーブルの名前。名前をつけると、 {Groonga::Context#[]} に名
|
94
|
+
* 前を指定してテーブルを取得することができる。省略すると
|
95
|
+
* 無名テーブルになり、テーブルIDでのみ取得できる。
|
96
|
+
* @option options :path
|
97
|
+
* テーブルを保存するパス。パスを指定すると永続テーブルとな
|
98
|
+
* り、プロセス終了後もレコードは保持される。次回起動時に
|
99
|
+
* {Groonga::Context#[]} で保存されたレコードを利用する
|
100
|
+
* ことができる。省略すると一時テーブルになり、プロセスが終
|
101
|
+
* 了するとレコードは破棄される。
|
102
|
+
* @option options :persistent
|
103
|
+
* +true+ を指定すると永続テーブルとなる。 +path+ を省略した
|
104
|
+
* 場合は自動的にパスが付加される。 +:context+ で指定した
|
105
|
+
* {Groonga::Context} に結びついているデータベースが一時デー
|
106
|
+
* タベースの場合は例外が発生する。
|
107
|
+
* @option options :key_normalize
|
108
|
+
* +true+ を指定するとキーを正規化する。
|
109
|
+
* @option options :key_with_sis
|
110
|
+
* +true+ を指定するとキーの文字列の全suffixが自動的に登
|
111
|
+
* 録される。
|
112
|
+
* @option options :key_type
|
113
|
+
* キーの種類を示すオブジェクトを指定する。キーの種類には型
|
114
|
+
* 名("Int32"や"ShortText"など)または {Groonga::Type} または
|
115
|
+
* テーブル( {Groonga::Array} 、 {Groonga::Hash} 、
|
116
|
+
* {Groonga::PatriciaTrie} のどれか)を指定する。
|
117
|
+
*
|
118
|
+
* {Groonga::Type} を指定した場合は、その型が示す範囲の値をキー
|
119
|
+
* として使用する。ただし、キーの最大サイズは4096バイトで
|
120
|
+
* あるため、 {Groonga::Type::TEXT} や {Groonga::Type::LONG_TEXT}
|
121
|
+
* は使用できない。
|
122
|
+
*
|
123
|
+
* テーブルを指定した場合はレコードIDをキーとして使用する。
|
124
|
+
* 指定したテーブルの {Groonga::Record} をキーとして使用するこ
|
125
|
+
* ともでき、その場合は自動的に {Groonga::Record} からレコード
|
126
|
+
* IDを取得する。
|
127
|
+
*
|
128
|
+
* 省略した場合はShortText型をキーとして使用する。この場合、
|
129
|
+
* 4096バイトまで使用可能である。
|
130
|
+
* @option options :value_type
|
131
|
+
* 値の型を指定する。省略すると値のための領域を確保しない。
|
132
|
+
* 値を保存したい場合は必ず指定すること。
|
133
|
+
*
|
134
|
+
* 参考: {Groonga::Type.new}
|
135
|
+
* @option options :default_tokenizer
|
136
|
+
* {Groonga::IndexColumn} で使用するトークナイザを指定する。
|
137
|
+
* デフォルトでは何も設定されていないので、テーブルに
|
138
|
+
* {Groonga::IndexColumn} を定義する場合は
|
139
|
+
* @"TokenBigram"@ などを指定する必要がある。
|
140
|
+
* @option options :sub_records
|
141
|
+
* +true+ を指定すると {#group} でグループ化したときに、
|
142
|
+
* {Groonga::Record#n_sub_records} でグループに含まれるレコー
|
143
|
+
* ドの件数を取得できる。
|
144
|
+
* @!macro patricia_trie.create.options
|
143
145
|
* @overload create(options={})
|
144
146
|
* @yield [table]
|
145
|
-
*
|
146
|
-
* pairs. Omitted names are initialized as the default value.
|
147
|
-
* @option options [Groonga::Context] :context (Groonga::Context.default)
|
148
|
-
* テーブルが利用するGroonga::Context。
|
149
|
-
* @option options :name
|
150
|
-
* テーブルの名前。名前をつけると、Groonga::Context#[]に名
|
151
|
-
* 前を指定してテーブルを取得することができる。省略すると
|
152
|
-
* 無名テーブルになり、テーブルIDでのみ取得できる。
|
153
|
-
* @option options :path
|
154
|
-
* テーブルを保存するパス。パスを指定すると永続テーブルとな
|
155
|
-
* り、プロセス終了後もレコードは保持される。次回起動時に
|
156
|
-
* Groonga::Context#[]で保存されたレコードを利用する
|
157
|
-
* ことができる。省略すると一時テーブルになり、プロセスが終
|
158
|
-
* 了するとレコードは破棄される。
|
159
|
-
* @option options :persistent
|
160
|
-
* +true+ を指定すると永続テーブルとなる。 +path+ を省略した
|
161
|
-
* 場合は自動的にパスが付加される。 +:context+ で指定した
|
162
|
-
* Groonga::Contextに結びついているデータベースが一時デー
|
163
|
-
* タベースの場合は例外が発生する。
|
164
|
-
* @option options :key_normalize
|
165
|
-
* +true+ を指定するとキーを正規化する。
|
166
|
-
* @option options :key_with_sis
|
167
|
-
* +true+ を指定するとキーの文字列の全suffixが自動的に登
|
168
|
-
* 録される。
|
169
|
-
* @option options :key_type
|
170
|
-
* キーの種類を示すオブジェクトを指定する。キーの種類には型
|
171
|
-
* 名("Int32"や"ShortText"など)またはGroonga::Typeまたは
|
172
|
-
* テーブル(Groonga::Array、Groonga::Hash、
|
173
|
-
* Groonga::PatriciaTrieのどれか)を指定する。
|
174
|
-
*
|
175
|
-
* Groonga::Typeを指定した場合は、その型が示す範囲の値をキー
|
176
|
-
* として使用する。ただし、キーの最大サイズは4096バイトで
|
177
|
-
* あるため、Groonga::Type::TEXTやGroonga::Type::LONG_TEXT
|
178
|
-
* は使用できない。
|
179
|
-
*
|
180
|
-
* テーブルを指定した場合はレコードIDをキーとして使用する。
|
181
|
-
* 指定したテーブルのGroonga::Recordをキーとして使用するこ
|
182
|
-
* ともでき、その場合は自動的にGroonga::Recordからレコード
|
183
|
-
* IDを取得する。
|
184
|
-
*
|
185
|
-
* 省略した場合はShortText型をキーとして使用する。この場合、
|
186
|
-
* 4096バイトまで使用可能である。
|
187
|
-
* @option options :value_type
|
188
|
-
* 値の型を指定する。省略すると値のための領域を確保しない。
|
189
|
-
* 値を保存したい場合は必ず指定すること。
|
190
|
-
*
|
191
|
-
* 参考: Groonga::Type.new
|
192
|
-
* @option options :default_tokenizer
|
193
|
-
* Groonga::IndexColumnで使用するトークナイザを指定する。
|
194
|
-
* デフォルトでは何も設定されていないので、テーブルに
|
195
|
-
* Groonga::IndexColumnを定義する場合は
|
196
|
-
* <tt>"TokenBigram"</tt>などを指定する必要がある。
|
197
|
-
* @option options :sub_records
|
198
|
-
* +true+ を指定すると#groupでグループ化したときに、
|
199
|
-
* Groonga::Record#n_sub_recordsでグループに含まれるレコー
|
200
|
-
* ドの件数を取得できる。
|
147
|
+
* @!macro patricia_trie.create.options
|
201
148
|
*/
|
202
149
|
static VALUE
|
203
150
|
rb_grn_patricia_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
@@ -279,8 +226,8 @@ rb_grn_patricia_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
279
226
|
}
|
280
227
|
|
281
228
|
/*
|
282
|
-
* _key_ にマッチするレコードのIDがキーに入っているGroonga::Hashを返す。
|
283
|
-
* マッチするレコードがない場合は空のGroonga::Hashが返る。
|
229
|
+
* _key_ にマッチするレコードのIDがキーに入っている {Groonga::Hash} を返す。
|
230
|
+
* マッチするレコードがない場合は空の {Groonga::Hash} が返る。
|
284
231
|
*
|
285
232
|
* _options_ で +:result+ を指定することにより、そのテーブルにマッチした
|
286
233
|
* レコードIDがキーのレコードを追加することができる。
|
@@ -306,20 +253,19 @@ rb_grn_patricia_trie_s_create (int argc, VALUE *argv, VALUE klass)
|
|
306
253
|
* マッチしたレコードをどのように扱うか。指定可能な値は以
|
307
254
|
* 下の通り。
|
308
255
|
*
|
309
|
-
*
|
256
|
+
* - Groonga::Operator::OR :=
|
310
257
|
* マッチしたレコードを追加。すでにレコードが追加され
|
311
|
-
* ている場合は何もしない。
|
312
|
-
*
|
258
|
+
* ている場合は何もしない。 =:
|
259
|
+
* - Groonga::Operator::AND :=
|
313
260
|
* マッチしたレコードのスコアを増加。マッチしなかった
|
314
|
-
* レコードを削除。
|
315
|
-
*
|
316
|
-
* マッチしたレコードを削除。
|
317
|
-
*
|
318
|
-
* マッチしたレコードのスコアを増加。
|
319
|
-
*
|
320
|
-
*
|
321
|
-
*
|
322
|
-
* @return [Groonga::Hash]
|
261
|
+
* レコードを削除。 =:
|
262
|
+
* - Groonga::Operator::BUT :=
|
263
|
+
* マッチしたレコードを削除。 =:
|
264
|
+
* - Groonga::Operator::ADJUST :=
|
265
|
+
* マッチしたレコードのスコアを増加。 =:
|
266
|
+
* - +:type+ :=
|
267
|
+
* ????? =:
|
268
|
+
* @return [Groonga::Hash]
|
323
269
|
*/
|
324
270
|
static VALUE
|
325
271
|
rb_grn_patricia_trie_search (int argc, VALUE *argv, VALUE self)
|
@@ -370,29 +316,14 @@ rb_grn_patricia_trie_search (int argc, VALUE *argv, VALUE self)
|
|
370
316
|
}
|
371
317
|
|
372
318
|
/*
|
373
|
-
* call-seq:
|
374
|
-
* patricia_trie.scan(string) -> Array
|
375
|
-
* patricia_trie.scan(string) {|record, word, start, length| ... }
|
376
|
-
*
|
377
319
|
* _string_ を走査し、 _patricia_trie_ 内に格納されているキーに
|
378
320
|
* マッチした部分文字列の情報をブロックに渡す。複数のキーが
|
379
321
|
* マッチする場合は最長一致するキーを優先する。
|
380
322
|
*
|
381
|
-
* [_record_]
|
382
|
-
* マッチしたキーのGroonga::Record。
|
383
|
-
*
|
384
|
-
* [_word_]
|
385
|
-
* マッチした部分文字列。
|
386
|
-
*
|
387
|
-
* [_start_]
|
388
|
-
* _string_ 内での _word_ の出現位置。(バイト単位)
|
389
|
-
*
|
390
|
-
* [_length_]
|
391
|
-
* _word_ の長さ。(バイト単位)
|
392
|
-
*
|
393
323
|
* ブロックを指定しない場合は、マッチした部分文字列の情報を
|
394
324
|
* まとめて配列として返す。
|
395
325
|
*
|
326
|
+
* @example
|
396
327
|
* words = Groonga::PatriciaTrie.create(:key_type => "ShortText",
|
397
328
|
* :key_normalize => true)
|
398
329
|
* words.add("リンク")
|
@@ -413,6 +344,15 @@ rb_grn_patricia_trie_search (int argc, VALUE *argv, VALUE self)
|
|
413
344
|
* # -> [[muteki, "muTEki", 0, 6],
|
414
345
|
* # [adventure_of_link, "リンクの冒険", 7, 18],
|
415
346
|
* # [gaxtu, "ガッ", 42, 6]]
|
347
|
+
*
|
348
|
+
* @overload scan(string)
|
349
|
+
* @return [Array]
|
350
|
+
* @overload scan(string)
|
351
|
+
* @yield [record, word, start, length]
|
352
|
+
* @yieldparam record マッチしたキーの {Groonga::Record} 。
|
353
|
+
* @yieldparam word マッチした部分文字列。
|
354
|
+
* @yieldparam start _string_ 内での _word_ の出現位置。(バイト単位)
|
355
|
+
* @yieldparam length _word_ の長さ。(バイト単位)
|
416
356
|
*/
|
417
357
|
static VALUE
|
418
358
|
rb_grn_patricia_trie_scan (VALUE self, VALUE rb_string)
|
@@ -476,13 +416,12 @@ rb_grn_patricia_trie_scan (VALUE self, VALUE rb_string)
|
|
476
416
|
}
|
477
417
|
|
478
418
|
/*
|
479
|
-
* call-seq:
|
480
|
-
* patricia_trie.prefix_search(prefix) -> Groonga::Hash
|
481
|
-
*
|
482
419
|
* キーが _prefix_ に前方一致するレコードのIDがキーに入っている
|
483
|
-
* Groonga::Hashを返す。マッチするレコードがない場合は空の
|
484
|
-
* Groonga::Hashが返る。
|
420
|
+
* {Groonga::Hash} を返す。マッチするレコードがない場合は空の
|
421
|
+
* {Groonga::Hash} が返る。
|
485
422
|
*
|
423
|
+
* @overload prefix_search(prefix)
|
424
|
+
* @return [Groonga::Hash]
|
486
425
|
*/
|
487
426
|
static VALUE
|
488
427
|
rb_grn_patricia_trie_prefix_search (VALUE self, VALUE rb_prefix)
|
@@ -514,11 +453,10 @@ rb_grn_patricia_trie_prefix_search (VALUE self, VALUE rb_prefix)
|
|
514
453
|
}
|
515
454
|
|
516
455
|
/*
|
517
|
-
* call-seq:
|
518
|
-
* table.register_key_with_sis? -> true/false
|
519
|
-
*
|
520
456
|
* キーを登録するときに文字列の全suffixも一緒に登録する場合
|
521
457
|
* は +true+ 、登録しない場合は +false+ を返す。
|
458
|
+
*
|
459
|
+
* @overload register_key_with_sis?
|
522
460
|
*/
|
523
461
|
static VALUE
|
524
462
|
rb_grn_patricia_trie_register_key_with_sis_p (VALUE self)
|
@@ -635,62 +573,38 @@ rb_grn_patricia_trie_open_grn_prefix_cursor (int argc, VALUE *argv, VALUE self,
|
|
635
573
|
*
|
636
574
|
* @overload open_prefix_cursor(prefix, options={})
|
637
575
|
* @return [Groonga::PatriciaTrieCursor]
|
638
|
-
*
|
639
|
-
*
|
640
|
-
*
|
641
|
-
*
|
642
|
-
*
|
643
|
-
*
|
644
|
-
*
|
645
|
-
*
|
646
|
-
*
|
647
|
-
*
|
648
|
-
*
|
649
|
-
*
|
650
|
-
*
|
651
|
-
*
|
652
|
-
*
|
653
|
-
*
|
654
|
-
*
|
655
|
-
*
|
656
|
-
*
|
657
|
-
*
|
658
|
-
*
|
659
|
-
*
|
660
|
-
*
|
661
|
-
*
|
662
|
-
*
|
663
|
-
*
|
664
|
-
*
|
576
|
+
* @!macro [new] patricia-trie.open_prefix_cursor.options
|
577
|
+
* @param options [::Hash] The name and value
|
578
|
+
* pairs. Omitted names are initialized as the default value.
|
579
|
+
* @option options :key_bytes
|
580
|
+
* _prefix_ のサイズ(byte)
|
581
|
+
* @option options :key_bits
|
582
|
+
* _prefix_ のサイズ(bit)
|
583
|
+
* @option options :offset
|
584
|
+
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
585
|
+
* からレコードを取り出す。
|
586
|
+
* @option options :limit
|
587
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
588
|
+
* 省略された場合または-1が指定された場合は、全件が指定され
|
589
|
+
* たものとみなす。
|
590
|
+
* @option options :order
|
591
|
+
* +:asc+ または +:ascending+ を指定すると昇順にレコードを取
|
592
|
+
* り出す。
|
593
|
+
* +:desc+ または +:descending+ を指定すると降順にレコードを
|
594
|
+
* 取り出す。
|
595
|
+
* @option options :order_by (:id)
|
596
|
+
* +:id+ を指定するとID順にレコードを取り出す。(デフォルト)
|
597
|
+
* +:key+指定するとキー順にレコードを取り出す。
|
598
|
+
* @option options :greater_than
|
599
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
600
|
+
* 範囲に含まない。
|
601
|
+
* @option options :less_than
|
602
|
+
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
603
|
+
* 範囲に含まない。
|
604
|
+
* @!macro patricia-trie.open_prefix_cursor.options
|
665
605
|
* @overload open_prefix_cursor(prefix, options={})
|
666
606
|
* @yield [cursor]
|
667
|
-
*
|
668
|
-
* pairs. Omitted names are initialized as the default value.
|
669
|
-
* @option options :key_bytes
|
670
|
-
* _prefix_ のサイズ(byte)
|
671
|
-
* @option options :key_bits
|
672
|
-
* _prefix_ のサイズ(bit)
|
673
|
-
* @option options :offset
|
674
|
-
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
675
|
-
* からレコードを取り出す。
|
676
|
-
* @option options :limit
|
677
|
-
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
678
|
-
* 省略された場合または-1が指定された場合は、全件が指定され
|
679
|
-
* たものとみなす。
|
680
|
-
* @option options :order
|
681
|
-
* +:asc+ または +:ascending+ を指定すると昇順にレコードを取
|
682
|
-
* り出す。
|
683
|
-
* +:desc+ または +:descending+ を指定すると降順にレコードを
|
684
|
-
* 取り出す。
|
685
|
-
* @option options :order_by (:id)
|
686
|
-
* +:id+ を指定するとID順にレコードを取り出す。(デフォルト)
|
687
|
-
* +:key+指定するとキー順にレコードを取り出す。
|
688
|
-
* @option options :greater_than
|
689
|
-
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
690
|
-
* 範囲に含まない。
|
691
|
-
* @option options :less_than
|
692
|
-
* +true+ を指定すると _prefix_ で指定した値に一致した [ +key+ ] を
|
693
|
-
* 範囲に含まない。
|
607
|
+
* @!macro patricia-trie.open_prefix_cursor.options
|
694
608
|
*/
|
695
609
|
static VALUE
|
696
610
|
rb_grn_patricia_trie_open_prefix_cursor (int argc, VALUE *argv, VALUE self)
|
@@ -780,44 +694,29 @@ rb_grn_patricia_trie_open_grn_rk_cursor (int argc, VALUE *argv, VALUE self,
|
|
780
694
|
*
|
781
695
|
* @overload open_rk_cursor(key, options={})
|
782
696
|
* @return [Groonga::PatriciaTrieCursor]
|
783
|
-
*
|
784
|
-
*
|
785
|
-
*
|
786
|
-
*
|
787
|
-
*
|
788
|
-
*
|
789
|
-
*
|
790
|
-
*
|
791
|
-
*
|
792
|
-
*
|
793
|
-
*
|
794
|
-
*
|
795
|
-
*
|
796
|
-
*
|
797
|
-
*
|
798
|
-
*
|
799
|
-
*
|
800
|
-
*
|
697
|
+
* @!macro [new] patricia-trie.open_rk_cursor.options
|
698
|
+
* @param options [::Hash]
|
699
|
+
* pairs. Omitted names are initialized as the default value.
|
700
|
+
* @option options :key_bytes
|
701
|
+
* _key_のサイズ(byte)
|
702
|
+
* @option options :key_bits
|
703
|
+
* _key_のサイズ(bit)(現在は未サポート)
|
704
|
+
* @option options :offset
|
705
|
+
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目から
|
706
|
+
* レコードを取り出す。
|
707
|
+
* @option options :limit
|
708
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
709
|
+
* 省略された場合または-1が指定された場合は、全件が指定されたものとみなす。
|
710
|
+
* @option options :greater_than
|
711
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
712
|
+
* 範囲に含まない。
|
713
|
+
* @option options :less_than
|
714
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
715
|
+
* 範囲に含まない。
|
716
|
+
* @!macro patricia-trie.open_rk_cursor.options
|
801
717
|
* @overload open_rk_cursor(key, options={})
|
802
718
|
* @yield [cursor]
|
803
|
-
*
|
804
|
-
* pairs. Omitted names are initialized as the default value.
|
805
|
-
* @option options :key_bytes
|
806
|
-
* _key_のサイズ(byte)
|
807
|
-
* @option options :key_bits
|
808
|
-
* _key_のサイズ(bit)(現在は未サポート)
|
809
|
-
* @option options :offset
|
810
|
-
* 該当する範囲のレコードのうち、(0ベースで)_:offset_番目から
|
811
|
-
* レコードを取り出す。
|
812
|
-
* @option options :limit
|
813
|
-
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
814
|
-
* 省略された場合または-1が指定された場合は、全件が指定されたものとみなす。
|
815
|
-
* @option options :greater_than
|
816
|
-
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
817
|
-
* 範囲に含まない。
|
818
|
-
* @option options :less_than
|
819
|
-
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
820
|
-
* 範囲に含まない。
|
719
|
+
* @!macro patricia-trie.open_rk_cursor.options
|
821
720
|
*/
|
822
721
|
static VALUE
|
823
722
|
rb_grn_patricia_trie_open_rk_cursor (int argc, VALUE *argv, VALUE self)
|
@@ -905,42 +804,28 @@ rb_grn_patricia_trie_open_grn_near_cursor (int argc, VALUE *argv, VALUE self,
|
|
905
804
|
*
|
906
805
|
* @overload open_near_cursor(key, options={})
|
907
806
|
* @return [Groonga::PatriciaTrieCursor]
|
908
|
-
*
|
909
|
-
*
|
910
|
-
*
|
911
|
-
*
|
912
|
-
*
|
913
|
-
*
|
914
|
-
*
|
915
|
-
*
|
916
|
-
*
|
917
|
-
*
|
918
|
-
*
|
919
|
-
*
|
920
|
-
*
|
921
|
-
*
|
922
|
-
*
|
923
|
-
*
|
924
|
-
*
|
807
|
+
* @!macro [new] patricia-trie.open_near_cursor.options
|
808
|
+
* @param options [::Hash] The name and value
|
809
|
+
* pairs. Omitted names are initialized as the default value.
|
810
|
+
* @option options :size
|
811
|
+
* _size_ バイト以降のデータが同じキーのレコードに限定する。
|
812
|
+
* @option options :offset
|
813
|
+
* 該当する範囲のレコードのうち、(0ベースで) _:offset_ 番目
|
814
|
+
* からレコードを取り出す。
|
815
|
+
* @option options :limit
|
816
|
+
* 該当する範囲のレコードのうち、 _:limit_ 件のみを取り出す。
|
817
|
+
* 省略された場合または-1が指定された場合は、全件が指定され
|
818
|
+
* たものとみなす。
|
819
|
+
* @option options :greater_than
|
820
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
821
|
+
* 範囲に含まない。
|
822
|
+
* @option options :less_than
|
823
|
+
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
824
|
+
* 範囲に含まない。
|
825
|
+
* @!macro patricia-trie.open_near_cursor.options
|
925
826
|
* @overload open_near_cursor(key, options={})
|
926
827
|
* @yield [cursor]
|
927
|
-
*
|
928
|
-
* pairs. Omitted names are initialized as the default value.
|
929
|
-
* @option options :size
|
930
|
-
* _size_ バイト以降のデータが同じキーのレコードに限定する。
|
931
|
-
* @option options :offset
|
932
|
-
* 該当する範囲のレコードのうち、(0ベースで)_:offset_番目
|
933
|
-
* からレコードを取り出す。
|
934
|
-
* @option options :limit
|
935
|
-
* 該当する範囲のレコードのうち、_:limit_件のみを取り出す。
|
936
|
-
* 省略された場合または-1が指定された場合は、全件が指定され
|
937
|
-
* たものとみなす。
|
938
|
-
* @option options :greater_than
|
939
|
-
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
940
|
-
* 範囲に含まない。
|
941
|
-
* @option options :less_than
|
942
|
-
* +true+ を指定すると _key_ で指定した値に一致した [ +key+ ] を
|
943
|
-
* 範囲に含まない。
|
828
|
+
* @!macro patricia-trie.open_near_cursor.options
|
944
829
|
*/
|
945
830
|
static VALUE
|
946
831
|
rb_grn_patricia_trie_open_near_cursor (int argc, VALUE *argv, VALUE self)
|