groonga - オープンソースのカラムストア機能付き全文検索エンジン

7.3.18. lock_clear

7.3.18.1. 概要

バージョン 4.0.9 で追加.

lock_clear command clear the lock of the target object recursively. The target object is one of database, table and column.

注釈

This is a dangerous command. You must not use this command while other process or thread is doing a write operation to the target object. If you do it, your database may be broken and/or your process may be crashed.

7.3.18.2. 構文

truncate コマンドの引数は1つだけです:

必須の引数はありません:

lock_clear [target_name=null]

If target_name parameters is omitted, database is used for the target object. It means that all locks in the database are cleared.

7.3.18.3. 使い方

以下はデータベースの中のすべてのロックを解放する例です:

実行例:

lock_clear
# [[0, 1337566253.89858, 0.000355720520019531], true]

以下は Entry テーブルと Entry テーブルのカラムのロックを解放する例です:

実行例:

table_create Entry TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Entry body COLUMN_SCALAR Text
# [[0, 1337566253.89858, 0.000355720520019531], true]
lock_clear Entry
# [[0, 1337566253.89858, 0.000355720520019531], true]

以下は Site.title カラムのロックを解放する例です:

実行例:

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_clear Site.title
# [[0, 1337566253.89858, 0.000355720520019531], true]

7.3.18.4. 引数

このセクションではすべての引数について説明します。

7.3.18.4.1. target_name

テーブル名またはカラム名を指定します。

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.

7.3.18.5. 戻り値

[HEADER, SUCCEEDED_OR_NOT]

HEADER

HEADER については 出力形式 を参照してください。

SUCCEEDED_OR_NOT

コマンドの実行が成功するとtrueを返します。失敗するとエラーとしてfalseを返します。

目次

前のトピックへ

7.3.17. load

次のトピックへ

7.3.19. log_level

このページ