You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2021/02/03 04:39:40 UTC
[shardingsphere] branch master updated: Update mix.cn.md (#9280)
This is an automated email from the ASF dual-hosted git repository.
zhangliang 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 d8a137b Update mix.cn.md (#9280)
d8a137b is described below
commit d8a137b0afa3ffb981d7a2dd1824af0ecdef9809
Author: MingHao Li <lm...@163.com>
AuthorDate: Wed Feb 3 12:39:10 2021 +0800
Update mix.cn.md (#9280)
---
.../configuration/yaml/mix.cn.md | 64 +++++++++++++++++++++-
1 file changed, 63 insertions(+), 1 deletion(-)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
index a174143..73a5363 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.cn.md
@@ -3,4 +3,66 @@ title = "混合规则"
weight = 6
+++
-TODO
+* 配置项说明
+
+## 配置项说明
+```yml
+rules:
+ - !SHARDING
+ tables:
+ t_order_item_calcite_sharding:
+ actualDataNodes: calcite_ds.t_order_item_calcite_sharding_${0..1}
+ tableStrategy:
+ standard:
+ shardingColumn: item_id
+ shardingAlgorithmName: table_inline_item_id
+ t_user_encrypt_calcite_sharding:
+ actualDataNodes: calcite_ds.t_user_encrypt_calcite_sharding_${0..1}
+ tableStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: table_inline_user_id
+ shardingAlgorithms:
+ table_inline_item_id:
+ type: INLINE
+ props:
+ algorithm-expression: t_order_item_calcite_sharding_${item_id % 2}
+ table_inline_user_id:
+ type: INLINE
+ props:
+ algorithm-expression: t_user_encrypt_calcite_sharding_${user_id % 2}
+ - !ENCRYPT
+ encryptors:
+ encryptor_aes:
+ type: aes
+ props:
+ aes-key-value: 123456abc
+ tables:
+ t_user_encrypt_calcite:
+ columns:
+ pwd:
+ plainColumn: plain_pwd
+ cipherColumn: cipher_pwd
+ encryptorName: encryptor_aes
+ t_user_encrypt_calcite_sharding:
+ columns:
+ pwd:
+ plainColumn: plain_pwd
+ cipherColumn: cipher_pwd
+ encryptorName: encryptor_aes
+ - !REPLICA_QUERY
+ dataSources:
+ calcite_ds:
+ name: calcite_ds
+ primaryDataSourceName:
+ - calcite_jdbc_1
+ replicaDataSourceNames:
+ - calcite_jdbc_2
+ loadBalancerName: roundRobin
+ loadBalancers:
+ roundRobin:
+ type: ROUND_ROBIN
+props:
+ sql-show: true
+ query-with-cipher-column: true
+```