You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/12/04 02:20:10 UTC

[shardingsphere] branch master updated: Update docs for Show Sharding Table reference rule (#22623)

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

zhangliang 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 61a73de487b Update docs for Show Sharding Table reference rule (#22623)
61a73de487b is described below

commit 61a73de487b0d323da29221cf3d5bafa271376c2
Author: Zichao <57...@users.noreply.github.com>
AuthorDate: Sun Dec 4 15:20:03 2022 +1300

    Update docs for Show Sharding Table reference rule (#22623)
    
    * Update docs for Show Sharding Table reference rule
    
    * Revert "Update docs for Show Sharding Table reference rule"
    
    This reverts commit 65dcb4f58c847da1cc1270053311ece395e87c53.
    
    * Update docs for Show Sharding Table reference rule
---
 .../show-sharding-table-reference-rules.cn.md      | 37 ++++++++++++----------
 .../show-sharding-table-reference-rules.en.md      | 37 ++++++++++++----------
 .../distsql/syntax/rql/rule-query/sharding.cn.md   | 19 +++++------
 .../distsql/syntax/rql/rule-query/sharding.en.md   | 19 +++++------
 4 files changed, 60 insertions(+), 52 deletions(-)

diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
index e4effb49724..43672e1c8cc 100644
--- a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
@@ -24,13 +24,14 @@ databaseName ::=
 
 ### 返回值说明
 
-| 列                       | 说明         |
-| -------------------------| -------------|
-| sharding_table_reference | 关联表名称    |
+| 列                       | 说明             |
+| -------------------------| ----------------|
+| name                     | 分片表关联规则名称 |
+| sharding_table_reference | 分片表关联关系    |
 
 ### 示例
 
-- 查询指定逻辑库中具有关联关系的分片表
+- 查询指定逻辑库中的分片表关联规则
 
 ```sql
 SHOW SHARDING TABLE REFERENCE RULES FROM test1;
@@ -38,15 +39,16 @@ SHOW SHARDING TABLE REFERENCE RULES FROM test1;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES FROM test1;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-+--------------------------+
-1 row in set (0.00 sec)
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
+2 rows in set (0.00 sec)
 ```
 
-- 查询当前逻辑库中具有绑定关系的分片表
+- 查询当前逻辑库中的分片表关联规则
 
 ```sql
 SHOW SHARDING TABLE REFERENCE RULES;
@@ -54,12 +56,13 @@ SHOW SHARDING TABLE REFERENCE RULES;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-+--------------------------+
-1 row in set (0.00 sec)
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
+2 rows in set (0.00 sec)
 ```
 
 ### 保留字
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
index d3ae5d46a72..c765cd3fb25 100644
--- a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
@@ -23,13 +23,14 @@ databaseName ::=
 
 ### Return value description
 
-| Columns                 | Descriptions                  |
-| ------------------------| ------------------------------|
-| sharding_table_reference| sharding reference table list |
+| Columns                 | Descriptions                       |
+| ------------------------|------------------------------------|
+| name                    | Sharding table reference rule name |
+| sharding_table_reference| sharding table reference           |
 
 ### Example
 
-- Query sharding tables with reference relationships for the spicified logical database
+- Query sharding table reference rules for the specified logical database
 
 ```sql
 SHOW SHARDING TABLE REFERENCE RULES FROM test1;
@@ -37,15 +38,16 @@ SHOW SHARDING TABLE REFERENCE RULES FROM test1;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES FROM test1;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-+--------------------------+
-1 row in set (0.00 sec)
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
+2 rows in set (0.00 sec)
 ```
 
-- Query sharding tables with reference relationships for the current logical database
+- Query sharding table reference rules for the current logical database
 
 ```sql
 SHOW SHARDING TABLE REFERENCE RULES;
@@ -53,12 +55,13 @@ SHOW SHARDING TABLE REFERENCE RULES;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-+--------------------------+
-1 row in set (0.00 sec)
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
+2 rows in set (0.00 sec)
 ```
 
 ### Reserved word
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.cn.md
index 34ca69af742..9421d1e93d3 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.cn.md
@@ -140,9 +140,10 @@ SHOW BROADCAST TABLE RULES [FROM databaseName]
 
 ### Sharding Table Reference Rule
 
-| 列                       | 说明      |
-|--------------------------|---------- |
-| sharding_table_reference | 表关联关系 |
+| 列                       | 说明             |
+|--------------------------|---------------  |
+| name                     | 分片表关联规则名称 |
+| sharding_table_reference | 分片表关联关系    |
 
 ### Broadcast Table Rule
 
@@ -307,12 +308,12 @@ mysql> SHOW SHARDING TABLE NODES;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-| t1,t2                    |
-+--------------------------+
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
 2 rows in set (0.00 sec)
 ```
 
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.en.md
index e1dba88bb8f..1c85c9e9539 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/sharding.en.md
@@ -140,9 +140,10 @@ SHOW BROADCAST TABLE RULES [FROM databaseName]
 
 ### Sharding Table Reference Rule
 
-| Column                   | Description              | 
-| ------------------------ |--------------------------|
-| sharding_table_reference | Sharding table reference |
+| Column                   | Description                        | 
+| ------------------------ |------------------------------------|
+| name                     | Sharding table reference rule name |
+| sharding_table_reference | Sharding table reference           |
 
 ### Broadcast Table Rule
 
@@ -307,12 +308,12 @@ mysql> SHOW SHARDING TABLE NODES;
 
 ```sql
 mysql> SHOW SHARDING TABLE REFERENCE RULES;
-+--------------------------+
-| sharding_table_reference |
-+--------------------------+
-| t_order,t_order_item     |
-| t1,t2                    |
-+--------------------------+
++-------+--------------------------+
+| name  | sharding_table_reference |
++-------+--------------------------+
+| ref_0 | t_a,t_b                  |
+| ref_1 | t_c,t_d                  |
++-------+--------------------------+
 2 rows in set (0.00 sec)
 ```