[Groonga-commit] groonga/groonga at 7402105 [master] doc select: add explanations of "--load_table", "--load-columns", and "--load-values"

アーカイブの一覧に戻る
Yasuhiro Horimoto null+****@clear*****
Thu Mar 14 11:10:24 JST 2019


Yasuhiro Horimoto	2019-03-14 11:10:24 +0900 (Thu, 14 Mar 2019)

  Revision: 7402105cb3058ef6da558d2004ba2da40e905066
  https://github.com/groonga/groonga/commit/7402105cb3058ef6da558d2004ba2da40e905066

  Message:
    doc select: add explanations of "--load_table", "--load-columns", and "--load-values"

  Added files:
    doc/source/example/reference/commands/select/load_table.log
  Modified files:
    doc/files.am
    doc/locale/ja/LC_MESSAGES/reference.po
    doc/source/reference/commands/select.rst

  Modified: doc/files.am (+2 -0)
===================================================================
--- doc/files.am    2019-03-13 12:05:31 +0900 (9b7f81cb4)
+++ doc/files.am    2019-03-14 11:10:24 +0900 (74e607ba5)
@@ -289,6 +289,7 @@ absolute_source_files = \
 	$(top_srcdir)/doc/source/example/reference/commands/select/filter_less_than.log \
 	$(top_srcdir)/doc/source/example/reference/commands/select/limit_negative.log \
 	$(top_srcdir)/doc/source/example/reference/commands/select/limit_simple.log \
+	$(top_srcdir)/doc/source/example/reference/commands/select/load_table.log \
 	$(top_srcdir)/doc/source/example/reference/commands/select/match_columns_simple.log \
 	$(top_srcdir)/doc/source/example/reference/commands/select/match_columns_some_columns.log \
 	$(top_srcdir)/doc/source/example/reference/commands/select/match_columns_weight.log \
@@ -1344,6 +1345,7 @@ source_files_relative_from_doc_dir = \
 	source/example/reference/commands/select/filter_less_than.log \
 	source/example/reference/commands/select/limit_negative.log \
 	source/example/reference/commands/select/limit_simple.log \
+	source/example/reference/commands/select/load_table.log \
 	source/example/reference/commands/select/match_columns_simple.log \
 	source/example/reference/commands/select/match_columns_some_columns.log \
 	source/example/reference/commands/select/match_columns_weight.log \

  Modified: doc/locale/ja/LC_MESSAGES/reference.po (+55 -0)
===================================================================
--- doc/locale/ja/LC_MESSAGES/reference.po    2019-03-13 12:05:31 +0900 (e38797eb5)
+++ doc/locale/ja/LC_MESSAGES/reference.po    2019-03-14 11:10:24 +0900 (79d6f8614)
@@ -12713,6 +12713,61 @@ msgstr ""
 "他の演算子は :doc:`/reference/grn_expr/script_syntax` を参照してください。"
 
 msgid ""
+"You can store specified a table a result of ``select`` with ``--"
+"load_table``, ``--load-columns`` and ``--load_values`` arguments. ``--"
+"load_table`` specifies a table name for storing a result of ``select``."
+msgstr ""
+"``--load_table`` 、 ``--load_columns`` 、 ``--load_values`` を使って、"
+"``select`` の結果を指定したテーブルに格納できます。 ``--load_table`` は、"
+"``select`` の結果を格納するテーブルの名前を指定します。"
+
+msgid ""
+"This argument must use with :ref:`select-load-columns` and :ref:`select-load-"
+"values`."
+msgstr ""
+"この引数は、 :ref:`select-load-columns` と :ref:`select-load-values` と一緒に"
+"使う必要があります。"
+
+msgid ""
+"Here is an example that can store ``_id`` and ``timestamp`` that a result of "
+"``select`` in a Logs table specified by ``--load_table``."
+msgstr ""
+"以下は、 ``--load_table`` で指定したLogsテーブルに ``select`` の結果である "
+"``_id`` と ``timestamp`` を格納する例です。"
+
+msgid ""
+"Specifies columns of a table that specifying ``--load-table``. Stores value "
+"of columns that specified with :ref:`select-load-values` in columns that "
+"specified with this argument. You must specify columns that already exists."
+msgstr ""
+"``--load_table`` で指定したテーブルのカラムを指定します。:ref:`select-load-"
+"values` で指定したカラムの値をこの引数で指定したカラムに格納します。既に存在"
+"するカラムを指定する必要があります。"
+
+msgid ""
+"This argument must use with :ref:`select-load-table` and :ref:`select-load-"
+"values`."
+msgstr ""
+"この引数は、 :ref:`select-load-table` と :ref:`select-load-values` と一緒に使"
+"う必要があります。"
+
+msgid ""
+"Specifies columns of result of ``select``. Specifies columns for storing "
+"values into columns that specified with :ref:`select-load-columns`. You must "
+"specify columns that already exists."
+msgstr ""
+"``select`` の結果のカラムを指定します。 :ref:`select-load-columns` で指定した"
+"カラムに値を格納するカラムを指定します。既に存在するカラムを指定する必要があ"
+"ります。"
+
+msgid ""
+"This argument must use with :ref:`select-load-table` and :ref:`select-load-"
+"columns`."
+msgstr ""
+"この引数は、 :ref:`select-load-table` と :ref:`select-load-columns` と一緒に"
+"使う必要があります。"
+
+msgid ""
 "Specifies threshold to determine whether search storategy escalation is used "
 "or not. The threshold is compared against the number of matched records. If "
 "the number of matched records is equal to or less than the threshold, the "

  Added: doc/source/example/reference/commands/select/load_table.log (+108 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/example/reference/commands/select/load_table.log    2019-03-14 11:10:24 +0900 (91d1b5339)
@@ -0,0 +1,108 @@
+Execution example::
+
+  table_create Logs_20150203 TABLE_HASH_KEY ShortText
+  column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+
+  table_create Logs TABLE_HASH_KEY ShortText
+  column_create Logs original_id COLUMN_SCALAR UInt32
+  column_create Logs timestamp_text COLUMN_SCALAR ShortText
+
+  load --table Logs_20150203
+  [
+  {
+    "_key": "2015-02-03:1",
+    "timestamp": "2015-02-03 10:49:00"
+  },
+  {
+    "_key": "2015-02-03:2",
+    "timestamp": "2015-02-03 12:49:00"
+  }
+  ]
+  select \
+    --table Logs_20150203 \
+    --load_table Logs \
+    --load_columns "original_id, timestamp_text" \
+    --load_values "_id, timestamp"
+  # [
+  #   [
+  #     0,
+  #     0.0,
+  #     0.0
+  #   ],
+  #   [
+  #     [
+  #       [
+  #         2
+  #       ],
+  #       [
+  #         [
+  #           "_id",
+  #           "UInt32"
+  #         ],
+  #         [
+  #           "_key",
+  #           "ShortText"
+  #         ],
+  #         [
+  #           "timestamp",
+  #           "Time"
+  #         ]
+  #       ],
+  #       [
+  #         1,
+  #         "2015-02-03:1",
+  #         1422928140.0
+  #       ],
+  #       [
+  #         2,
+  #         "2015-02-03:2",
+  #         1422935340.0
+  #       ]
+  #     ]
+  #   ]
+  # ]
+  select --table Logs
+  # [
+  #   [
+  #     0,
+  #     0.0,
+  #     0.0
+  #   ],
+  #   [
+  #     [
+  #       [
+  #         2
+  #       ],
+  #       [
+  #         [
+  #           "_id",
+  #           "UInt32"
+  #         ],
+  #         [
+  #           "_key",
+  #           "ShortText"
+  #         ],
+  #         [
+  #           "original_id",
+  #           "UInt32"
+  #         ],
+  #         [
+  #           "timestamp_text",
+  #           "ShortText"
+  #         ]
+  #       ],
+  #       [
+  #         1,
+  #         "2015-02-03:1",
+  #         1,
+  #         "1422928140000000"
+  #       ],
+  #       [
+  #         2,
+  #         "2015-02-03:2",
+  #         2,
+  #         "1422935340000000"
+  #       ]
+  #     ]
+  #   ]
+  # ]

  Modified: doc/source/reference/commands/select.rst (+76 -0)
===================================================================
--- doc/source/reference/commands/select.rst    2019-03-13 12:05:31 +0900 (edd1e6d7d)
+++ doc/source/reference/commands/select.rst    2019-03-14 11:10:24 +0900 (1396ac230)
@@ -51,6 +51,9 @@ optional::
          [sort_keys=null]
          [drilldown_sort_keys=null]
          [match_escalation=auto]
+         [load_table=null]
+         [load_columns=null]
+         [load_values=null]
 
 This command has the following named parameters for dynamic columns:
 
@@ -677,6 +680,79 @@ is less than ``11`` from ``Entries`` table.
 
 See :doc:`/reference/grn_expr/script_syntax` for other operators.
 
+.. _select-load-table:
+
+``load_table``
+""""""""""""""
+
+.. versionadded:: 9.0.1
+
+You can store specified a table a result of ``select`` with ``--load_table``, ``--load-columns`` and ``--load_values`` arguments.
+``--load_table`` specifies a table name for storing a result of ``select``.
+
+You must specify a table that already exists.
+
+This argument must use with :ref:`select-load-columns` and :ref:`select-load-values`.
+
+Here is an example that can store ``_id`` and ``timestamp`` that a result of ``select`` in a Logs table specified by ``--load_table``.
+
+.. groonga-command
+.. include:: ../../example/reference/commands/select/load_table.log
+.. table_create Logs_20150203 TABLE_HASH_KEY ShortText
+.. column_create Logs_20150203 timestamp COLUMN_SCALAR Time
+..
+.. table_create Logs TABLE_HASH_KEY ShortText
+.. column_create Logs original_id COLUMN_SCALAR UInt32
+.. column_create Logs timestamp_text COLUMN_SCALAR ShortText
+..
+.. load --table Logs_20150203
+.. [
+.. {
+..   "_key": "2015-02-03:1",
+..   "timestamp": "2015-02-03 10:49:00"
+.. },
+.. {
+..   "_key": "2015-02-03:2",
+..   "timestamp": "2015-02-03 12:49:00"
+.. }
+.. ]
+.. select \
+..   --table Logs_20150203 \
+..   --load_table Logs \
+..   --load_columns "original_id, timestamp_text" \
+..   --load_values "_id, timestamp"
+.. select --table Logs
+
+.. _select-load-columns:
+
+``load_columns``
+""""""""""""""""
+
+.. versionadded:: 9.0.1
+
+Specifies columns of a table that specifying ``--load-table``.
+Stores value of columns that specified with :ref:`select-load-values` in columns that specified with this argument.
+You must specify columns that already exists.
+
+This argument must use with :ref:`select-load-table` and :ref:`select-load-values`.
+
+See example of ``--load_table`` for how to use this argument.
+
+.. _select-load-values:
+
+``load_values``
+"""""""""""""""
+
+.. versionadded:: 9.0.1
+
+Specifies columns of result of ``select``.
+Specifies columns for storing values into columns that specified with :ref:`select-load-columns`.
+You must specify columns that already exists.
+
+This argument must use with :ref:`select-load-table` and :ref:`select-load-columns`.
+
+See example of ``--load_table`` for how to use this argument.
+
 .. _select-advanced-search-parameters:
 
 Advanced search parameters
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190314/1ebf01cd/attachment-0001.html>


More information about the Groonga-commit mailing list
アーカイブの一覧に戻る