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 2022/10/20 11:20:30 UTC

[shardingsphere] branch master updated: Update RQL documents (#21655)

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 668c26c92c4 Update RQL documents (#21655)
668c26c92c4 is described below

commit 668c26c92c459c29374b0302d56169f8e92c5ef6
Author: Zichao <57...@users.noreply.github.com>
AuthorDate: Fri Oct 21 00:20:22 2022 +1300

    Update RQL documents (#21655)
    
    * Update RQL documents
    
    * Update RQL documents
---
 .../show-sharding-table-rules-used algorithm.cn.md | 75 ++++++++++++++++++++++
 .../show-sharding-table-rules-used algorithm.en.md | 75 ++++++++++++++++++++++
 .../show-sharding-table-rules-used-auditor.cn.md   | 75 ++++++++++++++++++++++
 .../show-sharding-table-rules-used-auditor.en.md   | 75 ++++++++++++++++++++++
 ...w-sharding-table-rules-used-key-generator.cn.md | 75 ++++++++++++++++++++++
 ...w-sharding-table-rules-used-key-generator.en.md | 75 ++++++++++++++++++++++
 6 files changed, 450 insertions(+)

diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.cn.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.cn.md
new file mode 100644
index 00000000000..4d00284876e
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.cn.md	
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE RULES USED ALGORITHM"
+weight = 11
++++
+
+### 描述
+
+`SHOW SHARDING TABLE RULES USED ALGORITHM` 语法用于查询指定逻辑库中使用指定分片算法的分片规则。
+
+### 语法
+
+```
+ShowShardingTableRulesUsedAlgorithm::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'ALGORITHM' algorithmName ('FROM' databaseName)?
+
+algorithmName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### 补充说明
+
+- 未指定 `databaseName` 时,默认是当前使用的 `DATABASE`。 如果也未使用 `DATABASE` 则会提示 `No database selected`。
+
+### 返回值说明
+
+| 列     | 说明          |
+| ------| --------------|
+| type  | 分片规则类型    |
+| name  | 分片规则名称    |
+
+### 示例
+
+- 查询指定逻辑库中使用指定分片算法的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.00 sec)
+```
+
+- 查询当前逻辑库中使用指定分片算法的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.01 sec)
+```
+
+### 保留字
+
+`SHOW`、`SHARDING`、`TABLE`、`RULES`、`USED`、`ALGORITHM`、`FROM`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.en.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.en.md
new file mode 100644
index 00000000000..84ceb5364e4
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.en.md	
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE NODES"
+weight = 11
+
++++
+
+### Description
+
+`SHOW SHARDING TABLE RULES USED ALGORITHM` syntax is used to query sharding rules used specified sharding algorithm in specified logical database
+
+### Syntax
+
+```
+ShowShardingTableRulesUsedAlgorithm::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'ALGORITHM' algorithmName ('FROM' databaseName)?
+
+algorithmName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### Supplement
+
+- When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.
+
+### Return value description
+
+| Columns     | Descriptions       |
+| ------------| -------------------|
+| type        | Sharding rule type |
+| name        | Sharding rule name |
+
+### Example
+
+- Query sharding table rules for the specified sharding algorithm in spicified logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline FROM test1;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.00 sec)
+```
+
+- Query sharding table rules for specified sharding algorithm in the current logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED ALGORITHM table_inline;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.01 sec)
+```
+
+### Reserved word
+
+`SHOW`、`SHARDING`、`TABLE`、`RULES`、`USED`、`ALGORITHM`、`FROM`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.cn.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.cn.md
new file mode 100644
index 00000000000..ca93851ff6d
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.cn.md
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE RULES USED AUDITOR"
+weight = 13
++++
+
+### 描述
+
+`SHOW SHARDING TABLE RULES USED AUDITOR` 语法用于查询指定逻辑库中使用指定分片审计器的分片规则。
+
+### 语法
+
+```
+ShowShardingTableRulesUsedAuditor::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'AUDITOR' AuditortorName ('FROM' databaseName)?
+
+AuditortorName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### 补充说明
+
+- 未指定 `databaseName` 时,默认是当前使用的 `DATABASE`。 如果也未使用 `DATABASE` 则会提示 `No database selected`。
+
+### 返回值说明
+
+| 列     | 说明          |
+| ------| --------------|
+| type  | 分片规则类型    |
+| name  | 分片规则名称    |
+
+### 示例
+
+- 查询指定逻辑库中使用指定分片审计器的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor FROM sharding_db;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor FROM sharding_db;
++-------+---------+
+| type  | name    |
++-------+---------+
+| table | t_order |
++-------+---------+
+1 row in set (0.00 sec)
+```
+
+- 查询当前逻辑库中使用指定分片审计器的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor;
++-------+---------+
+| type  | name    |
++-------+---------+
+| table | t_order |
++-------+---------+
+1 row in set (0.00 sec)
+```
+
+### 保留字
+
+`SHOW`、`SHARDING`、`TABLE`、`RULES`、`USED`、`AUDITOR`、`FROM`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.en.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.en.md
new file mode 100644
index 00000000000..6c2fae149c8
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.en.md
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE RULES USED AUDITOR"
+weight = 13
+
++++
+
+### Description
+
+`SHOW SHARDING TABLE RULES USED ALGORITHM` syntax is used to query sharding rules used specified sharding auditor in specified logical database
+
+### Syntax
+
+```
+ShowShardingTableRulesUsedAuditor::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'AUDITOR' AuditortorName ('FROM' databaseName)?
+
+AuditortorName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### Supplement
+
+- When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.
+
+### Return value description
+
+| Columns     | Descriptions       |
+| ------------| -------------------|
+| type        | Sharding rule type |
+| name        | Sharding rule name |
+
+### Example
+
+- Query sharding table rules for the specified sharding auditor in spicified logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor FROM sharding_db;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor FROM sharding_db;
++-------+---------+
+| type  | name    |
++-------+---------+
+| table | t_order |
++-------+---------+
+1 row in set (0.00 sec)
+```
+
+- Query sharding table rules for specified sharding auditor in the current logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED AUDITOR sharding_key_required_auditor;
++-------+---------+
+| type  | name    |
++-------+---------+
+| table | t_order |
++-------+---------+
+1 row in set (0.00 sec)
+```
+
+### Reserved word
+
+`SHOW`、`SHARDING`、`TABLE`、`RULES`、`USED`、`AUDITOR`、`FROM`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.cn.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.cn.md
new file mode 100644
index 00000000000..8c4679b2f51
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.cn.md
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE RULES USED KEY GENERATOR"
+weight = 12
++++
+
+### 描述
+
+`SHOW SHARDING TABLE RULES USED KEY GENERATOR` 语法用于查询指定逻辑库中使用指定分片主键生成器的分片规则。
+
+### 语法
+
+```
+ShowShardingTableRulesUsedKeyGenerator::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'KEY' 'GENERATOR' keyGeneratorName ('FROM' databaseName)?
+
+keyGeneratorName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### 补充说明
+
+- 未指定 `databaseName` 时,默认是当前使用的 `DATABASE`。 如果也未使用 `DATABASE` 则会提示 `No database selected`。
+
+### 返回值说明
+
+| 列     | 说明          |
+| ------| --------------|
+| type  | 分片规则类型    |
+| name  | 分片规则名称    |
+
+### 示例
+
+- 查询指定逻辑库中使用指定分片主键生成器的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM test1;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.00 sec)
+```
+
+- 查询当前逻辑库中使用指定分片主键生成器的分片规则
+
+```sql
+SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.01 sec)
+```
+
+### 保留字
+
+`SHOW`、`SHARDING`、`TABLE`、`USED`、`KEY`、`GENERATOR`、`FROM`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.en.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.en.md
new file mode 100644
index 00000000000..a09a339b8d9
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.en.md
@@ -0,0 +1,75 @@
++++
+title = "SHOW SHARDING TABLE RULES USED KEY GENERATOR"
+weight = 12
+
++++
+
+### Description
+
+`SHOW SHARDING TABLE RULES USED ALGORITHM` syntax is used to query sharding rules used specified sharding key generator in specified logical database
+
+### Syntax
+
+```
+ShowShardingTableRulesUsedKeyGenerator::=
+  'SHOW' 'SHARDING' 'TABLE' 'RULES' 'USED' 'KEY' 'GENERATOR' keyGeneratorName ('FROM' databaseName)?
+
+keyGeneratorName ::=
+  identifier
+
+databaseName ::=
+  identifier
+```
+
+### Supplement
+
+- When databaseName is not specified, the default is the currently used DATABASE. If DATABASE is not used, No database selected will be prompted.
+
+### Return value description
+
+| Columns     | Descriptions       |
+| ------------| -------------------|
+| type        | Sharding rule type |
+| name        | Sharding rule name |
+
+### Example
+
+- Query sharding table rules for the specified sharding key generator in spicified logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator FROM test1;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.00 sec)
+```
+
+- Query sharding table rules for specified sharding key generator in the current logical database
+
+```sql
+SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE RULES USED KEY GENERATOR snowflake_key_generator;
++-------+--------------+
+| type  | name         |
++-------+--------------+
+| table | t_order_item |
++-------+--------------+
+1 row in set (0.01 sec)
+```
+
+### Reserved word
+
+`SHOW`、`SHARDING`、`TABLE`、`USED`、`KEY`、`GENERATOR`、`FROM`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)