[Groonga-commit] groonga/groonga at 16546f7 [master] doc: document grn_obj_cast()

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Sep 27 23:42:11 JST 2015


Kouhei Sutou	2015-09-27 23:42:11 +0900 (Sun, 27 Sep 2015)

  New Revision: 16546f746c523d7d4f1ae0ef6b9696b366cd841a
  https://github.com/groonga/groonga/commit/16546f746c523d7d4f1ae0ef6b9696b366cd841a

  Message:
    doc: document grn_obj_cast()

  Modified files:
    doc/source/reference/api/grn_obj.rst

  Modified: doc/source/reference/api/grn_obj.rst (+24 -0)
===================================================================
--- doc/source/reference/api/grn_obj.rst    2015-09-27 23:15:59 +0900 (44e9bc9)
+++ doc/source/reference/api/grn_obj.rst    2015-09-27 23:42:11 +0900 (63818e9)
@@ -243,3 +243,27 @@ Reference
    :param db: The target database.
    :param id: The object (table, column and so on) ID to be deleted.
    :param buffer: path string corresponding to the id will be set in this buffer.
+
+.. c:function:: grn_rc grn_obj_cast_by_id(grn_ctx *ctx, grn_obj *source, grn_obj *destination, grn_bool add_record_if_not_exist)
+
+   It casts value of ``source`` to value with type of
+   ``destination``. Casted value is appended to ``destination``.
+
+   Both ``source`` and ``destination`` must be bulk.
+
+   If ``destination`` is a reference type bulk. (Reference type bulk
+   means that type of ``destination`` is a table.)
+   ``add_record_if_not_exist`` is used. If ``source`` value doesn't
+   exist in the table that is a type of ``destination``. The ``source``
+   value is added to the table.
+
+   :param ctx: The context object.
+   :param source: The bulk to be casted.
+   :param destination: The bulk to specify cast target type and store
+                       casted value.
+   :param add_record_if_not_exist: Whether adding a new record if
+                                   ``source`` value doesn't exist in
+                                   cast target table. This parameter
+                                   is only used when ``destination``
+                                   is a reference type bulk.
+   :return: ``GRN_SUCCESS`` on success, not ``GRN_SUCCESS`` on error.
-------------- next part --------------
HTML����������������������������...
下載 



More information about the Groonga-commit mailing list
Back to archive index