null+****@clear*****
null+****@clear*****
2010年 11月 19日 (金) 07:30:10 JST
Daijiro MORI 2010-11-18 22:30:10 +0000 (Thu, 18 Nov 2010)
New Revision: 3ae36462c9b17031ae89a1234552d790c40501b7
Log:
Exported grn_table_at()
Modified files:
include/groonga.h
lib/db.h
Modified: include/groonga.h (+13 -0)
===================================================================
--- include/groonga.h 2010-11-18 11:52:34 +0000 (83c7431)
+++ include/groonga.h 2010-11-18 22:30:10 +0000 (648fe07)
@@ -674,6 +674,19 @@ GRN_API grn_id grn_table_add(grn_ctx *ctx, grn_obj *table,
GRN_API grn_id grn_table_get(grn_ctx *ctx, grn_obj *table,
const void *key, unsigned key_size);
+
+/**
+ * grn_table_at:
+ * @table: 対象table
+ * @id: 検索id
+ *
+ * tableにidに対応するrecordが存在するか確認し、存在すれば指定されたIDを、
+ * 存在しなければGRN_ID_NILを返します。
+ * 注意: 実行には相応のコストがかかるのであまり頻繁に呼ばないようにして下さい。
+ **/
+GRN_API grn_id grn_table_at(grn_ctx *ctx, grn_obj *table, grn_id id);
+
+
/**
* grn_table_lcp_search:
* @table: 対象table
Modified: lib/db.h (+0 -1)
===================================================================
--- lib/db.h 2010-11-18 11:52:34 +0000 (77a8801)
+++ lib/db.h 2010-11-18 22:30:10 +0000 (20fa8c9)
@@ -414,7 +414,6 @@ void grn_obj_spec_save(grn_ctx *ctx, grn_db_obj *obj);
void grn_expr_pack(grn_ctx *ctx, grn_obj *buf, grn_obj *expr);
grn_rc grn_expr_inspect(grn_ctx *ctx, grn_obj *buf, grn_obj *expr);
grn_obj *grn_expr_open(grn_ctx *ctx, grn_obj_spec *spec, const uint8_t *p, const uint8_t *pe);
-grn_id grn_table_at(grn_ctx *ctx, grn_obj *table, grn_id id);
grn_obj *grn_table_create_for_group(grn_ctx *ctx, const char *name, unsigned name_size,
const char *path, grn_obj_flags flags,