whombx
null+****@clear*****
Fri Aug 9 21:31:23 JST 2013
whombx 2013-08-09 21:31:23 +0900 (Fri, 09 Aug 2013) New Revision: d96faa162bce3b16bcbbee7fc4d7ade46d87c65c https://github.com/groonga/groonga/commit/d96faa162bce3b16bcbbee7fc4d7ade46d87c65c Merged 2d22ae6: Merge branch 'grn-obj-path' of https://github.com/whombx/groonga into whombx-grn-obj-path Message: doc: move 10 grn_obj_*() documents from groonga.h to Sphinx text Modified files: doc/source/reference/api/grn_obj.txt include/groonga.h Modified: doc/source/reference/api/grn_obj.txt (+65 -0) =================================================================== --- doc/source/reference/api/grn_obj.txt 2013-08-09 17:41:07 +0900 (f0d4f5d) +++ doc/source/reference/api/grn_obj.txt 2013-08-09 21:31:23 +0900 (fac3ef8) @@ -31,3 +31,68 @@ Reference :param table: 対象tableを指定します。 :param name: カラム名を指定します。 +.. c:function:: const char *grn_obj_path(grn_ctx *ctx, grn_obj *obj) + + objに対応するファイルパスを返します。一時objectならNULLを返します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: int grn_obj_name(grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size) + + objの名前の長さを返します。無名objectなら0を返します。 + + 名前付きのobjectであり、buf_sizeの長さが名前の長以上であった場合は、namebufに該当する名前をコピーします。 + + :param obj: 対象objectを指定します。 + :param namebuf: 名前を格納するバッファ(呼出側で準備する)を指定します。 + :param buf_size: namebufのサイズ(byte長)を指定します。 + +.. c:function:: grn_id grn_obj_get_range(grn_ctx *ctx, grn_obj *obj) + + objパラメータのとる値の範囲を表わしているオブジェクトのIDを返します。例えば、:c:type:`grn_builtin_type` にある ``GRN_DB_INT`` などを返します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: int grn_obj_expire(grn_ctx *ctx, grn_obj *obj, int threshold) + + objの占有するメモリのうち、可能な領域をthresholdを指標として解放します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: int grn_obj_check(grn_ctx *ctx, grn_obj *obj) + + objに対応するファイルの整合性を検査します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: grn_rc grn_obj_lock(grn_ctx *ctx, grn_obj *obj, grn_id id, int timeout) + + objをlockします。timeout(秒)経過してもlockを取得できない場合は ``GRN_RESOURCE_DEADLOCK_AVOIDED`` を返します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: grn_rc grn_obj_unlock(grn_ctx *ctx, grn_obj *obj, grn_id id) + + objをunlockします。 + + :param obj: 対象objectを指定します。 + +.. c:function:: grn_rc grn_obj_clear_lock(grn_ctx *ctx, grn_obj *obj) + + 強制的にロックをクリアします。 + + :param obj: 対象objectを指定します。 + +.. c:function:: unsigned int grn_obj_is_locked(grn_ctx *ctx, grn_obj *obj) + + objが現在lockされていれば0以外の値を返します。 + + :param obj: 対象objectを指定します。 + +.. c:function:: int grn_obj_defrag(grn_ctx *ctx, grn_obj *obj, int threshold) + + objの占有するDBファイル領域のうち、可能な領域をthresholdを指標としてフラグメントの解消を行います。 + + フラグメント解消が実行されたセグメントの数を返します。 + + :param obj: 対象objectを指定します。 Modified: include/groonga.h (+0 -74) =================================================================== --- include/groonga.h 2013-08-09 17:41:07 +0900 (2d6d589) +++ include/groonga.h 2013-08-09 21:31:23 +0900 (9ed8b26) @@ -1045,24 +1045,7 @@ GRN_API grn_user_data *grn_obj_user_data(grn_ctx *ctx, grn_obj *obj); **/ GRN_API grn_rc grn_obj_set_finalizer(grn_ctx *ctx, grn_obj *obj, grn_proc_func *func); -/** - * grn_obj_path: - * @obj: 対象object - * - * objに対応するファイルパスを返す。一時objectならNULLを返す。 - **/ GRN_API const char *grn_obj_path(grn_ctx *ctx, grn_obj *obj); - -/** - * grn_obj_name: - * @obj: 対象object - * @namebuf: 名前を格納するバッファ(呼出側で準備する) - * @buf_size: namebufのサイズ(byte長) - * - * objの名前の長さを返す。無名objectなら0を返す。 - * 名前付きのobjectであり、buf_sizeの長さが名前の長以上であった場合は、 - * namebufに該当する名前をコピーする。 - **/ GRN_API int grn_obj_name(grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size); /** @@ -1077,74 +1060,17 @@ GRN_API int grn_obj_name(grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size **/ GRN_API int grn_column_name(grn_ctx *ctx, grn_obj *obj, char *namebuf, int buf_size); -/** - * grn_obj_get_range: - * @obj: 対象object - * - * @objのとる値の範囲を表わしているオブジェクトのIDを返す。 - * 例えば、grn_builtin_typeにあるGRN_DB_INTなどを返す。 - **/ GRN_API grn_id grn_obj_get_range(grn_ctx *ctx, grn_obj *obj); #define GRN_OBJ_GET_DOMAIN(obj) \ ((obj)->header.type == GRN_TABLE_NO_KEY ? GRN_ID_NIL : (obj)->header.domain) -/** - * grn_obj_expire: - * @obj: 対象object - * - * objの占有するメモリのうち、可能な領域をthresholdを指標として解放する。 - **/ GRN_API int grn_obj_expire(grn_ctx *ctx, grn_obj *obj, int threshold); - -/** - * grn_obj_check: - * @obj: 対象object - * - * objに対応するファイルの整合性を検査する。 - **/ GRN_API int grn_obj_check(grn_ctx *ctx, grn_obj *obj); - -/** - * grn_obj_lock: - * @obj: 対象object - * - * objをlockする。timeout(秒)経過してもlockを取得できない場合は - * GRN_RESOURCE_DEADLOCK_AVOIDEDを返す。 - **/ GRN_API grn_rc grn_obj_lock(grn_ctx *ctx, grn_obj *obj, grn_id id, int timeout); - -/** - * grn_obj_unlock: - * @obj: 対象object - * - * objをunlockする。 - **/ GRN_API grn_rc grn_obj_unlock(grn_ctx *ctx, grn_obj *obj, grn_id id); - -/** - * grn_obj_clear_lock: - * @obj: 対象object - * - * 強制的にロックをクリアする。 - **/ GRN_API grn_rc grn_obj_clear_lock(grn_ctx *ctx, grn_obj *obj); - -/** - * grn_obj_is_locked; - * @obj: 対象object - * - * objが現在lockされていれば0以外の値を返す。 - **/ GRN_API unsigned int grn_obj_is_locked(grn_ctx *ctx, grn_obj *obj); - -/** - * grn_obj_defrag; - * @obj: 対象object - * - * objの占有するDBファイル領域のうち、可能な領域をthresholdを指標としてフラグメントの解消を行う。 - * フラグメント解消が実行されたセグメントの数を返す。 - **/ GRN_API int grn_obj_defrag(grn_ctx *ctx, grn_obj *obj, int threshold); /** -------------- next part -------------- HTML����������������������������... 下載