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

panjuan 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 fcb346c  Add English documentation for DistSQL/RQL Syntax for issues 
#10928 (#10946)
fcb346c is described below

commit fcb346c06ddd387ae8bdad37cca28d59e18bad8c
Author: gin <[email protected]>
AuthorDate: Wed Jun 23 18:53:20 2021 +0800

    Add English documentation for DistSQL/RQL Syntax for issues #10928 (#10946)
---
 .../features/dist-sql/syntax/rql/_index.en.md      |   2 +-
 .../syntax/rql/rql-db-discovery-rule.en.md         |  27 ++++-
 .../dist-sql/syntax/rql/rql-encrypt-rule.cn.md     |   4 +-
 .../dist-sql/syntax/rql/rql-encrypt-rule.en.md     |  57 ++++++++++-
 .../syntax/rql/rql-readwrite-splitting-rule.en.md  |  52 +++++++++-
 .../dist-sql/syntax/rql/rql-resource.en.md         |  30 +++++-
 .../dist-sql/syntax/rql/rql-sharding-rule.en.md    | 111 ++++++++++++++++++++-
 7 files changed, 275 insertions(+), 8 deletions(-)

diff --git a/docs/document/content/features/dist-sql/syntax/rql/_index.en.md 
b/docs/document/content/features/dist-sql/syntax/rql/_index.en.md
index 1939669..60092c4 100644
--- a/docs/document/content/features/dist-sql/syntax/rql/_index.en.md
+++ b/docs/document/content/features/dist-sql/syntax/rql/_index.en.md
@@ -5,4 +5,4 @@ weight = 2
 chapter = true
 +++
 
-## TODO
+This chapter will explain the syntax of RQL in detail,List the meaning of all 
query columns,And show all the query information through examples.
\ No newline at end of file
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-db-discovery-rule.en.md
 
b/docs/document/content/features/dist-sql/syntax/rql/rql-db-discovery-rule.en.md
index 6e8b663..d63a331 100644
--- 
a/docs/document/content/features/dist-sql/syntax/rql/rql-db-discovery-rule.en.md
+++ 
b/docs/document/content/features/dist-sql/syntax/rql/rql-db-discovery-rule.en.md
@@ -3,4 +3,29 @@ title = "DB Discovery"
 weight = 5
 +++
 
-## TODO
\ No newline at end of file
+## Definition
+
+```sql
+SHOW DB_DISCOVERY RULES [FROM schemaName]              
+```
+
+## Description
+
+| Column          | Description           |
+| --------------- | --------------------- |
+| name            | Rule name             |
+| dataSourceNames | Data source name list |
+| discoverType    | Database discovery service type        |
+| discoverProps   | Database discovery service parameters  |
+
+## Example
+
+```sql
+mysql> show db_discovery rules from database_discovery_db;
++-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
+| name  | dataSourceNames    | discoverType | discoverProps                    
                                                                           |
++-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
+| pr_ds |  ds_0, ds_1, ds_2  | MGR          |  keepAliveCron=0/5 * * * * ?, 
zkServerLists=localhost:2181, groupName=92504d5b-6dec-11e8-91ea-246e9612aaf1  |
++-------+--------------------+--------------+-------------------------------------------------------------------------------------------------------------+
+1 row in set (0.00 sec)
+```
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.cn.md 
b/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.cn.md
index fb0dcf7..e93fd88 100644
--- a/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.cn.md
+++ b/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.cn.md
@@ -25,7 +25,7 @@ SHOW ENCRYPT TABLE RULE tableName [from schemaName]
 
 ## 示例
 
-*SHOW ENCRYPT RULES*
+*显示加密规则*
 ```sql
 mysql> show encrypt rules from encrypt_db;
 
+-----------+-------------+--------------+-------------+---------------+-------------------------+
@@ -39,7 +39,7 @@ mysql> show encrypt rules from encrypt_db;
 4 rows in set (0.01 sec)
 ```
 
-*SHOW ENCRYPT TABLE RULE tableName*
+*显示加密表规则表名*
 ```sql
 mysql> show encrypt table rule t_encrypt;
 
+-----------+-------------+--------------+-------------+---------------+-------------------------+
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.en.md 
b/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.en.md
index 7e292b5..ca8822c 100644
--- a/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.en.md
+++ b/docs/document/content/features/dist-sql/syntax/rql/rql-encrypt-rule.en.md
@@ -3,4 +3,59 @@ title = "Encrypt"
 weight = 4
 +++
 
-## TODO
\ No newline at end of file
+## Definition
+
+```sql
+SHOW ENCRYPT RULES [FROM schemaName]
+
+SHOW ENCRYPT TABLE RULE tableName [from schemaName]
+```
+- Support to query all data encryption rules and specify logical table name 
query
+
+## Description
+
+| Column         | Description                     |
+| -------------- | ------------------------------- |
+| table          | Logical table name              |
+| logicColumn    | Logical column name             |
+| cipherColumn   | Ciphertext column name          |
+| plainColumn    | Plaintext column name           |
+| encryptorType  | Encryption algorithm type       |
+| encryptorProps | Encryption algorithm parameter  |
+
+## Example
+
+*Show Encrypt Rules*
+```sql
+mysql> show encrypt rules from encrypt_db;
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| table     | logicColumn | cipherColumn | plainColumn | encryptorType | 
encryptorProps          |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| t_encrypt | order_id    | order_cipher | NULL        | MD5           |       
                  |
+| t_encrypt | user_id     | user_cipher  | user_plain  | AES           | 
aes-key-value=123456abc |
+| t_order   | item_id     | order_cipher | NULL        | MD5           |       
                  |
+| t_order   | order_id    | user_cipher  | user_plain  | AES           | 
aes-key-value=123456abc |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+4 rows in set (0.01 sec)
+```
+
+*Show Encrypt Table Rule Table Name*
+```sql
+mysql> show encrypt table rule t_encrypt;
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| table     | logicColumn | cipherColumn | plainColumn | encryptorType | 
encryptorProps          |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| t_encrypt | order_id    | order_cipher | NULL        | MD5           |       
                  |
+| t_encrypt | user_id     | user_cipher  | user_plain  | AES           | 
aes-key-value=123456abc |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+2 rows in set (0.00 sec)
+
+mysql> show encrypt table rule t_encrypt from encrypt_db;
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| table     | logicColumn | cipherColumn | plainColumn | encryptorType | 
encryptorProps          |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+| t_encrypt | order_id    | order_cipher | NULL        | MD5           |       
                  |
+| t_encrypt | user_id     | user_cipher  | user_plain  | AES           | 
aes-key-value=123456abc |
++-----------+-------------+--------------+-------------+---------------+-------------------------+
+2 rows in set (0.00 sec)
+```
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-readwrite-splitting-rule.en.md
 
b/docs/document/content/features/dist-sql/syntax/rql/rql-readwrite-splitting-rule.en.md
index 16aff0b..60f89f4 100644
--- 
a/docs/document/content/features/dist-sql/syntax/rql/rql-readwrite-splitting-rule.en.md
+++ 
b/docs/document/content/features/dist-sql/syntax/rql/rql-readwrite-splitting-rule.en.md
@@ -3,4 +3,54 @@ title = "Readwrite-Splitting"
 weight = 3
 +++
 
-## TODO
\ No newline at end of file
+## Definition
+
+```sql
+SHOW READWRITE_SPLITTING RULES [FROM schemaName]               
+```
+
+## Description
+
+| Column                  | Description                          |
+| ----------------------- | ------------------------------------ |
+| name                    | Rule name                            |
+| autoAwareDataSourceName | Auto-Aware discovery data source name(Display 
configuration dynamic read-write separation rules)|
+| writeDataSourceName     | Write data source name                |
+| readDataSourceNames     | Read data source name list            |
+| loadBalancerType        | Load balance algorithm type           |
+| loadBalancerProps       | Load balance algorithm parameter      |
+
+## Example
+
+*Static Read-write Separation Rules*
+```sql
+mysql> show readwrite_splitting rules;
++------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
+| name       | autoAwareDataSourceName | writeDataSourceName | 
readDataSourceNames      | loadBalancerType | loadBalancerProps      |
++------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
+| ms_group_0 | NULL                    | ds_primary          |  ds_slave_0, 
ds_slave_1  | random           |                        |
++------------+-------------------------+---------------------+--------------------------+------------------+------------------------+
+1 row in set (0.00 sec)
+```
+
+*Dynamic Read-write Separation Rules*
+```sql
+mysql> show readwrite_splitting rules from readwrite_splitting_db;
++-------+-------------------------+---------------------+---------------------+------------------+------------------------+
+| name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames 
| loadBalancerType | loadBalancerProps      |
++-------+-------------------------+---------------------+---------------------+------------------+------------------------+
+| pr_ds | ms_group_0              | NULL                |                     
| random           |  read_weight=2:1}      |
++-------+-------------------------+---------------------+---------------------+------------------+------------------------+
+1 row in set (0.01 sec)
+```
+
+*Static Read-write Separation Rules And Dynamic Read-write Separation Rules*
+```sql
+mysql> show readwrite_splitting rules from readwrite_splitting_db;
++-------+-------------------------+---------------------+------------------------+------------------+------------------------+
+| name  | autoAwareDataSourceName | writeDataSourceName | readDataSourceNames  
  | loadBalancerType | loadBalancerProps      |
++-------+-------------------------+---------------------+------------------------+------------------+------------------------+
+| pr_ds | ms_group_0              | write_ds            |  read_ds_0, 
read_ds_1  | random           |  read_weight=2:1       |
++-------+-------------------------+---------------------+------------------------+------------------+------------------------+
+1 row in set (0.00 sec)
+```
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-resource.en.md 
b/docs/document/content/features/dist-sql/syntax/rql/rql-resource.en.md
index bea9139..8a54a2c 100644
--- a/docs/document/content/features/dist-sql/syntax/rql/rql-resource.en.md
+++ b/docs/document/content/features/dist-sql/syntax/rql/rql-resource.en.md
@@ -3,4 +3,32 @@ title = "Data Source"
 weight = 1
 +++
 
-## TODO
\ No newline at end of file
+## Definition
+
+```sql
+SHOW RESOURCES [FROM schemaName]  
+```
+
+## Description
+
+| Column        | Description             |
+| ------------- | ----------------------- |
+| name          | Data source name        |
+| type          | Data source type        |
+| host          | Data source host        |
+| port          | Data source port        |
+| db            | Database name           |
+| attribute     | Data source parameter   |
+
+## Example
+
+```sql
+mysql> show resources;
++------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| name | type  | host      | port | db   | attribute                           
                                                                                
                                                                                
|
++------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| ds_0 | MySQL | 127.0.0.1 | 3306 | ds_0 | 
{"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50,"maintenanceIntervalMilliseconds":30000}
 |
+| ds_1 | MySQL | 127.0.0.1 | 3306 | ds_1 | 
{"minPoolSize":1,"connectionTimeoutMilliseconds":30000,"maxLifetimeMilliseconds":1800000,"readOnly":false,"idleTimeoutMilliseconds":60000,"maxPoolSize":50,"maintenanceIntervalMilliseconds":30000}
 |
++------+-------+-----------+------+------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+2 rows in set (0.84 sec)
+```
diff --git 
a/docs/document/content/features/dist-sql/syntax/rql/rql-sharding-rule.en.md 
b/docs/document/content/features/dist-sql/syntax/rql/rql-sharding-rule.en.md
index 33e995a..5095ebc 100644
--- a/docs/document/content/features/dist-sql/syntax/rql/rql-sharding-rule.en.md
+++ b/docs/document/content/features/dist-sql/syntax/rql/rql-sharding-rule.en.md
@@ -3,4 +3,113 @@ title = "Sharding"
 weight = 2
 +++
 
-## TODO
+## Definition
+
+### Sharding Table Rule
+
+```sql
+SHOW SHARDING TABLE tableRule | RULES [FROM schemaName]
+
+tableRule:
+    RULE tableName
+```
+-  Support query all data fragmentation rules and specified table query
+
+### Sharding Binding Table Rule
+
+```sql
+SHOW SHARDING BINDING TABLE RULES [FROM schemaName]
+```
+
+### Sharding Broadcast Table Rule
+
+```sql
+SHOW SHARDING BROADCAST TABLE RULES [FROM schemaName]
+```
+
+## Description
+
+### Sharding Table Rule
+
+| Column                         | Description                                 
             |
+| ------------------------------ | 
-------------------------------------------------------- |
+| table                          | Logical table name                          
             |
+| actualDataNodes                | Actual data node                            
             |
+| actualDataSources              | Actual data source(Displayed when creating 
rules by RDL)|
+| databaseStrategyType           | Database sharding strategy type             
             |
+| databaseShardingColumn         | Database sharding column                    
             |
+| databaseShardingAlgorithmType  | Database sharding algorithm type            
             |
+| databaseShardingAlgorithmProps | Database sharding algorithm parameter       
             |
+| tableStrategyType              | Table sharding strategy type                
             |
+| tableShardingColumn            | Table sharding column                       
             |
+| tableShardingAlgorithmType     | Database sharding algorithm type            
             |
+| tableShardingAlgorithmProps    | Database sharding algorithm parameter       
             |
+| keyGenerateColumn              | Distributed primary key generation column   
             |
+| keyGeneratorType               | Distributed primary key generation type     
             |
+| keyGeneratorProps              | Distributed primary key generation 
parameter             |
+
+### Sharding Binding Table Rule
+
+| Column                | Description                 | 
+| --------------------- | --------------------------  |
+| shardingBindingTables | sharding Binding Table list |
+
+### Sharding Broadcast Table Rule
+
+| Column                  | Description                   |
+| ----------------------- | ----------------------------- |
+| shardingBroadcastTables | sharding Broadcast Table list |
+
+## Example
+
+### Sharding Table Rule
+
+*SHOW SHARDING TABLE RULES*
+```sql
+mysql> show sharding table rules;
++--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
+| table        | actualDataNodes                 | actualDataSources | 
databaseStrategyType | databaseShardingColumn | databaseShardingAlgorithmType | 
databaseShardingAlgorithmProps         | tableStrategyType | 
tableShardingColumn | tableShardingAlgorithmType | tableShardingAlgorithmProps  
                     | keyGenerateColumn | keyGeneratorType | keyGeneratorProps 
|
++--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
+| t_order      | ds_${0..1}.t_order_${0..1}      |                   | INLINE  
             | user_id                | INLINE                        | 
algorithm-expression:ds_${user_id % 2} | INLINE            | order_id           
 | INLINE                     | algorithm-expression:t_order_${order_id % 2}    
  | order_id          | SNOWFLAKE        | worker-id:123     |
+| t_order_item | ds_${0..1}.t_order_item_${0..1} |                   | INLINE  
             | user_id                | INLINE                        | 
algorithm-expression:ds_${user_id % 2} | INLINE            | order_id           
 | INLINE                     | algorithm-expression:t_order_item_${order_id % 
2} | order_item_id     | SNOWFLAKE        | worker-id:123     |
+| t2           |                                 | ds_0,ds_1         |         
             |                        |                               |         
                               | mod               | id                  | mod  
                      | sharding-count:10                                 |     
              |                  |                   |
++--------------+---------------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+---------------------------------------------------+-------------------+------------------+-------------------+
+3 rows in set (0.02 sec)
+```
+
+*SHOW SHARDING TABLE RULE tableName*
+```sql
+mysql> show sharding table rule t_order;
++---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
+| table   | actualDataNodes            | actualDataSources | 
databaseStrategyType | databaseShardingColumn | databaseShardingAlgorithmType | 
databaseShardingAlgorithmProps         | tableStrategyType | 
tableShardingColumn | tableShardingAlgorithmType | tableShardingAlgorithmProps  
                | keyGenerateColumn | keyGeneratorType | keyGeneratorProps |
++---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
+| t_order | ds_${0..1}.t_order_${0..1} |                   | INLINE            
   | user_id                | INLINE                        | 
algorithm-expression:ds_${user_id % 2} | INLINE            | order_id           
 | INLINE                     | algorithm-expression:t_order_${order_id % 2} | 
order_id          | SNOWFLAKE        | worker-id:123     |
++---------+----------------------------+-------------------+----------------------+------------------------+-------------------------------+----------------------------------------+-------------------+---------------------+----------------------------+----------------------------------------------+-------------------+------------------+-------------------+
+1 row in set (0.01 sec)
+```
+
+### Sharding Binding Table Rule
+
+```sql
+mysql> show sharding binding table rules from sharding_db;
++----------------------+
+| shardingBindingTables |
++----------------------+
+| t_order,t_order_item |
+| t1,t2                |
++----------------------+
+2 rows in set (0.00 sec)
+```
+
+### Sharding Broadcast Table Rule
+
+```sql
+mysql> show sharding broadcast table rules;
++------------------------+
+| shardingBroadcastTables |
++------------------------+
+| t_1                    |
+| t_2                    |
++------------------------+
+2 rows in set (0.00 sec)
+```

Reply via email to