[Groonga-commit] groonga/groonga at f8faf86 [master] doc: document lock_release

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jan 26 16:17:30 JST 2016


Kouhei Sutou	2016-01-26 16:17:30 +0900 (Tue, 26 Jan 2016)

  New Revision: f8faf86458c395d245f97319132e7d251a2920d4
  https://github.com/groonga/groonga/commit/f8faf86458c395d245f97319132e7d251a2920d4

  Message:
    doc: document lock_release

  Added files:
    doc/source/example/reference/commands/lock_release/column.log
    doc/source/example/reference/commands/lock_release/database.log
    doc/source/example/reference/commands/lock_release/database_release.log
    doc/source/example/reference/commands/lock_release/table.log
    doc/source/reference/commands/lock_release.rst

  Added: doc/source/example/reference/commands/lock_release/column.log (+10 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/lock_release/column.log    2016-01-26 16:17:30 +0900 (a0c4bff)
@@ -0,0 +1,10 @@
+Execution example::
+
+  table_create Site TABLE_HASH_KEY ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Site title COLUMN_SCALAR ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  lock_acquire Site.title
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  lock_release Site.title
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/reference/commands/lock_release/database.log (+6 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/lock_release/database.log    2016-01-26 16:17:30 +0900 (1efaf96)
@@ -0,0 +1,6 @@
+Execution example::
+
+  lock_acquire
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  lock_release
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/reference/commands/lock_release/database_release.log (+4 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/lock_release/database_release.log    2016-01-26 16:17:30 +0900 (7433653)
@@ -0,0 +1,4 @@
+Execution example::
+
+  lock_release
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/reference/commands/lock_release/table.log (+8 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/lock_release/table.log    2016-01-26 16:17:30 +0900 (2331eae)
@@ -0,0 +1,8 @@
+Execution example::
+
+  table_create Entry TABLE_NO_KEY
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  lock_acquire Entry
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  lock_release Entry
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/reference/commands/lock_release.rst (+98 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/reference/commands/lock_release.rst    2016-01-26 16:17:30 +0900 (0547796)
@@ -0,0 +1,98 @@
+.. -*- rst -*-
+
+.. highlightlang:: none
+
+.. groonga-command
+.. database: lock_release
+
+``lock_release``
+================
+
+Summary
+-------
+
+.. versionadded:: 5.1.2
+
+``lock_release`` command releases the lock of the target object. The
+target object is one of database, table and column.
+
+.. note::
+
+   This is a dangerous command. You must only release locks that you
+   acquire by :doc:`lock_acquire`. If you release locks without
+   :doc:`lock_acquire`, your database may be broken.
+
+Syntax
+------
+
+This command takes only one optional parameter::
+
+  lock_clear [target_name=null]
+
+If ``target_name`` parameters is omitted, database is used for the
+target object.
+
+Usage
+-----
+
+Here is an example to release the lock of the database:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/lock_release/database.log
+.. lock_acquire
+.. lock_release
+
+Here is an example to release the lock of ``Entry`` table:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/lock_release/table.log
+.. table_create Entry TABLE_NO_KEY
+.. lock_acquire Entry
+.. lock_release Entry
+
+Here is an example to release the lock of ``Site.title`` column:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/lock_release/column.log
+.. table_create Site TABLE_HASH_KEY ShortText
+.. column_create Site title COLUMN_SCALAR ShortText
+.. lock_acquire Site.title
+.. lock_release Site.title
+
+Parameters
+----------
+
+This section describes all parameters.
+
+``target_name``
+"""""""""""""""
+
+Specifies the name of table or column.
+
+If you don't specify it, database is used for the target object.
+
+The default is none. It means that the target object is database.
+
+Return value
+------------
+
+``lock_release`` command returns whether lock is released successfully
+or not::
+
+ [HEADER, SUCCEEDED_OR_NOT]
+
+``HEADER``
+""""""""""
+
+See :doc:`/reference/command/output_format` about ``HEADER``.
+
+``SUCCEEDED_OR_NOT``
+""""""""""""""""""""
+
+If command succeeded, it returns true, otherwise it returns false on error.
+
+See also
+--------
+
+  * :doc:`lock_acquire`
+  * :doc:`lock_clear`
-------------- next part --------------
HTML����������������������������...
Download 



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