-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update RQL documents * Update RQL documents
- Loading branch information
1 parent
8848cfa
commit 668c26c
Showing
6 changed files
with
450 additions
and
0 deletions.
There are no files selected for viewing
75 changes: 75 additions & 0 deletions
75
...l/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) | ||
|
75 changes: 75 additions & 0 deletions
75
...l/syntax/rql/rule-query/sharding/show-sharding-table-rules-used algorithm.en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) |
75 changes: 75 additions & 0 deletions
75
...sql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) | ||
|
75 changes: 75 additions & 0 deletions
75
...sql/syntax/rql/rule-query/sharding/show-sharding-table-rules-used-auditor.en.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) |
75 changes: 75 additions & 0 deletions
75
...ntax/rql/rule-query/sharding/show-sharding-table-rules-used-key-generator.cn.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) | ||
|
Oops, something went wrong.