[Groonga-commit] groonga/groonga at 2d1d49e [master] doc truncate: update examples

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Dec 28 23:06:18 JST 2014


Kouhei Sutou	2014-12-28 23:06:18 +0900 (Sun, 28 Dec 2014)

  New Revision: 2d1d49e8ad40dc00f7bc900e156fa32518fd9050
  https://github.com/groonga/groonga/commit/2d1d49e8ad40dc00f7bc900e156fa32518fd9050

  Message:
    doc truncate: update examples

  Copied files:
    doc/source/example/reference/commands/truncate/truncate_column.log
      (from doc/source/example/reference/commands/truncate/truncate-table.log)
  Modified files:
    doc/source/reference/commands/truncate.rst
  Renamed files:
    doc/source/example/reference/commands/truncate/truncate_table.log
      (from doc/source/example/reference/commands/truncate/truncate-table.log)

  Copied: doc/source/example/reference/commands/truncate/truncate_column.log (+33 -5) 66%
===================================================================
--- doc/source/example/reference/commands/truncate/truncate-table.log    2014-12-28 23:03:40 +0900 (f37c08c)
+++ doc/source/example/reference/commands/truncate/truncate_column.log    2014-12-28 23:06:18 +0900 (c354963)
@@ -2,6 +2,8 @@ Execution example::
 
   table_create Users TABLE_PAT_KEY ShortText
   # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Users score COLUMN_SCALAR Int32
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
   load --table Users
   [
   {"_key": "Alice",  "score": 2},
@@ -29,24 +31,31 @@ Execution example::
   #         [
   #           "_key", 
   #           "ShortText"
+  #         ], 
+  #         [
+  #           "score", 
+  #           "Int32"
   #         ]
   #       ], 
   #       [
   #         1, 
-  #         "Alice"
+  #         "Alice", 
+  #         2
   #       ], 
   #       [
   #         2, 
-  #         "Bob"
+  #         "Bob", 
+  #         0
   #       ], 
   #       [
   #         3, 
-  #         "Carlos"
+  #         "Carlos", 
+  #         -1
   #       ]
   #     ]
   #   ]
   # ]
-  truncate Users
+  truncate Users.score
   # [[0, 1337566253.89858, 0.000355720520019531], true]
   select Users
   # [
@@ -58,7 +67,7 @@ Execution example::
   #   [
   #     [
   #       [
-  #         0
+  #         3
   #       ], 
   #       [
   #         [
@@ -68,7 +77,26 @@ Execution example::
   #         [
   #           "_key", 
   #           "ShortText"
+  #         ], 
+  #         [
+  #           "score", 
+  #           "Int32"
   #         ]
+  #       ], 
+  #       [
+  #         1, 
+  #         "Alice", 
+  #         0
+  #       ], 
+  #       [
+  #         2, 
+  #         "Bob", 
+  #         0
+  #       ], 
+  #       [
+  #         3, 
+  #         "Carlos", 
+  #         0
   #       ]
   #     ]
   #   ]

  Renamed: doc/source/example/reference/commands/truncate/truncate_table.log (+16 -3) 77%
===================================================================
--- doc/source/example/reference/commands/truncate/truncate-table.log    2014-12-28 23:03:40 +0900 (f37c08c)
+++ doc/source/example/reference/commands/truncate/truncate_table.log    2014-12-28 23:06:18 +0900 (d4034e5)
@@ -2,6 +2,8 @@ Execution example::
 
   table_create Users TABLE_PAT_KEY ShortText
   # [[0, 1337566253.89858, 0.000355720520019531], true]
+  column_create Users score COLUMN_SCALAR Int32
+  # [[0, 1337566253.89858, 0.000355720520019531], true]
   load --table Users
   [
   {"_key": "Alice",  "score": 2},
@@ -29,19 +31,26 @@ Execution example::
   #         [
   #           "_key", 
   #           "ShortText"
+  #         ], 
+  #         [
+  #           "score", 
+  #           "Int32"
   #         ]
   #       ], 
   #       [
   #         1, 
-  #         "Alice"
+  #         "Alice", 
+  #         2
   #       ], 
   #       [
   #         2, 
-  #         "Bob"
+  #         "Bob", 
+  #         0
   #       ], 
   #       [
   #         3, 
-  #         "Carlos"
+  #         "Carlos", 
+  #         -1
   #       ]
   #     ]
   #   ]
@@ -68,6 +77,10 @@ Execution example::
   #         [
   #           "_key", 
   #           "ShortText"
+  #         ], 
+  #         [
+  #           "score", 
+  #           "Int32"
   #         ]
   #       ]
   #     ]

  Modified: doc/source/reference/commands/truncate.rst (+6 -5)
===================================================================
--- doc/source/reference/commands/truncate.rst    2014-12-28 23:03:40 +0900 (b453ff7)
+++ doc/source/reference/commands/truncate.rst    2014-12-28 23:06:18 +0900 (8c8a142)
@@ -2,9 +2,6 @@
 
 .. highlightlang:: none
 
-.. groonga-command
-.. database: commands_truncate
-
 ``truncate``
 ============
 
@@ -32,8 +29,10 @@ Usage
 Here is a simple example of ``truncate`` command against a table.
 
 .. groonga-command
-.. include:: ../../example/reference/commands/truncate/truncate-table.log
+.. database: commands_truncate_table
+.. include:: ../../example/reference/commands/truncate/truncate_table.log
 .. table_create Users TABLE_PAT_KEY ShortText
+.. column_create Users score COLUMN_SCALAR Int32
 .. load --table Users
 .. [
 .. {"_key": "Alice",  "score": 2},
@@ -47,8 +46,10 @@ Here is a simple example of ``truncate`` command against a table.
 Here is a simple example of ``truncate`` command against a column.
 
 .. groonga-command
-.. include:: ../../example/reference/commands/truncate/truncate-column.log
+.. database: commands_truncate_column
+.. include:: ../../example/reference/commands/truncate/truncate_column.log
 .. table_create Users TABLE_PAT_KEY ShortText
+.. column_create Users score COLUMN_SCALAR Int32
 .. load --table Users
 .. [
 .. {"_key": "Alice",  "score": 2},
-------------- next part --------------
HTML����������������������������...
다운로드 



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