You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/21 11:45:18 UTC

[GitHub] [shardingsphere] Qianyi951015 commented on a diff in pull request #21684: Update DistSQL RQL documents

Qianyi951015 commented on code in PR #21684:
URL: https://github.com/apache/shardingsphere/pull/21684#discussion_r1001693736


##########
docs/document/content/reference/distsql/syntax/rql/rule-query/shadow/show-shadow-table-rule.en.md:
##########
@@ -0,0 +1,72 @@
++++
+title = "SHOW SHADOW TABLE RULE"
+weight = 3
++++
+
+### Description
+
+The `SHOW SHADOW TABLE RULE` syntax is used to query shadow table rules for specified database.
+
+### Syntax
+
+```
+ShowEncryptRule::=
+  'SHOW' 'SHADOW' 'TABLE' 'RULES' ('FROM' databaseName)?
+
+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
+
+| Column                | Description           |
+| --------------------- | --------------------- |
+| shadow_table          | Shadow table          |
+| shadow_algorithm_name | Shadow algorithm name |
+
+### Example
+
+- Query shadow table rules for specified database.
+
+```sql
+SHOW SHADOW TABLE RULES FROM test1;
+```
+
+```sql
+mysql> SHOW SHADOW TABLE RULES FROM test1;
++--------------+-------------------------------------------------------+
+| shadow_table | shadow_algorithm_name                                 |
++--------------+-------------------------------------------------------+
+| t_order_item | shadow_rule_t_order_item_value_match                  |
+| t_order      | simple_hint_algorithm,shadow_rule_t_order_regex_match |
++--------------+-------------------------------------------------------+
+2 rows in set (0.00 sec)
+```
+
+- Query shadow table rules for current database.
+
+```sql
+SHOW SHADOW TABLE RULES;
+```
+
+```sql
+mysql> SHOW SHADOW TABLE RULES;
++--------------+-------------------------------------------------------+
+| shadow_table | shadow_algorithm_name                                 |
++--------------+-------------------------------------------------------+
+| t_order_item | shadow_rule_t_order_item_value_match                  |
+| t_order      | simple_hint_algorithm,shadow_rule_t_order_regex_match |
++--------------+-------------------------------------------------------+
+2 rows in set (0.01 sec)
+```
+### Reserved word
+
+`SHOW`、`SHADOW`、`TABLE`、`RULES`、`FROM`

Review Comment:
   OK



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org