Skip to content

Commit

Permalink
doc: document logical_table_remove
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 18, 2016
1 parent 44570df commit 3552c2c
Show file tree
Hide file tree
Showing 17 changed files with 977 additions and 38 deletions.
450 changes: 431 additions & 19 deletions doc/locale/ja/LC_MESSAGES/reference.po

Large diffs are not rendered by default.

@@ -0,0 +1,10 @@
Execution example::

table_create Logs_20160318 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160318 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Logs_20160319 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160319 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,4 @@
Execution example::

logical_shard_list --logical_table Logs
# [[0, 1337566253.89858, 0.000355720520019531], []]
@@ -0,0 +1,18 @@
Execution example::

logical_shard_list --logical_table Logs
# [
# [
# 0,
# 1337566253.89858,
# 0.000355720520019531
# ],
# [
# {
# "name": "Logs_20160318"
# },
# {
# "name": "Logs_20160319"
# }
# ]
# ]
@@ -0,0 +1,6 @@
Execution example::

logical_table_remove \
--logical_table Logs \
--shard_key timestamp
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,23 @@
Execution example::

table_create Logs_20160318 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160318 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Logs_20160318
[
{"timestamp": "2016-03-18 00:30:00"},
{"timestamp": "2016-03-18 01:00:00"},
{"timestamp": "2016-03-18 02:00:00"}
]
# [[0, 1337566253.89858, 0.000355720520019531], 3]
table_create Logs_20160319 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160319 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
load --table Logs_20160319
[
{"timestamp": "2016-03-19 00:30:00"},
{"timestamp": "2016-03-19 01:00:00"}
]
# [[0, 1337566253.89858, 0.000355720520019531], 2]
@@ -0,0 +1,13 @@
Execution example::

dump
# plugin_register sharding
#
# table_create Logs_20160318 TABLE_NO_KEY
# column_create Logs_20160318 timestamp COLUMN_SCALAR Time
#
# load --table Logs_20160318
# [
# ["_id","timestamp"],
# [1,1458228600.0]
# ]
@@ -0,0 +1,10 @@
Execution example::

logical_table_remove \
--logical_table Logs \
--shard_key timestamp \
--min "2016-03-18 01:00:00" \
--min_border "include" \
--max "2016-03-19 01:30:00" \
--max_border "include"
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,10 @@
Execution example::

object_exist Logs_20160320
# [[0, 1337566253.89858, 0.000355720520019531], false]
object_exist Users_20160320
# [[0, 1337566253.89858, 0.000355720520019531], false]
object_exist NotRelated_20160320
# [[0, 1337566253.89858, 0.000355720520019531], true]
object_exist Servers
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,16 @@
Execution example::

table_create NotRelated_20160320 TABLE_PAT_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Users_20160320 TABLE_PAT_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Servers TABLE_PAT_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Logs_20160320 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160320 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160320 user COLUMN_SCALAR Users_20160320
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160320 server COLUMN_SCALAR Servers
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,7 @@
Execution example::

logical_table_remove \
--logical_table Logs \
--shard_key timestamp \
--dependent yes
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,6 @@
Execution example::

object_exist Logs_20160320
# [[0, 1337566253.89858, 0.000355720520019531], false]
object_exist Bookmarks.log_20160320
# [[0, 1337566253.89858, 0.000355720520019531], false]
@@ -0,0 +1,10 @@
Execution example::

table_create Logs_20160320 TABLE_NO_KEY
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Logs_20160320 timestamp COLUMN_SCALAR Time
# [[0, 1337566253.89858, 0.000355720520019531], true]
table_create Bookmarks TABLE_HASH_KEY ShortText
# [[0, 1337566253.89858, 0.000355720520019531], true]
column_create Bookmarks log_20160320 COLUMN_SCALAR Logs_20160320
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,20 @@
Execution example::

logical_table_remove \
--logical_table Logs \
--shard_key timestamp
# [
# [
# -2,
# 1337566253.89858,
# 0.000355720520019531,
# "operation not permitted: <[table][remove] a column that references the table exists: <Bookmarks.log_20160320> -> <Logs_20160320",
# [
# [
# "Groonga::Sharding::LogicalTableRemoveCommand.remove_table",
# "/home/kou/work/c/groonga.clean/plugins/sharding/logical_table_remove.rb",
# 80
# ]
# ]
# ]
# ]
@@ -0,0 +1,7 @@
Execution example::

logical_table_remove \
--logical_table Logs \
--shard_key timestamp \
--dependent yes
# [[0, 1337566253.89858, 0.000355720520019531], true]
@@ -0,0 +1,4 @@
Execution example::

register sharding
# [[0, 1337566253.89858, 0.000355720520019531], true]

0 comments on commit 3552c2c

Please sign in to comment.