Kouhei Sutou
null+****@clear*****
Tue Jan 26 16:00:57 JST 2016
Kouhei Sutou 2016-01-26 16:00:57 +0900 (Tue, 26 Jan 2016) New Revision: ab7ae84759b7dbc097a5b4cb109d64251df28129 https://github.com/groonga/groonga/commit/ab7ae84759b7dbc097a5b4cb109d64251df28129 Message: doc: document lock_acquire Added files: doc/source/example/reference/commands/lock_acquire/column.log doc/source/example/reference/commands/lock_acquire/database.log doc/source/example/reference/commands/lock_acquire/database_release.log doc/source/example/reference/commands/lock_acquire/table.log doc/source/reference/commands/lock_acquire.rst Added: doc/source/example/reference/commands/lock_acquire/column.log (+8 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/lock_acquire/column.log 2016-01-26 16:00:57 +0900 (7eafcb3) @@ -0,0 +1,8 @@ +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] Added: doc/source/example/reference/commands/lock_acquire/database.log (+4 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/lock_acquire/database.log 2016-01-26 16:00:57 +0900 (30f3adf) @@ -0,0 +1,4 @@ +Execution example:: + + lock_acquire + # [[0, 1337566253.89858, 0.000355720520019531], true] Added: doc/source/example/reference/commands/lock_acquire/database_release.log (+4 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/lock_acquire/database_release.log 2016-01-26 16:00:57 +0900 (7433653) @@ -0,0 +1,4 @@ +Execution example:: + + lock_release + # [[0, 1337566253.89858, 0.000355720520019531], true] Added: doc/source/example/reference/commands/lock_acquire/table.log (+6 -0) 100644 =================================================================== --- /dev/null +++ doc/source/example/reference/commands/lock_acquire/table.log 2016-01-26 16:00:57 +0900 (d04ee39) @@ -0,0 +1,6 @@ +Execution example:: + + table_create Entry TABLE_NO_KEY + # [[0, 1337566253.89858, 0.000355720520019531], true] + lock_acquire Entry + # [[0, 1337566253.89858, 0.000355720520019531], true] Added: doc/source/reference/commands/lock_acquire.rst (+95 -0) 100644 =================================================================== --- /dev/null +++ doc/source/reference/commands/lock_acquire.rst 2016-01-26 16:00:57 +0900 (30071b8) @@ -0,0 +1,95 @@ +.. -*- rst -*- + +.. highlightlang:: none + +.. groonga-command +.. database: lock_acquire + +``lock_acquire`` +================ + +Summary +------- + +.. versionadded:: 5.1.2 + +``lock_acquire`` command acquires the lock of the target object. The +target object is one of database, table and column. + +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 acquire the lock of the database: + +.. groonga-command +.. include:: ../../example/reference/commands/lock_acquire/database.log +.. lock_acquire + +If the database is locked, you can't create a new table and +column. Release the lock of the database to show another examples. + +.. groonga-command +.. include:: ../../example/reference/commands/lock_acquire/database_release.log +.. lock_release + +Here is an example to acquire the lock of ``Entry`` table: + +.. groonga-command +.. include:: ../../example/reference/commands/lock_acquire/table.log +.. table_create Entry TABLE_NO_KEY +.. lock_acquire Entry + +Here is an example to acquire the lock of ``Site.title`` column: + +.. groonga-command +.. include:: ../../example/reference/commands/lock_acquire/column.log +.. table_create Site TABLE_HASH_KEY ShortText +.. column_create Site title COLUMN_SCALAR ShortText +.. lock_acquire 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_acquire`` command returns whether lock is acquired 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_release` + * :doc:`lock_clear` -------------- next part -------------- HTML����������������������������...Download