[Groonga-commit] groonga/groonga [master] added grn_obj_rename()

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 15日 (火) 10:57:31 JST


Daijiro MORI	2011-11-15 01:57:31 +0000 (Tue, 15 Nov 2011)

  New Revision: 5c7e56b4610a1b298db9aaa444524eb5c8fbf011

  Log:
    added grn_obj_rename()

  Modified files:
    include/groonga.h
    lib/db.c

  Modified: include/groonga.h (+11 -0)
===================================================================
--- include/groonga.h    2011-11-15 01:35:15 +0000 (1b00657)
+++ include/groonga.h    2011-11-15 01:57:31 +0000 (25934c4)
@@ -1431,6 +1431,17 @@ GRN_API grn_rc grn_obj_set_value(grn_ctx *ctx, grn_obj *obj, grn_id id, grn_obj
 GRN_API grn_rc grn_obj_remove(grn_ctx *ctx, grn_obj *obj);
 
 /**
+ * grn_obj_rename:
+ * @obj: 対象object
+ * @name: 新しい名前
+ * @name_size: @nameのsize(byte)
+ *
+ * ctxが使用するdbにおいてobjに対応する名前をnameに更新する。
+ * objは永続オブジェクトでなければならない。
+ **/
+GRN_API grn_rc grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size);
+
+/**
  * grn_obj_close:
  * @obj: 対象object
  *

  Modified: lib/db.c (+8 -0)
===================================================================
--- lib/db.c    2011-11-15 01:35:15 +0000 (9549c0c)
+++ lib/db.c    2011-11-15 01:57:31 +0000 (16e1fe5)
@@ -6033,6 +6033,14 @@ exit :
 }
 
 grn_rc
+grn_obj_rename(grn_ctx *ctx, grn_obj *obj, const char *name, unsigned name_size)
+{
+  GRN_API_ENTER;
+  /* coming soon! */
+  GRN_API_RETURN(GRN_SUCCESS);
+}
+
+grn_rc
 grn_obj_path_rename(grn_ctx *ctx, const char *old_path, const char *new_path)
 {
   GRN_API_ENTER;




Groonga-commit メーリングリストの案内
Back to archive index