You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/02/15 08:39:45 UTC

[shardingsphere] branch master updated: Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document (#24174)

This is an automated email from the ASF dual-hosted git repository.

jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 55c07ec00c5 Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document (#24174)
55c07ec00c5 is described below

commit 55c07ec00c5d2486de8de3c75fc287357ef82752
Author: Zichao <57...@users.noreply.github.com>
AuthorDate: Wed Feb 15 16:39:37 2023 +0800

    Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document (#24174)
    
    * Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document
    
    * Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document
    
    * Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document
    
    * Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document
    
    * Update DistSQL `SHOW SHARDING TABLE REFERENCE RULE` document
---
 .../db-discovery/show-db-discovery-rule.en.md      |  4 +-
 .../show-readwrite-splitting-rule.en.md            |  4 +-
 .../sharding/show-sharding-algorithms.cn.md        |  4 +-
 .../sharding/show-sharding-algorithms.en.md        |  4 +-
 .../show-sharding-table-reference-rules.cn.md      | 43 ++++++++++++++++++++--
 .../show-sharding-table-reference-rules.en.md      | 43 ++++++++++++++++++++--
 .../sharding/show-sharding-table-rule.cn.md        |  2 +-
 .../sharding/show-sharding-table-rule.en.md        |  2 +-
 8 files changed, 88 insertions(+), 18 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/db-discovery/show-db-discovery-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/db-discovery/show-db-discovery-rule.en.md
index e791c19434f..ac28528e912 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/db-discovery/show-db-discovery-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/db-discovery/show-db-discovery-rule.en.md
@@ -78,7 +78,7 @@ mysql> SHOW DB_DISCOVERY RULES;
 1 row in set (0.03 sec)
 ```
 
-- Query specified database discovery rules for specified database.
+- Query specified database discovery rule for specified database.
 
 ```sql
 SHOW DB_DISCOVERY RULE group_0 FROM discovery_db;
@@ -95,7 +95,7 @@ mysql> SHOW DB_DISCOVERY RULE group_0 FROM discovery_db;
 
 ```
 
-- Query specified database discovery rules for current database.
+- Query specified database discovery rule for current database.
 
 ```sql
 SHOW DB_DISCOVERY RULE group_0;
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting/show-readwrite-splitting-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting/show-readwrite-splitting-rule.en.md
index cb8a058c8e5..cdd02ddd64a 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting/show-readwrite-splitting-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting/show-readwrite-splitting-rule.en.md
@@ -78,7 +78,7 @@ mysql> SHOW READWRITE_SPLITTING RULES;
 1 row in set (0.01 sec)
 ```
 
-- Query specified readwrite splitting rules for specified database.
+- Query specified readwrite splitting rule for specified database.
 
 ```sql
 SHOW READWRITE_SPLITTING RULE ms_group_0 FROM readwrite_splitting_db;
@@ -94,7 +94,7 @@ mysql> SHOW READWRITE_SPLITTING RULE ms_group_0 FROM readwrite_splitting_db;
 1 row in set (0.01 sec)
 ```
 
-- Query specified readwrite splitting rules for current database.
+- Query specified readwrite splitting rule for current database.
 
 ```sql
 SHOW READWRITE_SPLITTING RULE ms_group_0;
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.cn.md
index 0a48eebc929..cd073d1105e 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.cn.md
@@ -52,7 +52,7 @@ mysql> SHOW SHARDING ALGORITHMS FROM sharding_db;
 | t_order_inline          | INLINE | algorithm-expression=t_order_${order_id % 2}        |
 | t_order_item_inline     | INLINE | algorithm-expression=t_order_item_${order_id % 2}   |
 +-------------------------+--------+-----------------------------------------------------+
-2 row in set (0.01 sec)
+2 rows in set (0.01 sec)
 ```
 
 - 查询当前逻辑库的分片算法
@@ -69,7 +69,7 @@ mysql> SHOW SHARDING ALGORITHMS;
 | t_order_inline          | INLINE | algorithm-expression=t_order_${order_id % 2}        |
 | t_order_item_inline     | INLINE | algorithm-expression=t_order_item_${order_id % 2}   |
 +-------------------------+--------+-----------------------------------------------------+
-2 row in set (0.01 sec)
+2 rows in set (0.01 sec)
 ```
 
 ### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.en.md
index 850378d5a95..bc00c588b2b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-algorithms.en.md
@@ -52,7 +52,7 @@ mysql> SHOW SHARDING ALGORITHMS FROM sharding_db;
 | t_order_inline          | INLINE | algorithm-expression=t_order_${order_id % 2}        |
 | t_order_item_inline     | INLINE | algorithm-expression=t_order_item_${order_id % 2}   |
 +-------------------------+--------+-----------------------------------------------------+
-2 row in set (0.01 sec)
+2 rows in set (0.01 sec)
 ```
 
 - Query the sharding table algorithms of the current logical database
@@ -69,7 +69,7 @@ mysql> SHOW SHARDING ALGORITHMS;
 | t_order_inline          | INLINE | algorithm-expression=t_order_${order_id % 2}        |
 | t_order_item_inline     | INLINE | algorithm-expression=t_order_item_${order_id % 2}   |
 +-------------------------+--------+-----------------------------------------------------+
-2 row in set (0.01 sec)
+2 rows in set (0.01 sec)
 ```
 
 ### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
index 347286b8d27..24c63277106 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
@@ -1,12 +1,12 @@
 +++
-title = "SHOW SHARDING TABLE REGERENCE RULES"
+title = "SHOW SHARDING TABLE REFERENCE RULE"
 weight = 14
 
 +++
 
 ### 描述
 
-`SHOW SHARDING BINDING TABLE RULES` 语法用于查询指定逻辑库中具有关联关系的分片表
+`SHOW SHARDING BINDING TABLE RULE` 语法用于查询指定逻辑库中指定分片表关联规则
 
 ### 语法
 
@@ -14,7 +14,10 @@ weight = 14
 {{% tab name="语法" %}}
 ```sql
 ShowShardingBindingTableRules::=
-  'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' 'RULES' ('FROM' databaseName)?
+  'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' ('RULE' ruleName | 'RULES') ('FROM' databaseName)?
+
+ruleName ::=
+    identifier
 
 databaseName ::=
   identifier
@@ -72,9 +75,41 @@ mysql> SHOW SHARDING TABLE REFERENCE RULES;
 2 rows in set (0.00 sec)
 ```
 
+- 查询指定逻辑库中的指定分片表关联规则
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULE ref_0 FROM sharding_db;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULE ref_0 FROM sharding_db;
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
++-------+--------------------------+
+1 row in set (0.00 sec)
+```
+
+- 查询当前逻辑库中的分片表关联规则
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULE ref_0;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULE ref_0;
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
++-------+--------------------------+
+1 row in set (0.00 sec)
+```
+
 ### 保留字
 
-`SHOW`、`SHARDING`、`BINDING`、`TABLE`、`RULES`、`FROM`
+`SHOW`、`SHARDING`、`TABLE`、`REFERENCE`、`RULE`、`RULES`、`FROM`
 
 ### 相关链接
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
index b9a627fe065..ea40d437ecb 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
@@ -1,11 +1,11 @@
 +++
-title = "SHOW SHARDING TABLE REFERENCE RULES"
+title = "SHOW SHARDING TABLE REFERENCE RULE"
 weight = 14
 +++
 
 ### Description
 
-`SHOW SHARDING TABLE REFERENCE RULES` syntax is used to query sharding tables with reference relationships in the specified logical database.
+`SHOW SHARDING TABLE REFERENCE RULE` syntax is used to query specified sharding table reference rule in the specified logical database.
 
 ### Syntax
 
@@ -13,7 +13,10 @@ weight = 14
 {{% tab name="Grammar" %}}
 ```sql
 ShowShardingBindingTableRules::=
-  'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' 'RULES' ('FROM' databaseName)?
+  'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' ('RULE' ruleName | 'RULES') ('FROM' databaseName)?
+
+ruleName ::=
+    identifier
 
 databaseName ::=
   identifier
@@ -71,9 +74,41 @@ mysql> SHOW SHARDING TABLE REFERENCE RULES;
 2 rows in set (0.00 sec)
 ```
 
+- Query specified sharding table reference rule for the specified logical database
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULE ref_0 FROM sharding_db;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULE FROM sharding_db;
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
++-------+--------------------------+
+1 row in set (0.00 sec)
+```
+
+- Query specified sharding table reference rule for the current logical database
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULE ref_0;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULE ref_0;
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
++-------+--------------------------+
+1 row in set (0.00 sec)
+```
+
 ### Reserved word
 
-`SHOW`, `SHARDING`, `TABLE`, `REFERENCE`, `RULES`, `FROM`
+`SHOW`, `SHARDING`, `TABLE`, `REFERENCE`, `RULE`, `RULES`, `FROM`
 
 ### Related links
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
index 10fd2cc7161..fe4f8442f78 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.cn.md
@@ -90,7 +90,7 @@ SHOW SHARDING TABLE RULE t_order;
 +--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
 | t_order      |                   | ds_0,ds_1           |                        |                          |                                  |                                   | mod                 | order_id              | mod                           | sharding-count=4               |                     |                    |                     |
 +--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-1 rows in set (0.12 sec)
+1 row in set (0.12 sec)
 ```
 
 ### 保留字
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
index aa1e2a4d3d0..750c2f13993 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rule.en.md
@@ -95,7 +95,7 @@ SHOW SHARDING TABLE RULE t_order;
 +--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
 | t_order      |                   | ds_0,ds_1           |                        |                          |                                  |                                   | mod                 | order_id              | mod                           | sharding-count=4               |                     |                    |                     |
 +--------------+-------------------+---------------------+------------------------+--------------------------+----------------------------------+-----------------------------------+---------------------+-----------------------+-------------------------------+--------------------------------+---------------------+--------------------+---------------------+
-1 rows in set (0.12 sec)
+1 row in set (0.12 sec)
 ```
 
 ### Reserved word