[Groonga-commit] groonga/groonga at 106b00c [master] doc table_remove: describe about dependent parameter

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Mar 17 16:45:46 JST 2016


Kouhei Sutou	2016-03-17 16:45:46 +0900 (Thu, 17 Mar 2016)

  New Revision: 106b00ca6e4d337bb8f1a7b434658b58300b2de6
  https://github.com/groonga/groonga/commit/106b00ca6e4d337bb8f1a7b434658b58300b2de6

  Message:
    doc table_remove: describe about dependent parameter

  Added files:
    doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_schema.log
    doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_yes.log
  Copied files:
    doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_no.log
      (from doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log)
  Modified files:
    doc/locale/ja/LC_MESSAGES/reference.po
    doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log
    doc/source/example/reference/commands/table_remove/unremovable_cases_value_type_remove_fail.log
    doc/source/reference/commands/table_remove.rst

  Modified: doc/locale/ja/LC_MESSAGES/reference.po (+65 -1)
===================================================================
--- doc/locale/ja/LC_MESSAGES/reference.po    2016-03-17 15:59:06 +0900 (5550de4)
+++ doc/locale/ja/LC_MESSAGES/reference.po    2016-03-17 16:45:46 +0900 (229e47b)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 1.2.1\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2016-03-17 12:53+0900\n"
+"PO-Revision-Date: 2016-03-17 16:43+0900\n"
 "Last-Translator: Masafumi Yokoyama <yokoyama �� clear-code.com>\n"
 "Language-Team: Japanese\n"
 "Language: ja\n"
@@ -7889,6 +7889,9 @@ msgstr ""
 "``--force yes`` は「強制モード」を有効にするという意味です。「強制モード」で"
 "は壊れたオブジェクトを削除することができます。"
 
+msgid "There is only one required parameter."
+msgstr "必須の引数は1つです。"
+
 msgid "Specifies the object name to be removed."
 msgstr "削除するテーブルの名前を指定します。"
 
@@ -12399,6 +12402,34 @@ msgstr ""
 "要があります。"
 
 msgid ""
+"If you understand what you'll do, you can also remove tables and columns "
+"that reference the target table with one ``table_remove`` command by using "
+"``--dependent yes`` parameter."
+msgstr ""
+"もし、自分がなにをしようとしているかちゃんと理解しているのであれば、 ``--"
+"dependent yes`` パラメーターを使うことで1回の ``table_remove`` で対象テーブル"
+"を参照しているテーブルとカラムも削除することができます。"
+
+msgid ""
+"``ReferencedTable`` in the following schema is referenced from a table and a "
+"column:"
+msgstr ""
+"以下のスキーマの ``ReferencedTable`` は1つのテーブルと1つのカラムから参照され"
+"ています。"
+
+msgid "You can't remove ``ReferencedTable`` by default:"
+msgstr "デフォルトでは ``ReferencedTable`` を削除することはできません。"
+
+msgid ""
+"You can remove ``ReferencedTable``, ``Table1`` and ``Table2."
+"reference_column`` by using ``--dependent yes`` parameter. ``Table1`` and "
+"``Table2.reference_column`` reference ``ReferencedTable``:"
+msgstr ""
+"``--dependent yes`` パラメーターを使うことで ``ReferencedTable`` と "
+"``Table1`` と ``Table2.reference_column`` を削除できます。 ``Table1`` と "
+"``Table2.reference_column`` は ``ReferencedTable`` を参照しています。"
+
+msgid ""
 "``table_remove`` opens all tables and columns in database to check :ref:"
 "`table-remove-unremovable-cases`."
 msgstr ""
@@ -12437,6 +12468,39 @@ msgid "See :ref:`table-remove-usage` how to use this parameter."
 msgstr ""
 "このパラメーターの使い方は :ref:`table-remove-usage` を参照してください。"
 
+msgid "``dependent``"
+msgstr ""
+
+# 10e63c2a9052442fbfca25373f30d1db
+msgid ""
+"Specifies whether tables and columns that reference the target table are "
+"also removed or not."
+msgstr ""
+"対象テーブルを参照しているテーブル・カラムも一緒に削除するかどうかを指定しま"
+"す。"
+
+msgid ""
+"If this value is ``yes``, tables and columns that reference the target table "
+"are also removed. Otherwise, they aren't removed and an error is returned."
+msgstr ""
+"``yes`` を指定した場合は、対象テーブルを参照しているテーブル・カラムも一緒に"
+"削除します。それ以外の場合は、どれも削除せずにエラーが返ります。"
+
+msgid ""
+"In other words, if there are any tables and columns that reference the "
+"target table, the target table isn't removed by default."
+msgstr ""
+"言い換えると、デフォルトでは、対象テーブルを参照しているテーブル・カラムが1つ"
+"でもあると、対象テーブルを削除しません。"
+
+msgid "You should use this parameter carefully. This is a danger parameter."
+msgstr "このパラメーターは注意して使ってください。危険なパラメーターです。"
+
+msgid "See :ref:`table-remove-unremovable-cases` how to use this parameter."
+msgstr ""
+"このパラメーターの使い方は :ref:`table-remove-unremovable-cases` を参照してく"
+"ださい。"
+
 msgid "``table_rename``"
 msgstr ""
 

  Copied: doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_no.log (+3 -3) 74%
===================================================================
--- doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log    2016-03-17 15:59:06 +0900 (ba81b47)
+++ doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_no.log    2016-03-17 16:45:46 +0900 (3639ead)
@@ -1,17 +1,17 @@
 Execution example::
 
-  table_remove ReferencedByTable
+  table_remove ReferencedTable
   # [
   #   [
   #     -2, 
   #     1337566253.89858, 
   #     0.000355720520019531, 
-  #     "[table][remove] a table that references the table exists: <ReferenceTable._key> -> <ReferencedByTable>", 
+  #     "[table][remove] a table that references the table exists: <Table1._key> -> <ReferencedTable>", 
   #     [
   #       [
   #         "is_removable_table", 
   #         "db.c", 
-  #         8480
+  #         8831
   #       ]
   #     ]
   #   ], 

  Added: doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_schema.log (+10 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_schema.log    2016-03-17 16:45:46 +0900 (463ecf1)
@@ -0,0 +1,10 @@
+Execution example::
+
+  table_create ReferencedTable TABLE_HASH_KEY ShortText
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Table1 TABLE_HASH_KEY ReferencedTable
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  table_create Table2 TABLE_NO_KEY
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Table2 reference_column COLUMN_SCALAR ReferencedTable
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Added: doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_yes.log (+4 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/table_remove/unremovable_cases_dependent_yes.log    2016-03-17 16:45:46 +0900 (352a6db)
@@ -0,0 +1,4 @@
+Execution example::
+
+  table_remove ReferencedTable --dependent yes
+  # [[0, 1337566253.89858, 0.000355720520019531], true]

  Modified: doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log (+1 -1)
===================================================================
--- doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log    2016-03-17 15:59:06 +0900 (ba81b47)
+++ doc/source/example/reference/commands/table_remove/unremovable_cases_key_type_remove_fail.log    2016-03-17 16:45:46 +0900 (6be7b00)
@@ -11,7 +11,7 @@ Execution example::
   #       [
   #         "is_removable_table", 
   #         "db.c", 
-  #         8480
+  #         8831
   #       ]
   #     ]
   #   ], 

  Modified: doc/source/example/reference/commands/table_remove/unremovable_cases_value_type_remove_fail.log (+1 -1)
===================================================================
--- doc/source/example/reference/commands/table_remove/unremovable_cases_value_type_remove_fail.log    2016-03-17 15:59:06 +0900 (be42716)
+++ doc/source/example/reference/commands/table_remove/unremovable_cases_value_type_remove_fail.log    2016-03-17 16:45:46 +0900 (68c6360)
@@ -11,7 +11,7 @@ Execution example::
   #       [
   #         "is_removable_table", 
   #         "db.c", 
-  #         8500
+  #         8851
   #       ]
   #     ]
   #   ], 

  Modified: doc/source/reference/commands/table_remove.rst (+55 -1)
===================================================================
--- doc/source/reference/commands/table_remove.rst    2016-03-17 15:59:06 +0900 (ed925d7)
+++ doc/source/reference/commands/table_remove.rst    2016-03-17 16:45:46 +0900 (f5cb907)
@@ -18,9 +18,10 @@ removed.
 Syntax
 ------
 
-This command takes only one required parameter::
+This command takes two parameters::
 
   table_remove name
+               [dependent=no]
 
 .. _table-remove-usage:
 
@@ -173,6 +174,35 @@ You need to remove ``Table.reference_column`` before you remove
 .. column_remove Table reference_column
 .. table_remove ReferencedByColumn
 
+If you understand what you'll do, you can also remove tables and
+columns that reference the target table with one ``table_remove``
+command by using ``--dependent yes`` parameter.
+
+``ReferencedTable`` in the following schema is referenced from a table
+and a column:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/table_remove/unremovable_cases_dependent_schema.log
+.. table_create ReferencedTable TABLE_HASH_KEY ShortText
+.. table_create Table1 TABLE_HASH_KEY ReferencedTable
+.. table_create Table2 TABLE_NO_KEY
+.. column_create Table2 reference_column COLUMN_SCALAR ReferencedTable
+
+You can't remove ``ReferencedTable`` by default:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/table_remove/unremovable_cases_dependent_no.log
+.. table_remove ReferencedTable
+
+You can remove ``ReferencedTable``, ``Table1`` and
+``Table2.reference_column`` by using ``--dependent yes``
+parameter. ``Table1`` and ``Table2.reference_column`` reference
+``ReferencedTable``:
+
+.. groonga-command
+.. include:: ../../example/reference/commands/table_remove/unremovable_cases_dependent_yes.log
+.. table_remove ReferencedTable --dependent yes
+
 Decreases used resources
 ^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -226,6 +256,30 @@ Specifies the table name to be removed.
 
 See :ref:`table-remove-usage` how to use this parameter.
 
+Optional parameters
+^^^^^^^^^^^^^^^^^^^
+
+There is only one optional parameter.
+
+.. _table-remove-dependent:
+
+``dependent``
+"""""""""""""
+
+Specifies whether tables and columns that reference the target table
+are also removed or not.
+
+If this value is ``yes``, tables and columns that reference the target
+table are also removed. Otherwise, they aren't removed and an error is
+returned.
+
+In other words, if there are any tables and columns that reference the
+target table, the target table isn't removed by default.
+
+You should use this parameter carefully. This is a danger parameter.
+
+See :ref:`table-remove-unremovable-cases` how to use this parameter.
+
 Return value
 ------------
 
-------------- next part --------------
HTML����������������������������...
Download 



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