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
data/ext/groonga/rb-grn-plugin.c
CHANGED
@@ -121,13 +121,11 @@ rb_grn_plugin_s_register (int argc, VALUE *argv, VALUE klass)
|
|
121
121
|
return Qnil;
|
122
122
|
}
|
123
123
|
|
124
|
-
|
125
|
-
* call-seq:
|
126
|
-
* Groonga::Plugin.system_plugins_dir
|
127
|
-
*
|
124
|
+
/*
|
128
125
|
* Returns the system plugins directory.
|
129
126
|
*
|
130
|
-
* @
|
127
|
+
* @overload system_plugins_dir
|
128
|
+
* @return [String]
|
131
129
|
*/
|
132
130
|
static VALUE
|
133
131
|
rb_grn_plugin_s_system_plugins_dir (VALUE klass)
|
@@ -135,13 +133,11 @@ rb_grn_plugin_s_system_plugins_dir (VALUE klass)
|
|
135
133
|
return rb_str_new2(grn_plugin_get_system_plugins_dir());
|
136
134
|
}
|
137
135
|
|
138
|
-
|
139
|
-
* call-seq:
|
140
|
-
* Groonga::Plugin.suffix
|
141
|
-
*
|
136
|
+
/*
|
142
137
|
* Returns the plugin file suffix. (e.g. ".so", ".dll" and so on.)
|
143
138
|
*
|
144
|
-
* @
|
139
|
+
* @overload suffix
|
140
|
+
* @return [String]
|
145
141
|
*/
|
146
142
|
static VALUE
|
147
143
|
rb_grn_plugin_s_suffix (VALUE klass)
|
@@ -26,7 +26,7 @@ VALUE rb_cGrnTableCursor;
|
|
26
26
|
* Document-class: Groonga::TableCursor
|
27
27
|
*
|
28
28
|
* テーブルに登録されているレコードを順番に取り出すための
|
29
|
-
* オブジェクト。Groonga::Table#open_cursorで生成できる。
|
29
|
+
* オブジェクト。 {Groonga::Table#open_cursor} で生成できる。
|
30
30
|
*/
|
31
31
|
|
32
32
|
grn_table_cursor *
|
@@ -128,7 +128,7 @@ rb_grn_table_cursor_order_by_to_flag (unsigned char table_type,
|
|
128
128
|
* カレントレコードの値を返す。
|
129
129
|
*
|
130
130
|
* @overload value
|
131
|
-
*
|
131
|
+
* @return [String] カレントレコードの値
|
132
132
|
*/
|
133
133
|
static VALUE
|
134
134
|
rb_grn_table_cursor_get_value (VALUE self)
|
@@ -178,10 +178,9 @@ rb_grn_table_cursor_set_value (VALUE self, VALUE value)
|
|
178
178
|
}
|
179
179
|
|
180
180
|
/*
|
181
|
-
* call-seq:
|
182
|
-
* table_cursor.delete
|
183
|
-
*
|
184
181
|
* カレントレコードを削除する。
|
182
|
+
*
|
183
|
+
* @overload delete
|
185
184
|
*/
|
186
185
|
static VALUE
|
187
186
|
rb_grn_table_cursor_delete (VALUE self)
|
@@ -202,10 +201,10 @@ rb_grn_table_cursor_delete (VALUE self)
|
|
202
201
|
}
|
203
202
|
|
204
203
|
/*
|
205
|
-
* call-seq:
|
206
|
-
* table_cursor.next -> Groonga::Record
|
207
|
-
*
|
208
204
|
* カレントレコードを一件進めてそのレコードを返す。
|
205
|
+
*
|
206
|
+
* @overload next
|
207
|
+
* @return [Groonga::Record]
|
209
208
|
*/
|
210
209
|
static VALUE
|
211
210
|
rb_grn_table_cursor_next (VALUE self)
|
@@ -229,10 +228,10 @@ rb_grn_table_cursor_next (VALUE self)
|
|
229
228
|
}
|
230
229
|
|
231
230
|
/*
|
232
|
-
* call-seq:
|
233
|
-
* table_cursor.each {|record| ...}
|
234
|
-
*
|
235
231
|
* カーソルの範囲内にあるレコードを順番にブロックに渡す。
|
232
|
+
*
|
233
|
+
* @overload each
|
234
|
+
* @yield [record]
|
236
235
|
*/
|
237
236
|
static VALUE
|
238
237
|
rb_grn_table_cursor_each (VALUE self)
|
@@ -257,23 +256,17 @@ rb_grn_table_cursor_each (VALUE self)
|
|
257
256
|
}
|
258
257
|
|
259
258
|
/*
|
260
|
-
* Document-method: close
|
261
|
-
*
|
262
|
-
* call-seq:
|
263
|
-
* cursor.close
|
264
|
-
*
|
265
259
|
* カーソルが使用しているリソースを開放する。これ以降カーソルを
|
266
260
|
* 使うことはできない。
|
261
|
+
*
|
262
|
+
* @overload close
|
267
263
|
*/
|
268
264
|
|
269
265
|
/*
|
270
|
-
* Document-method: closed?
|
271
|
-
*
|
272
|
-
* call-seq:
|
273
|
-
* cursor.closed? -> true/false
|
274
|
-
*
|
275
266
|
* カーソルが開放済みの場合は +true+ を返し、そうでない場合は
|
276
267
|
* +false+ を返す。
|
268
|
+
*
|
269
|
+
* @overload closed?
|
277
270
|
*/
|
278
271
|
|
279
272
|
void
|
@@ -25,8 +25,8 @@ VALUE rb_mGrnTableKeySupport;
|
|
25
25
|
/*
|
26
26
|
* Document-module: Groonga::Table::KeySupport
|
27
27
|
*
|
28
|
-
* 主キーを持つテーブルであるGroonga::Hashと
|
29
|
-
* Groonga::PatriciaTrieに主キーの機能を提供するモジュール。
|
28
|
+
* 主キーを持つテーブルである {Groonga::Hash} と
|
29
|
+
* {Groonga::PatriciaTrie} に主キーの機能を提供するモジュール。
|
30
30
|
*/
|
31
31
|
|
32
32
|
void
|
@@ -110,21 +110,21 @@ rb_grn_table_key_support_add_raw (VALUE self, VALUE rb_key, int *added)
|
|
110
110
|
}
|
111
111
|
|
112
112
|
/*
|
113
|
-
* call-seq:
|
114
|
-
* table.add(key, values=nil) -> Groonga::Recordまたはnil
|
115
|
-
*
|
116
113
|
* 主キーが _key_ のレコード追加し、追加したレコードを返す。レ
|
117
114
|
* コードの追加に失敗した場合は +nil+ を返す。
|
118
115
|
*
|
119
116
|
* すでに同じキーのレコードが存在する場合は追加せずに同じレ
|
120
117
|
* コードを返す。追加されたかどうかは
|
121
|
-
*
|
118
|
+
* {Groonga::Record#added?} で調べることができる。 +true+ を返
|
122
119
|
* したら追加されたということを示す。
|
123
120
|
*
|
124
121
|
* _values_ にはレコードのカラムに設定する値を指定する。省略
|
125
122
|
* した場合または +nil+ を指定した場合はカラムは設定しない。カ
|
126
|
-
*
|
127
|
-
* ...}
|
123
|
+
* ラムの値は @{:カラム名1 => 値1, :カラム名2 => 値2,
|
124
|
+
* ...}@ と指定する。
|
125
|
+
*
|
126
|
+
* @overload add(key, values=nil)
|
127
|
+
* @return [Groonga::Recordまたはnil]
|
128
128
|
*/
|
129
129
|
static VALUE
|
130
130
|
rb_grn_table_key_support_add (int argc, VALUE *argv, VALUE self)
|
@@ -168,14 +168,15 @@ rb_grn_table_key_support_get (VALUE self, VALUE rb_key)
|
|
168
168
|
}
|
169
169
|
|
170
170
|
/*
|
171
|
-
* call-seq:
|
172
|
-
* table.id -> テーブルID
|
173
|
-
* table.id(key) -> レコードID
|
174
|
-
*
|
175
171
|
* _key_ を指定しない場合はテーブルのIDを返す。
|
176
172
|
*
|
177
173
|
* _key_ を指定した場合はテーブルの _key_ に対応するレコードの
|
178
174
|
* IDを返す。
|
175
|
+
*
|
176
|
+
* @overload id
|
177
|
+
* @return [テーブルID]
|
178
|
+
* @overload id(key)
|
179
|
+
* @return [レコードID]
|
179
180
|
*/
|
180
181
|
static VALUE
|
181
182
|
rb_grn_table_key_support_get_id (int argc, VALUE *argv, VALUE self)
|
@@ -198,10 +199,10 @@ rb_grn_table_key_support_get_id (int argc, VALUE *argv, VALUE self)
|
|
198
199
|
}
|
199
200
|
|
200
201
|
/*
|
201
|
-
* call-seq:
|
202
|
-
* table.key(id) -> 主キー
|
203
|
-
*
|
204
202
|
* テーブルの _id_ に対応する主キーを返す。
|
203
|
+
*
|
204
|
+
* @overload key(id)
|
205
|
+
* @return [主キー]
|
205
206
|
*/
|
206
207
|
static VALUE
|
207
208
|
rb_grn_table_key_support_get_key (VALUE self, VALUE rb_id)
|
@@ -234,10 +235,9 @@ rb_grn_table_key_support_get_key (VALUE self, VALUE rb_id)
|
|
234
235
|
}
|
235
236
|
|
236
237
|
/*
|
237
|
-
* call-seq:
|
238
|
-
* table.has_key?(key) -> true/false
|
239
|
-
*
|
240
238
|
* テーブルに主キーが _key_ のレコードがあるならtrueを返す。
|
239
|
+
*
|
240
|
+
* @overload has_key?(key)
|
241
241
|
*/
|
242
242
|
static VALUE
|
243
243
|
rb_grn_table_key_support_has_key (VALUE self, VALUE rb_key)
|
@@ -283,11 +283,10 @@ rb_grn_table_key_support_delete_by_key (VALUE self, VALUE rb_key)
|
|
283
283
|
}
|
284
284
|
|
285
285
|
/*
|
286
|
-
* call-seq:
|
287
|
-
* table.delete(id)
|
288
|
-
* table.delete(key)
|
289
|
-
*
|
290
286
|
* テーブルの _id_ または _key_ に対応するレコードを削除する。
|
287
|
+
*
|
288
|
+
* @overload delete(id)
|
289
|
+
* @overload delete(key)
|
291
290
|
*/
|
292
291
|
static VALUE
|
293
292
|
rb_grn_table_key_support_delete (VALUE self, VALUE rb_id_or_key)
|
@@ -300,9 +299,9 @@ rb_grn_table_key_support_delete (VALUE self, VALUE rb_id_or_key)
|
|
300
299
|
}
|
301
300
|
|
302
301
|
/*
|
303
|
-
* _table_ の _key_ に対応するGroonga::Recordを返す。
|
302
|
+
* _table_ の _key_ に対応する {Groonga::Record} を返す。
|
304
303
|
*
|
305
|
-
* 0.9.0から値ではなくGroonga::Recordを返すようになった。
|
304
|
+
* 0.9.0から値ではなく {Groonga::Record} を返すようになった。
|
306
305
|
*
|
307
306
|
* @overload [](key)
|
308
307
|
* @return [Groonga::Record]
|
@@ -592,10 +591,10 @@ rb_grn_table_key_support_set_value (int argc, VALUE *argv, VALUE self)
|
|
592
591
|
}
|
593
592
|
|
594
593
|
/*
|
595
|
-
*
|
596
|
-
* table.default_tokenizer -> nilまたはGroonga::Procedure
|
594
|
+
* {Groonga::IndexColumn} で使用するトークナイザを返す。
|
597
595
|
*
|
598
|
-
*
|
596
|
+
* @overload default_tokenizer
|
597
|
+
* @return [nilまたはGroonga::Procedure]
|
599
598
|
*/
|
600
599
|
static VALUE
|
601
600
|
rb_grn_table_key_support_get_default_tokenizer (VALUE self)
|
@@ -617,7 +616,7 @@ rb_grn_table_key_support_get_default_tokenizer (VALUE self)
|
|
617
616
|
}
|
618
617
|
|
619
618
|
/*
|
620
|
-
* Groonga::IndexColumnで使用するトークナイザを設定する。
|
619
|
+
* {Groonga::IndexColumn} で使用するトークナイザを設定する。
|
621
620
|
*
|
622
621
|
* @example
|
623
622
|
* # 2-gramを使用。
|
@@ -660,11 +659,10 @@ rb_grn_table_key_support_set_default_tokenizer (VALUE self, VALUE rb_tokenizer)
|
|
660
659
|
}
|
661
660
|
|
662
661
|
/*
|
663
|
-
* call-seq:
|
664
|
-
* table.normalize_key? -> true/false
|
665
|
-
*
|
666
662
|
* キーを正規化する場合は +true+ 、正規化しない場合は +false+ を返
|
667
663
|
* す。
|
664
|
+
*
|
665
|
+
* @overload normalize_key?
|
668
666
|
*/
|
669
667
|
static VALUE
|
670
668
|
rb_grn_table_key_normalize_key_p (VALUE self)
|
@@ -679,11 +677,10 @@ rb_grn_table_key_normalize_key_p (VALUE self)
|
|
679
677
|
}
|
680
678
|
|
681
679
|
/*
|
682
|
-
* call-seq:
|
683
|
-
* table.support_key? -> true/false
|
684
|
-
*
|
685
680
|
* テーブルでキーを使えるなら +true+ 、使えないなら +false+ を返
|
686
|
-
* す。キーを使えないテーブルはGroonga::Arrayだけ。
|
681
|
+
* す。キーを使えないテーブルは {Groonga::Array} だけ。
|
682
|
+
*
|
683
|
+
* @overload support_key?
|
687
684
|
*/
|
688
685
|
static VALUE
|
689
686
|
rb_grn_table_key_support_support_key_p (VALUE self)
|
data/ext/groonga/rb-grn-table.c
CHANGED
@@ -35,7 +35,7 @@ static ID id_array_set;
|
|
35
35
|
* Document-class: Groonga::Table < Groonga::Object
|
36
36
|
*
|
37
37
|
* rroongaが提供するテーブルのベースとなるクラス。このクラス
|
38
|
-
* からGroonga::Array, Groonga::Hash, Groonga::PatriciaTrie
|
38
|
+
* から {Groonga::Array} , {Groonga::Hash} , {Groonga::PatriciaTrie}
|
39
39
|
* が継承されている。
|
40
40
|
*/
|
41
41
|
|
@@ -204,10 +204,10 @@ rb_grn_table_inspect_content (VALUE self, VALUE inspected)
|
|
204
204
|
}
|
205
205
|
|
206
206
|
/*
|
207
|
-
* call-seq:
|
208
|
-
* table.inspect -> String
|
209
|
-
*
|
210
207
|
* テーブルの中身を人に見やすい文字列で返す。
|
208
|
+
*
|
209
|
+
* @overload inspect
|
210
|
+
* @return [String]
|
211
211
|
*/
|
212
212
|
static VALUE
|
213
213
|
rb_grn_table_inspect (VALUE self)
|
@@ -240,13 +240,13 @@ rb_grn_table_inspect (VALUE self)
|
|
240
240
|
* カラムの値の格納方法について指定する。省略した場合は、
|
241
241
|
* +:scalar+ になる。
|
242
242
|
*
|
243
|
-
*
|
244
|
-
*
|
243
|
+
* - +:scalar+ := スカラ値(単独の値)を格納する。
|
244
|
+
* - +:vector+ := 値の配列を格納する。
|
245
245
|
* @option options :compress
|
246
246
|
* 値の圧縮方法を指定する。省略した場合は、圧縮しない。
|
247
247
|
*
|
248
|
-
*
|
249
|
-
*
|
248
|
+
* - +:zlib+ := 値をzlib圧縮して格納する。
|
249
|
+
* - +:lzo+ := 値をlzo圧縮して格納する。
|
250
250
|
*
|
251
251
|
* @return [Groonga::FixSizeColumn or Groonga::VariableSizeColumn]
|
252
252
|
*/
|
@@ -508,11 +508,11 @@ ruby_object_to_column_name (VALUE rb_name,
|
|
508
508
|
}
|
509
509
|
|
510
510
|
/*
|
511
|
-
* call-seq:
|
512
|
-
* table.column(name) -> Groonga::Column or nil
|
513
|
-
*
|
514
511
|
* テーブルの _name_ に対応するカラムを返す。カラムが存在しな
|
515
512
|
* い場合は +nil+ を返す。
|
513
|
+
*
|
514
|
+
* @overload column(name)
|
515
|
+
* @return [Groonga::Column or nil]
|
516
516
|
*/
|
517
517
|
VALUE
|
518
518
|
rb_grn_table_get_column (VALUE self, VALUE rb_name)
|
@@ -589,11 +589,11 @@ rb_grn_table_get_column_surely (VALUE self, VALUE rb_name)
|
|
589
589
|
}
|
590
590
|
|
591
591
|
/*
|
592
|
-
* call-seq:
|
593
|
-
* table.columns(name=nil) -> Groonga::Columnの配列
|
594
|
-
*
|
595
592
|
* テーブルの全てのカラムを返す。 _name_ が指定された場合はカ
|
596
593
|
* ラム名の先頭が _name_ で始まるカラムを返す。
|
594
|
+
*
|
595
|
+
* @overload columns(name=nil)
|
596
|
+
* @return [Groonga::Columnの配列]
|
597
597
|
*/
|
598
598
|
static VALUE
|
599
599
|
rb_grn_table_get_columns (int argc, VALUE *argv, VALUE self)
|
@@ -665,10 +665,9 @@ rb_grn_table_get_columns (int argc, VALUE *argv, VALUE self)
|
|
665
665
|
}
|
666
666
|
|
667
667
|
/*
|
668
|
-
* call-seq:
|
669
|
-
* table.have_column?(name) -> true/false
|
670
|
-
*
|
671
668
|
* テーブルが _name_ カラムを持っている場合は +true+ を返す。
|
669
|
+
*
|
670
|
+
* @overload have_column?(name)
|
672
671
|
*/
|
673
672
|
static VALUE
|
674
673
|
rb_grn_table_have_column (VALUE self, VALUE rb_name)
|
@@ -788,7 +787,7 @@ rb_grn_table_open_grn_cursor (int argc, VALUE *argv, VALUE self,
|
|
788
787
|
* +:key+ 指定するとキー順にレコードを取り出す。ただし、
|
789
788
|
* Groonga::PatriciaTrieにしか使えない。(PatriciaTrieのデ
|
790
789
|
* フォルト)
|
791
|
-
* @option options :greater_than
|
790
|
+
* @option options :greater_than
|
792
791
|
* +true+ を指定すると +:min+ で指定した値に一致した [ +key+ ] を
|
793
792
|
* 範囲に含まない。
|
794
793
|
* @option options :less_than
|
@@ -820,7 +819,7 @@ rb_grn_table_open_grn_cursor (int argc, VALUE *argv, VALUE self,
|
|
820
819
|
* +:key+ 指定するとキー順にレコードを取り出す。ただし、
|
821
820
|
* Groonga::PatriciaTrieにしか使えない。(PatriciaTrieのデ
|
822
821
|
* フォルト)
|
823
|
-
* @option options :greater_than
|
822
|
+
* @option options :greater_than
|
824
823
|
* +true+ を指定すると +:min+ で指定した値に一致した [ +key+ ] を
|
825
824
|
* 範囲に含まない。
|
826
825
|
* @option options :less_than
|
@@ -844,11 +843,11 @@ rb_grn_table_open_cursor (int argc, VALUE *argv, VALUE self)
|
|
844
843
|
}
|
845
844
|
|
846
845
|
/*
|
847
|
-
* call-seq:
|
848
|
-
* table.records -> Groonga::Recordの配列
|
849
|
-
*
|
850
846
|
* テーブルに登録されている全てのレコードが入っている配列を
|
851
847
|
* 返す。
|
848
|
+
*
|
849
|
+
* @overload records
|
850
|
+
* @return [Groonga::Recordの配列]
|
852
851
|
*/
|
853
852
|
static VALUE
|
854
853
|
rb_grn_table_get_records (int argc, VALUE *argv, VALUE self)
|
@@ -872,7 +871,7 @@ rb_grn_table_get_records (int argc, VALUE *argv, VALUE self)
|
|
872
871
|
* テーブルに登録されているレコード数を返す。
|
873
872
|
*
|
874
873
|
* @overload size
|
875
|
-
*
|
874
|
+
* @return [Integer]
|
876
875
|
*/
|
877
876
|
static VALUE
|
878
877
|
rb_grn_table_get_size (VALUE self)
|
@@ -890,10 +889,9 @@ rb_grn_table_get_size (VALUE self)
|
|
890
889
|
}
|
891
890
|
|
892
891
|
/*
|
893
|
-
* call-seq:
|
894
|
-
* table.empty? -> true/false
|
895
|
-
*
|
896
892
|
* テーブルにレコードが登録されていなければ +true+ を返す。
|
893
|
+
*
|
894
|
+
* @overload empty?
|
897
895
|
*/
|
898
896
|
static VALUE
|
899
897
|
rb_grn_table_empty_p (VALUE self)
|
@@ -911,10 +909,9 @@ rb_grn_table_empty_p (VALUE self)
|
|
911
909
|
}
|
912
910
|
|
913
911
|
/*
|
914
|
-
* call-seq:
|
915
|
-
* table.truncate
|
916
|
-
*
|
917
912
|
* テーブルの全レコードを一括して削除する。
|
913
|
+
*
|
914
|
+
* @overload truncate
|
918
915
|
*/
|
919
916
|
static VALUE
|
920
917
|
rb_grn_table_truncate (VALUE self)
|
@@ -934,13 +931,17 @@ rb_grn_table_truncate (VALUE self)
|
|
934
931
|
}
|
935
932
|
|
936
933
|
/*
|
937
|
-
* call-seq:
|
938
|
-
* table.each {|record| } -> nil
|
939
|
-
* table.each(options={}) {|record| } -> nil
|
940
|
-
*
|
941
934
|
* テーブルに登録されているレコードを順番にブロックに渡す。
|
942
935
|
*
|
943
|
-
* _options_ is the same as #open_cursor's one.
|
936
|
+
* _options_ is the same as {#open_cursor} 's one.
|
937
|
+
*
|
938
|
+
* @overload each
|
939
|
+
* @!macro [new] table.each.metadata
|
940
|
+
* @yield [record]
|
941
|
+
* @return [nil]
|
942
|
+
* @!macro table.each.metadata
|
943
|
+
* @overload each(options={})
|
944
|
+
* @!macro table.each.metadata
|
944
945
|
*/
|
945
946
|
static VALUE
|
946
947
|
rb_grn_table_each (int argc, VALUE *argv, VALUE self)
|
@@ -969,10 +970,9 @@ rb_grn_table_each (int argc, VALUE *argv, VALUE self)
|
|
969
970
|
}
|
970
971
|
|
971
972
|
/*
|
972
|
-
* call-seq:
|
973
|
-
* table.delete(id)
|
974
|
-
*
|
975
973
|
* テーブルの _id_ に対応するレコードを削除する。
|
974
|
+
*
|
975
|
+
* @overload delete(id)
|
976
976
|
*/
|
977
977
|
VALUE
|
978
978
|
rb_grn_table_delete (VALUE self, VALUE rb_id)
|
@@ -1168,13 +1168,14 @@ rb_grn_table_sort (int argc, VALUE *argv, VALUE self)
|
|
1168
1168
|
}
|
1169
1169
|
|
1170
1170
|
/*
|
1171
|
-
* call-seq:
|
1172
|
-
* table.group([key1, key2, ...], options={}) -> [Groonga::Hash, ...]
|
1173
|
-
* table.group(key, options={}) -> Groonga::Hash
|
1174
|
-
*
|
1175
1171
|
* _table_ のレコードを _key1_ , _key2_ , _..._ で指定したキーの
|
1176
1172
|
* 値でグループ化する。多くの場合、キーにはカラムを指定する。
|
1177
1173
|
* カラムはカラム名(文字列)でも指定可能。
|
1174
|
+
*
|
1175
|
+
* @overload group([key1, key2, ...], options={})
|
1176
|
+
* @return [[Groonga::Hash, ...]]
|
1177
|
+
* @overload group(key, options={})
|
1178
|
+
* @return [Groonga::Hash]
|
1178
1179
|
*/
|
1179
1180
|
static VALUE
|
1180
1181
|
rb_grn_table_group (int argc, VALUE *argv, VALUE self)
|
@@ -1268,14 +1269,12 @@ rb_grn_table_group (int argc, VALUE *argv, VALUE self)
|
|
1268
1269
|
}
|
1269
1270
|
|
1270
1271
|
/*
|
1271
|
-
*
|
1272
|
-
*
|
1273
|
-
* call-seq:
|
1274
|
-
* table[id] -> Groonga::Record
|
1272
|
+
* _table_ の _id_ に対応する {Groonga::Record} を返す。
|
1275
1273
|
*
|
1276
|
-
*
|
1274
|
+
* 0.9.0から値ではなく {Groonga::Record} を返すようになった。
|
1277
1275
|
*
|
1278
|
-
*
|
1276
|
+
* @overload [](id)
|
1277
|
+
* @return [Groonga::Record]
|
1279
1278
|
*/
|
1280
1279
|
VALUE
|
1281
1280
|
rb_grn_table_array_reference (VALUE self, VALUE rb_id)
|
@@ -1310,17 +1309,16 @@ rb_grn_table_get_value (VALUE self, VALUE rb_id)
|
|
1310
1309
|
}
|
1311
1310
|
|
1312
1311
|
/*
|
1313
|
-
* Document-method: value
|
1314
|
-
*
|
1315
|
-
* call-seq:
|
1316
|
-
* table.value(id) -> 値
|
1317
|
-
* table.value(id, :id => true) -> 値
|
1318
|
-
*
|
1319
1312
|
* _table_ の _id_ に対応する値を返す。
|
1320
1313
|
*
|
1321
|
-
*
|
1322
|
-
* Groonga::ArrayでもGroonga::HashやGroonga::PatriciaTrieと
|
1314
|
+
* @:id => true@ が指定できるのは利便性のため。
|
1315
|
+
* {Groonga::Array} でも {Groonga::Hash} や {Groonga::PatriciaTrie} と
|
1323
1316
|
* 同じ引数で動くようになる。
|
1317
|
+
*
|
1318
|
+
* @overload value(id)
|
1319
|
+
* @return [値]
|
1320
|
+
* @overload value(id, :id => true)
|
1321
|
+
* @return [値]
|
1324
1322
|
*/
|
1325
1323
|
static VALUE
|
1326
1324
|
rb_grn_table_get_value_convenience (int argc, VALUE *argv, VALUE self)
|
@@ -1370,18 +1368,15 @@ rb_grn_table_set_value (VALUE self, VALUE rb_id, VALUE rb_value)
|
|
1370
1368
|
}
|
1371
1369
|
|
1372
1370
|
/*
|
1373
|
-
* Document-method: set_value
|
1374
|
-
*
|
1375
|
-
* call-seq:
|
1376
|
-
* table.set_value(id, value)
|
1377
|
-
* table.set_value(id, value, :id => true)
|
1378
|
-
*
|
1379
1371
|
* _table_ の _id_ に対応する値として _value_ 設定する。既存の値は
|
1380
1372
|
* 上書きされる。
|
1381
1373
|
*
|
1382
|
-
*
|
1383
|
-
* Groonga::ArrayでもGroonga::HashやGroonga::PatriciaTrieと
|
1374
|
+
* @:id => true@ が指定できるのは利便性のため。
|
1375
|
+
* {Groonga::Array} でも {Groonga::Hash} や {Groonga::PatriciaTrie} と
|
1384
1376
|
* 同じ引数で動くようになる。
|
1377
|
+
*
|
1378
|
+
* @overload set_value(id, value)
|
1379
|
+
* @overload set_value(id, value, :id => true)
|
1385
1380
|
*/
|
1386
1381
|
static VALUE
|
1387
1382
|
rb_grn_table_set_value_convenience (int argc, VALUE *argv, VALUE self)
|
@@ -1423,17 +1418,16 @@ rb_grn_table_get_column_value (VALUE self, VALUE rb_id, VALUE rb_name)
|
|
1423
1418
|
}
|
1424
1419
|
|
1425
1420
|
/*
|
1426
|
-
* Document-method: column_value
|
1427
|
-
*
|
1428
|
-
* call-seq:
|
1429
|
-
* table.column_value(id, name) -> 値
|
1430
|
-
* table.column_value(id, name, :id => true) -> 値
|
1431
|
-
*
|
1432
1421
|
* _table_ の _id_ に対応するカラム _name_ の値を返す。
|
1433
1422
|
*
|
1434
|
-
*
|
1435
|
-
* Groonga::ArrayでもGroonga::HashやGroonga::PatriciaTrieと
|
1423
|
+
* @:id => true@ が指定できるのは利便性のため。
|
1424
|
+
* {Groonga::Array} でも {Groonga::Hash} や {Groonga::PatriciaTrie} と
|
1436
1425
|
* 同じ引数で動くようになる。
|
1426
|
+
*
|
1427
|
+
* @overload column_value(id, name)
|
1428
|
+
* @return [値]
|
1429
|
+
* @overload column_value(id, name, :id => true)
|
1430
|
+
* @return [値]
|
1437
1431
|
*/
|
1438
1432
|
static VALUE
|
1439
1433
|
rb_grn_table_get_column_value_convenience (int argc, VALUE *argv, VALUE self)
|
@@ -1479,18 +1473,15 @@ rb_grn_table_set_column_value (VALUE self, VALUE rb_id,
|
|
1479
1473
|
}
|
1480
1474
|
|
1481
1475
|
/*
|
1482
|
-
* Document-method: set_column_value
|
1483
|
-
*
|
1484
|
-
* call-seq:
|
1485
|
-
* table.set_column_value(id, name, value)
|
1486
|
-
* table.set_column_value(id, name, value, :id => true)
|
1487
|
-
*
|
1488
1476
|
* _table_ の _id_ に対応するカラム _name_ の値として _value_ 設定す
|
1489
1477
|
* る。既存の値は上書きされる。
|
1490
1478
|
*
|
1491
|
-
*
|
1492
|
-
* Groonga::ArrayでもGroonga::HashやGroonga::PatriciaTrieと
|
1479
|
+
* @:id => true@ が指定できるのは利便性のため。
|
1480
|
+
* {Groonga::Array} でも {Groonga::Hash} や {Groonga::PatriciaTrie} と
|
1493
1481
|
* 同じ引数で動くようになる。
|
1482
|
+
*
|
1483
|
+
* @overload set_column_value(id, name, value)
|
1484
|
+
* @overload set_column_value(id, name, valuf, :id => true)
|
1494
1485
|
*/
|
1495
1486
|
static VALUE
|
1496
1487
|
rb_grn_table_set_column_value_convenience (int argc, VALUE *argv, VALUE self)
|
@@ -1516,18 +1507,14 @@ rb_grn_table_set_column_value_convenience (int argc, VALUE *argv, VALUE self)
|
|
1516
1507
|
}
|
1517
1508
|
|
1518
1509
|
/*
|
1519
|
-
* Document-method: unlock
|
1520
|
-
*
|
1521
|
-
* call-seq:
|
1522
|
-
* table.unlock(options={})
|
1523
|
-
*
|
1524
1510
|
* _table_ のロックを解除する。
|
1525
1511
|
*
|
1526
|
-
*
|
1527
|
-
*
|
1528
|
-
*
|
1529
|
-
*
|
1530
|
-
*
|
1512
|
+
* @overload unlock(options={})
|
1513
|
+
* @param options [::Hash] The name and value
|
1514
|
+
* pairs. Omitted names are initialized as the default value.
|
1515
|
+
* @option options :id
|
1516
|
+
* _:id_ で指定したレコードのロックを解除する。(注:
|
1517
|
+
* groonga側が未実装のため、現在は無視される)
|
1531
1518
|
*/
|
1532
1519
|
static VALUE
|
1533
1520
|
rb_grn_table_unlock (int argc, VALUE *argv, VALUE self)
|
@@ -1567,7 +1554,7 @@ rb_grn_table_unlock_ensure (VALUE self)
|
|
1567
1554
|
|
1568
1555
|
/*
|
1569
1556
|
* _table_ をロックする。ロックに失敗した場合は
|
1570
|
-
* Groonga::ResourceDeadlockAvoided例外が発生する。
|
1557
|
+
* {Groonga::ResourceDeadlockAvoided} 例外が発生する。
|
1571
1558
|
*
|
1572
1559
|
* ブロックを指定した場合はブロックを抜けたときにunlockする。
|
1573
1560
|
*
|
@@ -1712,8 +1699,8 @@ rb_grn_table_is_locked (int argc, VALUE *argv, VALUE self)
|
|
1712
1699
|
* _table_ からブロックまたは文字列で指定した条件にマッチする
|
1713
1700
|
* レコードを返す。返されたテーブルには +expression+ という特
|
1714
1701
|
* 異メソッドがあり、指定した条件を表している
|
1715
|
-
* Groonga::Expressionを取得できる。
|
1716
|
-
* Groonga::Expression#snippetを使うことにより、指定した条件
|
1702
|
+
* {Groonga::Expression} を取得できる。
|
1703
|
+
* {Groonga::Expression#snippet} を使うことにより、指定した条件
|
1717
1704
|
* 用のスニペットを簡単に生成できる。
|
1718
1705
|
*
|
1719
1706
|
* <pre>
|
@@ -1765,49 +1752,53 @@ rb_grn_table_is_locked (int argc, VALUE *argv, VALUE self)
|
|
1765
1752
|
* # => ["Hello Good-bye!", "Hello World"]
|
1766
1753
|
* </pre>
|
1767
1754
|
*
|
1768
|
-
*
|
1769
|
-
*
|
1770
|
-
*
|
1771
|
-
*
|
1772
|
-
*
|
1773
|
-
*
|
1774
|
-
*
|
1775
|
-
*
|
1776
|
-
*
|
1777
|
-
*
|
1778
|
-
*
|
1779
|
-
*
|
1780
|
-
*
|
1781
|
-
*
|
1782
|
-
*
|
1783
|
-
*
|
1784
|
-
*
|
1785
|
-
*
|
1786
|
-
*
|
1787
|
-
*
|
1788
|
-
*
|
1789
|
-
*
|
1790
|
-
*
|
1791
|
-
*
|
1792
|
-
*
|
1793
|
-
*
|
1794
|
-
*
|
1795
|
-
*
|
1796
|
-
*
|
1797
|
-
*
|
1798
|
-
*
|
1799
|
-
*
|
1800
|
-
*
|
1801
|
-
*
|
1802
|
-
*
|
1803
|
-
*
|
1804
|
-
*
|
1805
|
-
*
|
1806
|
-
*
|
1807
|
-
*
|
1808
|
-
*
|
1809
|
-
*
|
1810
|
-
*
|
1755
|
+
* @!macro [new] table.select.options
|
1756
|
+
* @param options [::Hash] The name and value
|
1757
|
+
* pairs. Omitted names are initialized as the default value.
|
1758
|
+
* @option options :default_column
|
1759
|
+
* "column_name:hoge"ではなく"hoge"のようにcolumn_nameが指
|
1760
|
+
* 定されない条件の検索対象となるカラムを指定する。
|
1761
|
+
* @option options :operator (Groonga::Operator::OR)
|
1762
|
+
* マッチしたレコードをどのように扱うか。指定可能な値は以
|
1763
|
+
* 下の通り。省略した場合はGroonga::Operator::OR。
|
1764
|
+
*
|
1765
|
+
* - Groonga::Operator::OR :=
|
1766
|
+
* マッチしたレコードを追加。すでにレコードが追加されている場合
|
1767
|
+
* は何もしない。 =:
|
1768
|
+
* - Groonga::Operator::AND :=
|
1769
|
+
* マッチしたレコードのスコアを増加。マッチしなかったレコードを削除。 =:
|
1770
|
+
* - Groonga::Operator::BUT :=
|
1771
|
+
* マッチしたレコードを削除。 =:
|
1772
|
+
* - Groonga::Operator::ADJUST :=
|
1773
|
+
* マッチしたレコードのスコアを増加。 =:
|
1774
|
+
*
|
1775
|
+
* @option options :result
|
1776
|
+
* 検索結果を格納するテーブル。マッチしたレコードが追加さ
|
1777
|
+
* れていく。省略した場合は新しくテーブルを作成して返す。
|
1778
|
+
* @option options :name
|
1779
|
+
* 条件の名前。省略した場合は名前を付けない。
|
1780
|
+
* @option options :syntax
|
1781
|
+
* _query_ の構文。省略した場合は +:query+ 。
|
1782
|
+
*
|
1783
|
+
* 参考: {Groonga::Expression#parse} .
|
1784
|
+
*
|
1785
|
+
* @option options :allow_pragma
|
1786
|
+
* query構文時にプラグマを利用するかどうか。省略した場合は
|
1787
|
+
* 利用する。
|
1788
|
+
*
|
1789
|
+
* 参考: {Groonga::Expression#parse} .
|
1790
|
+
*
|
1791
|
+
* @option options :allow_column
|
1792
|
+
* query構文時にカラム指定を利用するかどうか。省略した場合
|
1793
|
+
* は利用する。
|
1794
|
+
*
|
1795
|
+
* 参考: {Groonga::Expression#parse} .
|
1796
|
+
*
|
1797
|
+
* @option options :allow_update
|
1798
|
+
* script構文時に更新操作を利用するかどうか。省略した場合
|
1799
|
+
* は利用する。
|
1800
|
+
*
|
1801
|
+
* 参考: {Groonga::Expression#parse} .
|
1811
1802
|
*
|
1812
1803
|
* @overload select(query, options)
|
1813
1804
|
* _query_ には「[カラム名]:[演算子][値]」という書式で条件を
|
@@ -1830,96 +1821,11 @@ rb_grn_table_is_locked (int argc, VALUE *argv, VALUE self)
|
|
1830
1821
|
* # "groonga"を含んでいるレコードにマッチ
|
1831
1822
|
* </pre>
|
1832
1823
|
*
|
1833
|
-
*
|
1834
|
-
* pairs. Omitted names are initialized as the default value.
|
1835
|
-
* @option options :default_column
|
1836
|
-
* "column_name:hoge"ではなく"hoge"のようにcolumn_nameが指
|
1837
|
-
* 定されない条件の検索対象となるカラムを指定する。
|
1838
|
-
* @option options :operator (Groonga::Operator::OR)
|
1839
|
-
* マッチしたレコードをどのように扱うか。指定可能な値は以
|
1840
|
-
* 下の通り。省略した場合はGroonga::Operator::OR。
|
1841
|
-
*
|
1842
|
-
* [Groonga::Operator::OR] マッチしたレコードを追加。すで
|
1843
|
-
* にレコードが追加されている場合
|
1844
|
-
* は何もしない。
|
1845
|
-
* [Groonga::Operator::AND] マッチしたレコードのスコアを増
|
1846
|
-
* 加。マッチしなかったレコード
|
1847
|
-
* を削除。
|
1848
|
-
* [Groonga::Operator::BUT] マッチしたレコードを削除。
|
1849
|
-
* [Groonga::Operator::ADJUST] マッチしたレコードのスコア
|
1850
|
-
* を増加。
|
1851
|
-
*
|
1852
|
-
* @option options :result
|
1853
|
-
* 検索結果を格納するテーブル。マッチしたレコードが追加さ
|
1854
|
-
* れていく。省略した場合は新しくテーブルを作成して返す。
|
1855
|
-
* @option options :name
|
1856
|
-
* 条件の名前。省略した場合は名前を付けない。
|
1857
|
-
* @option options :syntax
|
1858
|
-
* _query_ の構文。省略した場合は +:query+ 。
|
1859
|
-
*
|
1860
|
-
* 参考: Groonga::Expression#parse.
|
1861
|
-
* @option options :allow_pragma
|
1862
|
-
* query構文時にプラグマを利用するかどうか。省略した場合は
|
1863
|
-
* 利用する。
|
1864
|
-
*
|
1865
|
-
* 参考: Groonga::Expression#parse.
|
1866
|
-
* @option options :allow_column
|
1867
|
-
* query構文時にカラム指定を利用するかどうか。省略した場合
|
1868
|
-
* は利用する。
|
1869
|
-
*
|
1870
|
-
* 参考: Groonga::Expression#parse.
|
1871
|
-
* @option options :allow_update
|
1872
|
-
* script構文時に更新操作を利用するかどうか。省略した場合
|
1873
|
-
* は利用する。
|
1874
|
-
*
|
1875
|
-
* 参考: Groonga::Expression#parse.
|
1876
|
-
*
|
1824
|
+
* @!macro table.select.options
|
1877
1825
|
* @overload select(expression, options)
|
1878
|
-
* _expression_ には既に作成済みのGroonga::Expression
|
1826
|
+
* _expression_ には既に作成済みの {Groonga::Expression} を渡す。
|
1879
1827
|
*
|
1880
|
-
*
|
1881
|
-
* pairs. Omitted names are initialized as the default value.
|
1882
|
-
* @option options :default_column
|
1883
|
-
* "column_name:hoge"ではなく"hoge"のようにcolumn_nameが指
|
1884
|
-
* 定されない条件の検索対象となるカラムを指定する。
|
1885
|
-
* @option options :operator (Groonga::Operator::OR)
|
1886
|
-
* マッチしたレコードをどのように扱うか。指定可能な値は以
|
1887
|
-
* 下の通り。省略した場合はGroonga::Operator::OR。
|
1888
|
-
*
|
1889
|
-
* [Groonga::Operator::OR] マッチしたレコードを追加。すで
|
1890
|
-
* にレコードが追加されている場合
|
1891
|
-
* は何もしない。
|
1892
|
-
* [Groonga::Operator::AND] マッチしたレコードのスコアを増
|
1893
|
-
* 加。マッチしなかったレコード
|
1894
|
-
* を削除。
|
1895
|
-
* [Groonga::Operator::BUT] マッチしたレコードを削除。
|
1896
|
-
* [Groonga::Operator::ADJUST] マッチしたレコードのスコア
|
1897
|
-
* を増加。
|
1898
|
-
*
|
1899
|
-
* @option options :result
|
1900
|
-
* 検索結果を格納するテーブル。マッチしたレコードが追加さ
|
1901
|
-
* れていく。省略した場合は新しくテーブルを作成して返す。
|
1902
|
-
* @option options :name
|
1903
|
-
* 条件の名前。省略した場合は名前を付けない。
|
1904
|
-
* @option options :syntax
|
1905
|
-
* _query_ の構文。省略した場合は +:query+ 。
|
1906
|
-
*
|
1907
|
-
* 参考: Groonga::Expression#parse.
|
1908
|
-
* @option options :allow_pragma
|
1909
|
-
* query構文時にプラグマを利用するかどうか。省略した場合は
|
1910
|
-
* 利用する。
|
1911
|
-
*
|
1912
|
-
* 参考: Groonga::Expression#parse.
|
1913
|
-
* @option options :allow_column
|
1914
|
-
* query構文時にカラム指定を利用するかどうか。省略した場合
|
1915
|
-
* は利用する。
|
1916
|
-
*
|
1917
|
-
* 参考: Groonga::Expression#parse.
|
1918
|
-
* @option options :allow_update
|
1919
|
-
* script構文時に更新操作を利用するかどうか。省略した場合
|
1920
|
-
* は利用する。
|
1921
|
-
*
|
1922
|
-
* 参考: Groonga::Expression#parse.
|
1828
|
+
* @!macro table.select.options
|
1923
1829
|
* @return [Groonga::Hash]
|
1924
1830
|
*/
|
1925
1831
|
static VALUE
|
@@ -1930,7 +1836,7 @@ rb_grn_table_select (int argc, VALUE *argv, VALUE self)
|
|
1930
1836
|
grn_operator operator = GRN_OP_OR;
|
1931
1837
|
VALUE rb_query = Qnil, condition_or_options, options;
|
1932
1838
|
VALUE rb_name, rb_operator, rb_result, rb_syntax;
|
1933
|
-
VALUE rb_allow_pragma, rb_allow_column, rb_allow_update;
|
1839
|
+
VALUE rb_allow_pragma, rb_allow_column, rb_allow_update, rb_allow_leading_not;
|
1934
1840
|
VALUE rb_default_column;
|
1935
1841
|
VALUE rb_expression = Qnil, builder;
|
1936
1842
|
|
@@ -1964,6 +1870,7 @@ rb_grn_table_select (int argc, VALUE *argv, VALUE self)
|
|
1964
1870
|
"allow_pragma", &rb_allow_pragma,
|
1965
1871
|
"allow_column", &rb_allow_column,
|
1966
1872
|
"allow_update", &rb_allow_update,
|
1873
|
+
"allow_leading_not", &rb_allow_leading_not,
|
1967
1874
|
"default_column", &rb_default_column,
|
1968
1875
|
NULL);
|
1969
1876
|
|
@@ -1987,6 +1894,7 @@ rb_grn_table_select (int argc, VALUE *argv, VALUE self)
|
|
1987
1894
|
rb_funcall(builder, rb_intern("allow_pragma="), 1, rb_allow_pragma);
|
1988
1895
|
rb_funcall(builder, rb_intern("allow_column="), 1, rb_allow_column);
|
1989
1896
|
rb_funcall(builder, rb_intern("allow_update="), 1, rb_allow_update);
|
1897
|
+
rb_funcall(builder, rb_intern("allow_leading_not="), 1, rb_allow_leading_not);
|
1990
1898
|
rb_funcall(builder, rb_intern("default_column="), 1, rb_default_column);
|
1991
1899
|
rb_expression = rb_grn_record_expression_builder_build(builder);
|
1992
1900
|
}
|
@@ -2030,12 +1938,11 @@ rb_grn_table_set_operation_bang (VALUE self, VALUE rb_other,
|
|
2030
1938
|
}
|
2031
1939
|
|
2032
1940
|
/*
|
2033
|
-
* call-seq:
|
2034
|
-
* table.union!(other) -> Groonga::Table
|
2035
|
-
*
|
2036
1941
|
* キーを比較し、 _table_ には登録されていない _other_ のレコー
|
2037
1942
|
* ドを _table_ に作成する。
|
2038
1943
|
*
|
1944
|
+
* @overload union!(other)
|
1945
|
+
* @return [Groonga::Table]
|
2039
1946
|
*/
|
2040
1947
|
static VALUE
|
2041
1948
|
rb_grn_table_union_bang (VALUE self, VALUE rb_other)
|
@@ -2045,12 +1952,11 @@ rb_grn_table_union_bang (VALUE self, VALUE rb_other)
|
|
2045
1952
|
|
2046
1953
|
|
2047
1954
|
/*
|
2048
|
-
* call-seq:
|
2049
|
-
* table.intersection!(other) -> Groonga::Table
|
2050
|
-
*
|
2051
1955
|
* キーを比較し、 _other_ には登録されていないレコードを
|
2052
1956
|
* _table_ から削除する。
|
2053
1957
|
*
|
1958
|
+
* @overload intersection!(other)
|
1959
|
+
* @return [Groonga::Table]
|
2054
1960
|
*/
|
2055
1961
|
static VALUE
|
2056
1962
|
rb_grn_table_intersection_bang (VALUE self, VALUE rb_other)
|
@@ -2059,12 +1965,11 @@ rb_grn_table_intersection_bang (VALUE self, VALUE rb_other)
|
|
2059
1965
|
}
|
2060
1966
|
|
2061
1967
|
/*
|
2062
|
-
* call-seq:
|
2063
|
-
* table.difference!(other) -> Groonga::Table
|
2064
|
-
*
|
2065
1968
|
* キーを比較し、 _other_ にも登録されているレコードを _table_
|
2066
1969
|
* から削除する。
|
2067
1970
|
*
|
1971
|
+
* @overload difference!(other)
|
1972
|
+
* @return [Groonga::Table]
|
2068
1973
|
*/
|
2069
1974
|
static VALUE
|
2070
1975
|
rb_grn_table_difference_bang (VALUE self, VALUE rb_other)
|
@@ -2073,12 +1978,11 @@ rb_grn_table_difference_bang (VALUE self, VALUE rb_other)
|
|
2073
1978
|
}
|
2074
1979
|
|
2075
1980
|
/*
|
2076
|
-
* call-seq:
|
2077
|
-
* table.merge!(other) -> Groonga::Table
|
2078
|
-
*
|
2079
1981
|
* キーを比較し、 _other_ にも登録されている _table_ のレコード
|
2080
1982
|
* のスコアを _other_ のスコアと同値にする。
|
2081
1983
|
*
|
1984
|
+
* @overload merge!(other)
|
1985
|
+
* @return [Groonga::Table]
|
2082
1986
|
*/
|
2083
1987
|
static VALUE
|
2084
1988
|
rb_grn_table_merge_bang (VALUE self, VALUE rb_other)
|
@@ -2087,11 +1991,10 @@ rb_grn_table_merge_bang (VALUE self, VALUE rb_other)
|
|
2087
1991
|
}
|
2088
1992
|
|
2089
1993
|
/*
|
2090
|
-
* call-seq:
|
2091
|
-
* table.support_key? -> true/false
|
2092
|
-
*
|
2093
1994
|
* _table_ に主キーが設定されていれば +true+ 、されていなければ
|
2094
1995
|
* +false+ を返す。
|
1996
|
+
*
|
1997
|
+
* @overload support_key?
|
2095
1998
|
*/
|
2096
1999
|
static VALUE
|
2097
2000
|
rb_grn_table_support_key_p (VALUE self)
|
@@ -2100,12 +2003,11 @@ rb_grn_table_support_key_p (VALUE self)
|
|
2100
2003
|
}
|
2101
2004
|
|
2102
2005
|
/*
|
2103
|
-
* call-seq:
|
2104
|
-
* table.support_sub_records? -> true/false
|
2105
|
-
*
|
2106
2006
|
* グループ化したとき、テーブルにグループに含まれるレコード
|
2107
2007
|
* 数を格納できる場合は +true+ 、格納できない場合は +false+ を返
|
2108
2008
|
* す。
|
2009
|
+
*
|
2010
|
+
* @overload support_sub_records?
|
2109
2011
|
*/
|
2110
2012
|
static VALUE
|
2111
2013
|
rb_grn_table_support_sub_records_p (VALUE self)
|
@@ -2120,14 +2022,13 @@ rb_grn_table_support_sub_records_p (VALUE self)
|
|
2120
2022
|
}
|
2121
2023
|
|
2122
2024
|
/*
|
2123
|
-
* call-seq:
|
2124
|
-
* table.exist?(id) -> true/false
|
2125
|
-
*
|
2126
2025
|
* _table_ に _id_ で指定したIDのレコードが存在する場合は +true+ 、
|
2127
2026
|
* 存在しない場合は +false+ を返す。
|
2128
2027
|
*
|
2129
2028
|
* 注意: 実行には相応のコストがかかるのであまり頻繁に呼ばな
|
2130
2029
|
* いようにして下さい。
|
2030
|
+
*
|
2031
|
+
* @overload exist?(id)
|
2131
2032
|
*/
|
2132
2033
|
static VALUE
|
2133
2034
|
rb_grn_table_exist_p (VALUE self, VALUE id)
|
@@ -2183,15 +2084,11 @@ rb_grn_table_defrag (int argc, VALUE *argv, VALUE self)
|
|
2183
2084
|
}
|
2184
2085
|
|
2185
2086
|
/*
|
2186
|
-
* Document-method: rename
|
2187
|
-
*
|
2188
|
-
* call-seq:
|
2189
|
-
* table.rename(name)
|
2190
|
-
*
|
2191
2087
|
* Renames the table to name.
|
2192
2088
|
*
|
2193
|
-
* @
|
2194
|
-
*
|
2089
|
+
* @overload rename(name)
|
2090
|
+
* @param name [String] the new name
|
2091
|
+
* @since 1.3.0
|
2195
2092
|
*/
|
2196
2093
|
static VALUE
|
2197
2094
|
rb_grn_table_rename (VALUE self, VALUE rb_name)
|