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/02/18 09:21:34 UTC

[shardingsphere] branch master updated: Update `show encrypt/readwrite_splitting rules` document (#15494)

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 f3dd9c3  Update `show encrypt/readwrite_splitting rules` document (#15494)
f3dd9c3 is described below

commit f3dd9c38d1800ef9b2feb0191dda7344bbb025b2
Author: lanchengx <52...@users.noreply.github.com>
AuthorDate: Fri Feb 18 17:20:15 2022 +0800

    Update `show encrypt/readwrite_splitting rules` document (#15494)
    
    * Update  `show encrypt rules` document
    
    * null is displayed as an empty string.
    
    * Update read-write splitting doc.
    
    * Update  `show encrypt rules` document
    
    * Revert "null is displayed as an empty string."
    
    This reverts commit a1d1382218086e072a162c5493523978ecf93076.
---
 .../distsql/syntax/rql/rule-query/encrypt.cn.md    | 68 ++++++++++++----------
 .../distsql/syntax/rql/rule-query/encrypt.en.md    | 68 ++++++++++++----------
 .../rql/rule-query/readwrite-splitting.cn.md       |  4 +-
 .../rql/rule-query/readwrite-splitting.en.md       |  4 +-
 4 files changed, 78 insertions(+), 66 deletions(-)

diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.cn.md
index 2c781b9..f8c598b 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.cn.md
@@ -14,48 +14,54 @@ SHOW ENCRYPT TABLE RULE tableName [from schemaName]
 
 ## 返回值说明
 
-| 列              | 说明        |
-| --------------- | ---------- |
-| table           | 逻辑表名     |
-| logic_column    | 逻辑列名     |
-| cipher_column   | 密文列名     |
-| plain_column    | 明文列名     |
-| encryptor_type  | 加密算法类型  |
-| encryptor_props | 加密算法参数  |
+| 列                        | 说明                |
+| ---------------           | ----------         |
+| table                     | 逻辑表名             |
+| logic_column              | 逻辑列名             |
+| logic_data_type           | 逻辑列数据类型        |
+| cipher_column             | 密文列名             |
+| cipher_data_type          | 密文列数据类型        |
+| plain_column              | 明文列名             |
+| plain_data_type           | 明文列数据类型          |
+| assisted_query_column     | 辅助查询列名          |
+| assisted_query_data_type  | 辅助查询列数据类型     |
+| encryptor_type            | 加密算法类型          |
+| encryptor_props           | 加密算法参数          |
+| query_with_cipher_column  | 是否使用加密列进行查询  |
 
 ## 示例
 
 *显示加密规则*
 ```sql
 mysql> show encrypt rules from encrypt_db;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
+| t_encrypt_2 | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | false                    |
+| t_encrypt_2 | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | false                    |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+4 rows in set (0.78 sec)
 ```
 
 *显示加密表规则表名*
 ```sql
 mysql> show encrypt table rule t_encrypt;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+2 rows in set (0.01 sec)
 
 mysql> show encrypt table rule t_encrypt from encrypt_db;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+2 rows in set (0.01 sec))
 ```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.en.md
index 21bde04..4d03eff 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/encrypt.en.md
@@ -14,48 +14,54 @@ SHOW ENCRYPT TABLE RULE tableName [from schemaName]
 
 ## Return Value Description
 
-| Column          | Description                     |
-| --------------- | ------------------------------- |
-| table           | Logical table name              |
-| logic_column    | Logical column name             |
-| cipher_column   | Ciphertext column name          |
-| plain_column    | Plaintext column name           |
-| encryptor_type  | Encryption algorithm type       |
-| encryptor_props | Encryption algorithm parameter  |
+| Column                    | Description                                 |
+| ---------------           | -------------------------------             |
+| table                     | Logical table name                          |
+| logic_column              | Logical column name                         |
+| logic_data_type           | Logical column data type                    |
+| cipher_column             | Ciphertext column name                      |
+| cipher_data_type          | Ciphertext column data type                 |
+| plain_column              | Plaintext column name                       |
+| plain_data_type           | Plaintext column data type                  |
+| assisted_query_column     | Assisted query column name                  |
+| assisted_query_data_type  | Assisted query column data type             |
+| encryptor_type            | Encryption algorithm type                   |
+| encryptor_props           | Encryption algorithm parameter              |
+| query_with_cipher_column  | Whether to use encrypted column for query   |
 
 ## Example
 
 *Show Encrypt Rules*
 ```sql
 mysql> show encrypt rules from encrypt_db;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
+| t_encrypt_2 | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | false                    |
+| t_encrypt_2 | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | false                    |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+4 rows in set (0.78 sec)
 ```
 
 *Show Encrypt Table Rule Table Name*
 ```sql
 mysql> show encrypt table rule t_encrypt;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+2 rows in set (0.01 sec)
 
 mysql> show encrypt table rule t_encrypt from encrypt_db;
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| table     | logic_column | cipher_column | plain_column | encryptor_type | encryptor_props         |
-+-----------+--------------+---------------+--------------+----------------+-------------------------+
-| 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)
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| table       | logic_column | logic_data_type | cipher_column | cipher_data_type | plain_column | plain_data_type | assisted_query_column | assisted_query_data_type | encryptor_type | encryptor_props         | query_with_cipher_column |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+| t_encrypt   | user_id      |                 | user_cipher   |                  | user_plain   |                 |                       |                          | AES            | aes-key-value=123456abc | true                     |
+| t_encrypt   | order_id     |                 | order_cipher  |                  |              |                 |                       |                          | MD5            |                         | true                     |
++-------------+--------------+-----------------+---------------+------------------+--------------+-----------------+-----------------------+--------------------------+----------------+-------------------------+--------------------------+
+2 rows in set (0.01 sec))
 ```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.cn.md
index dba0ab8..93250a9 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.cn.md
@@ -28,7 +28,7 @@ mysql> show readwrite_splitting rules;
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 | name       | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| ms_group_0 | NULL                        | ds_primary             | ds_slave_0, ds_slave_1 | random             |                     |
+| ms_group_0 |                             | ds_primary             | ds_slave_0, ds_slave_1 | random             |                     |
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 1 row in set (0.00 sec)
 ```
@@ -39,7 +39,7 @@ mysql> show readwrite_splitting rules from readwrite_splitting_db;
 +--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 | name         | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
 +--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| readwrite_ds | ms_group_0                  | NULL                   |                        | random             | read_weight=2:1     |
+| readwrite_ds | ms_group_0                  |                        |                        | random             | read_weight=2:1     |
 +-------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 1 row in set (0.01 sec)
 ```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.en.md
index ac88ace..5767fb4 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/readwrite-splitting.en.md
@@ -28,7 +28,7 @@ mysql> show readwrite_splitting rules;
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 | name       | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| ms_group_0 | NULL                        | ds_primary             | ds_slave_0, ds_slave_1 | random             |                     |
+| ms_group_0 |                             | ds_primary             | ds_slave_0, ds_slave_1 | random             |                     |
 +------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 1 row in set (0.00 sec)
 ```
@@ -39,7 +39,7 @@ mysql> show readwrite_splitting rules from readwrite_splitting_db;
 +--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 | name         | auto_aware_data_source_name | write_data_source_name | read_data_source_names | load_balancer_type | load_balancer_props |
 +--------------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
-| readwrite_ds | ms_group_0                  | NULL                   |                        | random             | read_weight=2:1     |
+| readwrite_ds | ms_group_0                  |                        |                        | random             | read_weight=2:1     |
 +-------+-----------------------------+------------------------+------------------------+--------------------+---------------------+
 1 row in set (0.01 sec)
 ```