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/01/06 14:17:10 UTC
[shardingsphere] branch master updated: Update distsql document. (#14573)
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 f15cfbe Update distsql document. (#14573)
f15cfbe is described below
commit f15cfbe7e8565ed3b97897c6dadb153727eac362
Author: yx9o <ya...@163.com>
AuthorDate: Thu Jan 6 22:16:23 2022 +0800
Update distsql document. (#14573)
---
.../distsql/syntax/rql/rule-query/shadow.cn.md | 13 +++++++------
.../distsql/syntax/rql/rule-query/shadow.en.md | 21 ++++++++++++++-------
.../query/ShadowAlgorithmQueryResultSet.java | 4 ++--
3 files changed, 23 insertions(+), 15 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.cn.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.cn.md
index 0a3c502..886ba41 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.cn.md
@@ -44,6 +44,7 @@ shadowRule:
| shadow_algorithm_name | 影子算法名称 |
| type | 算法类型 |
| props | 算法参数 |
+| is_default | 是否默认 |
### Shadow Rule status
@@ -93,11 +94,11 @@ mysql> show shadow table rules;
```sql
mysql> show shadow algorithms;
-+-------------------------+--------------------+-------------------------------------------+
-| shadow_algorithm_name | type | props |
-+-------------------------+--------------------+-------------------------------------------+
-| user_id_match_algorithm | COLUMN_REGEX_MATCH | operation=insert,column=user_id,regex=[1] |
-| simple_note_algorithm_1 | SIMPLE_NOTE | shadow=true,foo=bar |
-+-------------------------+--------------------+-------------------------------------------+
++-------------------------+--------------------+-------------------------------------------+----------------+
+| shadow_algorithm_name | type | props | is_default |
++-------------------------+--------------------+-------------------------------------------+----------------+
+| user_id_match_algorithm | COLUMN_REGEX_MATCH | operation=insert,column=user_id,regex=[1] | false |
+| simple_note_algorithm_1 | SIMPLE_NOTE | shadow=true,foo=bar | false |
++-------------------------+--------------------+-------------------------------------------+----------------+
2 rows in set (0.01 sec)
```
diff --git a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.en.md b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.en.md
index 75bda7f..f9f086d 100644
--- a/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.en.md
+++ b/docs/document/content/user-manual/shardingsphere-proxy/distsql/syntax/rql/rule-query/shadow.en.md
@@ -43,7 +43,14 @@ shadowRule:
| --------------------- | --------------------------- |
| shadow_algorithm_name | Shadow algorithm name |
| type | Shadow algorithm type |
-| properties | Shadow algorithm parameters |
+| props | Shadow algorithm properties |
+| is_default | Default |
+
+### Shadow Rule status
+
+| Column | Description |
+| ------------------- | ------------ |
+| status | Enable |
## Example
@@ -87,11 +94,11 @@ mysql> show shadow table rules;
```sql
mysql> show shadow algorithms;
-+-------------------------+--------------------+-------------------------------------------+
-| shadow_algorithm_name | type | properties |
-+-------------------------+--------------------+-------------------------------------------+
-| user_id_match_algorithm | COLUMN_REGEX_MATCH | operation=insert,column=user_id,regex=[1] |
-| simple_note_algorithm_1 | SIMPLE_NOTE | shadow=true,foo=bar |
-+-------------------------+--------------------+-------------------------------------------+
++-------------------------+--------------------+-------------------------------------------+----------------+
+| shadow_algorithm_name | type | props | is_default |
++-------------------------+--------------------+-------------------------------------------+----------------+
+| user_id_match_algorithm | COLUMN_REGEX_MATCH | operation=insert,column=user_id,regex=[1] | false |
+| simple_note_algorithm_1 | SIMPLE_NOTE | shadow=true,foo=bar | false |
++-------------------------+--------------------+-------------------------------------------+----------------+
2 rows in set (0.01 sec)
```
diff --git a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShadowAlgorithmQueryResultSet.java b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShadowAlgorithmQueryResultSet.java
index 5ae133f..39aa08e 100644
--- a/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShadowAlgorithmQueryResultSet.java
+++ b/shardingsphere-features/shardingsphere-shadow/shardingsphere-shadow-distsql/shardingsphere-shadow-distsql-handler/src/main/java/org/apache/shardingsphere/shadow/distsql/handler/query/ShadowAlgorithmQueryResultSet.java
@@ -43,7 +43,7 @@ public final class ShadowAlgorithmQueryResultSet implements DistSQLResultSet {
private static final String TYPE = "type";
- private static final String PROPERTIES = "properties";
+ private static final String PROPS = "props";
private static final String DEFAULT = "is_default";
@@ -63,7 +63,7 @@ public final class ShadowAlgorithmQueryResultSet implements DistSQLResultSet {
@Override
public Collection<String> getColumnNames() {
- return Arrays.asList(SHADOW_ALGORITHM_NAME, TYPE, PROPERTIES, DEFAULT);
+ return Arrays.asList(SHADOW_ALGORITHM_NAME, TYPE, PROPS, DEFAULT);
}
@Override