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 2022/12/11 14:16:40 UTC
[shardingsphere] branch master updated: Update document format. (#22810)
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 1f572995e74 Update document format. (#22810)
1f572995e74 is described below
commit 1f572995e74e56663ebf5f36d00923055a6f6837
Author: yx9o <ya...@163.com>
AuthorDate: Sun Dec 11 22:16:33 2022 +0800
Update document format. (#22810)
---
.../shardingsphere-jdbc/yaml-config/rules/ha.cn.md | 46 +--
.../shardingsphere-jdbc/yaml-config/rules/ha.en.md | 46 +--
.../yaml-config/rules/mix.cn.md | 338 ++++++++++-----------
.../yaml-config/rules/mix.en.md | 338 ++++++++++-----------
4 files changed, 384 insertions(+), 384 deletions(-)
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
index b15efaed2b2..d2f44ad1b99 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.cn.md
@@ -75,30 +75,30 @@ dataSources:
minPoolSize: 1
rules:
- - !READWRITE_SPLITTING
- dataSources:
- replica_ds:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds
+- !READWRITE_SPLITTING
+ dataSources:
+ replica_ds:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds
- - !DB_DISCOVERY
- dataSources:
- readwrite_ds:
- dataSourceNames:
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- discoveryHeartbeats:
- mgr_heartbeat:
- props:
- keep-alive-cron: '0/5 * * * * ?'
- discoveryTypes:
- mgr:
- type: MySQL.MGR
- props:
- group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
+- !DB_DISCOVERY
+ dataSources:
+ readwrite_ds:
+ dataSourceNames:
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ discoveryHeartbeats:
+ mgr_heartbeat:
+ props:
+ keep-alive-cron: '0/5 * * * * ?'
+ discoveryTypes:
+ mgr:
+ type: MySQL.MGR
+ props:
+ group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
```
## 相关参考
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
index 2f47b9d2663..ffe6bb2c233 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/ha.en.md
@@ -75,29 +75,29 @@ dataSources:
minPoolSize: 1
rules:
- - !READWRITE_SPLITTING
- dataSources:
- replica_ds:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds
- - !DB_DISCOVERY
- dataSources:
- readwrite_ds:
- dataSourceNames:
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- discoveryHeartbeats:
- mgr_heartbeat:
- props:
- keep-alive-cron: '0/5 * * * * ?'
- discoveryTypes:
- mgr:
- type: MySQL.MGR
- props:
- group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
+- !READWRITE_SPLITTING
+ dataSources:
+ replica_ds:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds
+- !DB_DISCOVERY
+ dataSources:
+ readwrite_ds:
+ dataSourceNames:
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ discoveryHeartbeats:
+ mgr_heartbeat:
+ props:
+ keep-alive-cron: '0/5 * * * * ?'
+ discoveryTypes:
+ mgr:
+ type: MySQL.MGR
+ props:
+ group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
```
## Related References
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
index ca290a7a5a1..e8021befc03 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.cn.md
@@ -11,179 +11,179 @@ ShardingSphere 涵盖了很多功能,例如,分库分片、读写分离、
```yaml
rules:
- - !SHARDING
- tables:
- <logic_table_name>: # 逻辑表名称:
- actualDataNodes: # 由逻辑数据源名 + 表名组成(参考 Inline 语法规则)
- tableStrategy: # 分表策略,同分库策略
- standard:
- shardingColumn: # 分片列名称
- shardingAlgorithmName: # 分片算法名称
- keyGenerateStrategy:
- column: # 自增列名称,缺省表示不使用自增主键生成器
- keyGeneratorName: # 分布式序列算法名称
- defaultDatabaseStrategy:
- standard:
- shardingColumn: # 分片列名称
- shardingAlgorithmName: # 分片算法名称
- shardingAlgorithms:
- <sharding_algorithm_name>: # 分片算法名称
- type: INLINE
- props:
- algorithm-expression: # INLINE 表达式
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: # INLINE 表达式
- keyGenerators:
- <key_generate_algorithm_name> (+): # 分布式序列算法名称
- type: # 分布式序列算法类型
- props: # 分布式序列算法属性配置
- - !READWRITE_SPLITTING
- dataSources:
- <data_source_name>: # 读写分离逻辑数据源名称
- dynamicStrategy: # 读写分离类型
- autoAwareDataSourceName: # 数据库发现逻辑数据源名称
- <data_source_name>: # 读写分离逻辑数据源名称
- dynamicStrategy: # 读写分离类型
- autoAwareDataSourceName: # 数据库发现逻辑数据源名称
- - !DB_DISCOVERY
- dataSources:
- <data_source_name>:
- dataSourceNames: # 数据源名称列表
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: # 检测心跳名称
- discoveryTypeName: # 数据库发现类型名称
- <data_source_name>:
- dataSourceNames: # 数据源名称列表
- - ds_3
- - ds_4
- - ds_5
- discoveryHeartbeatName: # 检测心跳名称
- discoveryTypeName: # 数据库发现类型名称
- discoveryHeartbeats:
- <discovery_heartbeat_name>: # 心跳名称
- props:
- keep-alive-cron: # cron 表达式,如:'0/5 * * * * ?'
- discoveryTypes:
- <discovery_type_name>: # 数据库发现类型名称
- type: # 数据库发现类型,如:MySQL.MGR
- props:
- group-name: # 数据库发现类型必要参数,如 MGR 的 group-name
- - !ENCRYPT
- encryptors:
- <encrypt_algorithm_name> (+): # 加解密算法名称
- type: # 加解密算法类型
- props: # 加解密算法属性配置
- <encrypt_algorithm_name> (+): # 加解密算法名称
- type: # 加解密算法类型
- tables:
- <table_name>: # 加密表名称
- columns:
- <column_name> (+): # 加密列名称
- plainColumn (?): # 原文列名称
- cipherColumn: # 密文列名称
- encryptorName: # 密文列加密算法名称
- assistedQueryColumn (?): # 查询辅助列名称
- assistedQueryEncryptorName: # 查询辅助列加密算法名称
- likeQueryColumn (?): # 模糊查询列名称
- likeQueryEncryptorName: # 模糊查询列加密算法名称
- queryWithCipherColumn(?): # 该表是否使用加密列进行查询
+- !SHARDING
+ tables:
+ <logic_table_name>: # 逻辑表名称:
+ actualDataNodes: # 由逻辑数据源名 + 表名组成(参考 Inline 语法规则)
+ tableStrategy: # 分表策略,同分库策略
+ standard:
+ shardingColumn: # 分片列名称
+ shardingAlgorithmName: # 分片算法名称
+ keyGenerateStrategy:
+ column: # 自增列名称,缺省表示不使用自增主键生成器
+ keyGeneratorName: # 分布式序列算法名称
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: # 分片列名称
+ shardingAlgorithmName: # 分片算法名称
+ shardingAlgorithms:
+ <sharding_algorithm_name>: # 分片算法名称
+ type: INLINE
+ props:
+ algorithm-expression: # INLINE 表达式
+ t_order_inline:
+ type: INLINE
+ props:
+ algorithm-expression: # INLINE 表达式
+ keyGenerators:
+ <key_generate_algorithm_name> (+): # 分布式序列算法名称
+ type: # 分布式序列算法类型
+ props: # 分布式序列算法属性配置
+- !READWRITE_SPLITTING
+ dataSources:
+ <data_source_name>: # 读写分离逻辑数据源名称
+ dynamicStrategy: # 读写分离类型
+ autoAwareDataSourceName: # 数据库发现逻辑数据源名称
+ <data_source_name>: # 读写分离逻辑数据源名称
+ dynamicStrategy: # 读写分离类型
+ autoAwareDataSourceName: # 数据库发现逻辑数据源名称
+- !DB_DISCOVERY
+ dataSources:
+ <data_source_name>:
+ dataSourceNames: # 数据源名称列表
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: # 检测心跳名称
+ discoveryTypeName: # 数据库发现类型名称
+ <data_source_name>:
+ dataSourceNames: # 数据源名称列表
+ - ds_3
+ - ds_4
+ - ds_5
+ discoveryHeartbeatName: # 检测心跳名称
+ discoveryTypeName: # 数据库发现类型名称
+ discoveryHeartbeats:
+ <discovery_heartbeat_name>: # 心跳名称
+ props:
+ keep-alive-cron: # cron 表达式,如:'0/5 * * * * ?'
+ discoveryTypes:
+ <discovery_type_name>: # 数据库发现类型名称
+ type: # 数据库发现类型,如:MySQL.MGR
+ props:
+ group-name: # 数据库发现类型必要参数,如 MGR 的 group-name
+- !ENCRYPT
+ encryptors:
+ <encrypt_algorithm_name> (+): # 加解密算法名称
+ type: # 加解密算法类型
+ props: # 加解密算法属性配置
+ <encrypt_algorithm_name> (+): # 加解密算法名称
+ type: # 加解密算法类型
+ tables:
+ <table_name>: # 加密表名称
+ columns:
+ <column_name> (+): # 加密列名称
+ plainColumn (?): # 原文列名称
+ cipherColumn: # 密文列名称
+ encryptorName: # 密文列加密算法名称
+ assistedQueryColumn (?): # 查询辅助列名称
+ assistedQueryEncryptorName: # 查询辅助列加密算法名称
+ likeQueryColumn (?): # 模糊查询列名称
+ likeQueryEncryptorName: # 模糊查询列加密算法名称
+ queryWithCipherColumn(?): # 该表是否使用加密列进行查询
```
## 配置示例
```yaml
rules:
- - !SHARDING
- tables:
- t_order:
- actualDataNodes: replica_ds_${0..1}.t_order_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: database_inline
- shardingAlgorithms:
- database_inline:
- type: INLINE
- props:
- algorithm-expression: replica_ds_${user_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
- - !READWRITE_SPLITTING
- dataSources:
- replica_ds_0:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds_0
- replica_ds_1:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds_1
- - !DB_DISCOVERY
- dataSources:
- readwrite_ds_0:
- dataSourceNames:
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- readwrite_ds_1:
- dataSourceNames:
- - ds_3
- - ds_4
- - ds_5
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- discoveryHeartbeats:
- mgr_heartbeat:
- props:
- keep-alive-cron: '0/5 * * * * ?'
- discoveryTypes:
- mgr:
- type: MySQL.MGR
- props:
- group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
- - !ENCRYPT
- encryptors:
- aes_encryptor:
- type: AES
- props:
- aes-key-value: 123456abc
- md5_encryptor:
- type: MD5
- like_encryptor:
- type: CHAR_DIGEST_LIKE
- tables:
- t_encrypt:
- columns:
- user_id:
- plainColumn: user_plain
- cipherColumn: user_cipher
- encryptorName: aes_encryptor
- assistedQueryColumn: assisted_query_user
- assistedQueryEncryptorName: aes_encryptor
- likeQueryColumn: like_query_user
- likeQueryEncryptorName: like_encryptor
- order_id:
- cipherColumn: order_cipher
- encryptorName: md5_encryptor
- queryWithCipherColumn: true
+- !SHARDING
+ tables:
+ t_order:
+ actualDataNodes: replica_ds_${0..1}.t_order_${0..1}
+ tableStrategy:
+ standard:
+ shardingColumn: order_id
+ shardingAlgorithmName: t_order_inline
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: database_inline
+ shardingAlgorithms:
+ database_inline:
+ type: INLINE
+ props:
+ algorithm-expression: replica_ds_${user_id % 2}
+ t_order_inline:
+ type: INLINE
+ props:
+ algorithm-expression: t_order_${order_id % 2}
+ t_order_item_inline:
+ type: INLINE
+ props:
+ algorithm-expression: t_order_item_${order_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+- !READWRITE_SPLITTING
+ dataSources:
+ replica_ds_0:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds_0
+ replica_ds_1:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds_1
+- !DB_DISCOVERY
+ dataSources:
+ readwrite_ds_0:
+ dataSourceNames:
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ readwrite_ds_1:
+ dataSourceNames:
+ - ds_3
+ - ds_4
+ - ds_5
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ discoveryHeartbeats:
+ mgr_heartbeat:
+ props:
+ keep-alive-cron: '0/5 * * * * ?'
+ discoveryTypes:
+ mgr:
+ type: MySQL.MGR
+ props:
+ group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
+- !ENCRYPT
+ encryptors:
+ aes_encryptor:
+ type: AES
+ props:
+ aes-key-value: 123456abc
+ md5_encryptor:
+ type: MD5
+ like_encryptor:
+ type: CHAR_DIGEST_LIKE
+ tables:
+ t_encrypt:
+ columns:
+ user_id:
+ plainColumn: user_plain
+ cipherColumn: user_cipher
+ encryptorName: aes_encryptor
+ assistedQueryColumn: assisted_query_user
+ assistedQueryEncryptorName: aes_encryptor
+ likeQueryColumn: like_query_user
+ likeQueryEncryptorName: like_encryptor
+ order_id:
+ cipherColumn: order_cipher
+ encryptorName: md5_encryptor
+ queryWithCipherColumn: true
```
diff --git a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
index eab3a2e839d..a05699fab3d 100644
--- a/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
+++ b/docs/document/content/user-manual/shardingsphere-jdbc/yaml-config/rules/mix.en.md
@@ -12,179 +12,179 @@ Below, you will find the parameters' explanation and configuration samples based
```yaml
rules:
- - !SHARDING
- tables:
- <logic_table_name>: # Logical table name:
- actualDataNodes: # consists of logical data source name plus table name (refer to Inline syntax rules)
- tableStrategy: # Table shards strategy. The same as database shards strategy
- standard:
- shardingColumn: # Sharding column name
- shardingAlgorithmName: # Sharding algorithm name
- keyGenerateStrategy:
- column: # Auto-increment column name. By default, the auto-increment primary key generator is not used.
- keyGeneratorName: # Distributed sequence algorithm name
- defaultDatabaseStrategy:
- standard:
- shardingColumn: # Sharding column name
- shardingAlgorithmName: # Sharding algorithm name
- shardingAlgorithms:
- <sharding_algorithm_name>: # Sharding algorithm name
- type: INLINE
- props:
- algorithm-expression: # INLINE expression
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: # INLINE expression
- keyGenerators:
- <key_generate_algorithm_name> (+): # Distributed sequence algorithm name
- type: # Distributed sequence algorithm type
- props: # Property configuration of distributed sequence algorithm
- - !READWRITE_SPLITTING
- dataSources:
- <data_source_name>: # Read/write splitting logical data source name
- dynamicStrategy: # Read/write splitting type
- autoAwareDataSourceName: # Database discovery logical data source name
- <data_source_name>: # Read/write splitting logical data source name
- dynamicStrategy: # Read/write splitting type
- autoAwareDataSourceName: # Database discovery logical data source name
- - !DB_DISCOVERY
- dataSources:
- <data_source_name>:
- dataSourceNames: # Data source name list
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: # Detect heartbeat name
- discoveryTypeName: # Database discovery type name
- <data_source_name>:
- dataSourceNames: # Data source name list
- - ds_3
- - ds_4
- - ds_5
- discoveryHeartbeatName: # Detect heartbeat name
- discoveryTypeName: # Database discovery type name
- discoveryHeartbeats:
- <discovery_heartbeat_name>: # Heartbeat name
- props:
- keep-alive-cron: # cron expression, such as '0/5 * * * * ?'
- discoveryTypes:
- <discovery_type_name>: # Database discovery type name
- type: # Database discovery type, such as MySQL.MGR.
- props:
- group-name: # Required parameter of database discovery type, such as MGR's group-name.
- - !ENCRYPT
- encryptors:
- <encrypt_algorithm_name> (+): # Encryption and decryption algorithm name
- type: # Encryption and decryption algorithm type
- props: # Encryption and decryption algorithm property configuration
- <encrypt_algorithm_name> (+): # Encryption and decryption algorithm name
- type: # Encryption and decryption algorithm type
- tables:
- <table_name>: # Encryption table name
- columns:
- <column_name> (+): # Encrypt logic column name
- plainColumn (?): # Plain column name
- cipherColumn: # Cipher column name
- encryptorName: # Cipher encrypt algorithm name
- assistedQueryColumn (?): # Assisted query column name
- assistedQueryEncryptorName: # Assisted query encrypt algorithm name
- likeQueryColumn (?): # Like query column name
- likeQueryEncryptorName: # Like query encrypt algorithm name
- queryWithCipherColumn(?): # The current table whether query with cipher column for data encrypt.
+- !SHARDING
+ tables:
+ <logic_table_name>: # Logical table name:
+ actualDataNodes: # consists of logical data source name plus table name (refer to Inline syntax rules)
+ tableStrategy: # Table shards strategy. The same as database shards strategy
+ standard:
+ shardingColumn: # Sharding column name
+ shardingAlgorithmName: # Sharding algorithm name
+ keyGenerateStrategy:
+ column: # Auto-increment column name. By default, the auto-increment primary key generator is not used.
+ keyGeneratorName: # Distributed sequence algorithm name
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: # Sharding column name
+ shardingAlgorithmName: # Sharding algorithm name
+ shardingAlgorithms:
+ <sharding_algorithm_name>: # Sharding algorithm name
+ type: INLINE
+ props:
+ algorithm-expression: # INLINE expression
+ t_order_inline:
+ type: INLINE
+ props:
+ algorithm-expression: # INLINE expression
+ keyGenerators:
+ <key_generate_algorithm_name> (+): # Distributed sequence algorithm name
+ type: # Distributed sequence algorithm type
+ props: # Property configuration of distributed sequence algorithm
+- !READWRITE_SPLITTING
+ dataSources:
+ <data_source_name>: # Read/write splitting logical data source name
+ dynamicStrategy: # Read/write splitting type
+ autoAwareDataSourceName: # Database discovery logical data source name
+ <data_source_name>: # Read/write splitting logical data source name
+ dynamicStrategy: # Read/write splitting type
+ autoAwareDataSourceName: # Database discovery logical data source name
+- !DB_DISCOVERY
+ dataSources:
+ <data_source_name>:
+ dataSourceNames: # Data source name list
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: # Detect heartbeat name
+ discoveryTypeName: # Database discovery type name
+ <data_source_name>:
+ dataSourceNames: # Data source name list
+ - ds_3
+ - ds_4
+ - ds_5
+ discoveryHeartbeatName: # Detect heartbeat name
+ discoveryTypeName: # Database discovery type name
+ discoveryHeartbeats:
+ <discovery_heartbeat_name>: # Heartbeat name
+ props:
+ keep-alive-cron: # cron expression, such as '0/5 * * * * ?'
+ discoveryTypes:
+ <discovery_type_name>: # Database discovery type name
+ type: # Database discovery type, such as MySQL.MGR.
+ props:
+ group-name: # Required parameter of database discovery type, such as MGR's group-name.
+- !ENCRYPT
+ encryptors:
+ <encrypt_algorithm_name> (+): # Encryption and decryption algorithm name
+ type: # Encryption and decryption algorithm type
+ props: # Encryption and decryption algorithm property configuration
+ <encrypt_algorithm_name> (+): # Encryption and decryption algorithm name
+ type: # Encryption and decryption algorithm type
+ tables:
+ <table_name>: # Encryption table name
+ columns:
+ <column_name> (+): # Encrypt logic column name
+ plainColumn (?): # Plain column name
+ cipherColumn: # Cipher column name
+ encryptorName: # Cipher encrypt algorithm name
+ assistedQueryColumn (?): # Assisted query column name
+ assistedQueryEncryptorName: # Assisted query encrypt algorithm name
+ likeQueryColumn (?): # Like query column name
+ likeQueryEncryptorName: # Like query encrypt algorithm name
+ queryWithCipherColumn(?): # The current table whether query with cipher column for data encrypt.
```
## Samples
```yaml
rules:
- - !SHARDING
- tables:
- t_order:
- actualDataNodes: replica_ds_${0..1}.t_order_${0..1}
- tableStrategy:
- standard:
- shardingColumn: order_id
- shardingAlgorithmName: t_order_inline
- keyGenerateStrategy:
- column: order_id
- keyGeneratorName: snowflake
- defaultDatabaseStrategy:
- standard:
- shardingColumn: user_id
- shardingAlgorithmName: database_inline
- shardingAlgorithms:
- database_inline:
- type: INLINE
- props:
- algorithm-expression: replica_ds_${user_id % 2}
- t_order_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_${order_id % 2}
- t_order_item_inline:
- type: INLINE
- props:
- algorithm-expression: t_order_item_${order_id % 2}
- keyGenerators:
- snowflake:
- type: SNOWFLAKE
- - !READWRITE_SPLITTING
- dataSources:
- replica_ds_0:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds_0
- replica_ds_1:
- dynamicStrategy:
- autoAwareDataSourceName: readwrite_ds_1
- - !DB_DISCOVERY
- dataSources:
- readwrite_ds_0:
- dataSourceNames:
- - ds_0
- - ds_1
- - ds_2
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- readwrite_ds_1:
- dataSourceNames:
- - ds_3
- - ds_4
- - ds_5
- discoveryHeartbeatName: mgr_heartbeat
- discoveryTypeName: mgr
- discoveryHeartbeats:
- mgr_heartbeat:
- props:
- keep-alive-cron: '0/5 * * * * ?'
- discoveryTypes:
- mgr:
- type: MySQL.MGR
- props:
- group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
- - !ENCRYPT
- encryptors:
- aes_encryptor:
- type: AES
- props:
- aes-key-value: 123456abc
- md5_encryptor:
- type: MD5
- like_encryptor:
- type: CHAR_DIGEST_LIKE
- tables:
- t_encrypt:
- columns:
- user_id:
- plainColumn: user_plain
- cipherColumn: user_cipher
- encryptorName: aes_encryptor
- assistedQueryColumn: assisted_query_user
- assistedQueryEncryptorName: aes_encryptor
- likeQueryColumn: like_query_user
- likeQueryEncryptorName: like_encryptor
- order_id:
- cipherColumn: order_cipher
- encryptorName: md5_encryptor
- queryWithCipherColumn: true
+- !SHARDING
+ tables:
+ t_order:
+ actualDataNodes: replica_ds_${0..1}.t_order_${0..1}
+ tableStrategy:
+ standard:
+ shardingColumn: order_id
+ shardingAlgorithmName: t_order_inline
+ keyGenerateStrategy:
+ column: order_id
+ keyGeneratorName: snowflake
+ defaultDatabaseStrategy:
+ standard:
+ shardingColumn: user_id
+ shardingAlgorithmName: database_inline
+ shardingAlgorithms:
+ database_inline:
+ type: INLINE
+ props:
+ algorithm-expression: replica_ds_${user_id % 2}
+ t_order_inline:
+ type: INLINE
+ props:
+ algorithm-expression: t_order_${order_id % 2}
+ t_order_item_inline:
+ type: INLINE
+ props:
+ algorithm-expression: t_order_item_${order_id % 2}
+ keyGenerators:
+ snowflake:
+ type: SNOWFLAKE
+- !READWRITE_SPLITTING
+ dataSources:
+ replica_ds_0:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds_0
+ replica_ds_1:
+ dynamicStrategy:
+ autoAwareDataSourceName: readwrite_ds_1
+- !DB_DISCOVERY
+ dataSources:
+ readwrite_ds_0:
+ dataSourceNames:
+ - ds_0
+ - ds_1
+ - ds_2
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ readwrite_ds_1:
+ dataSourceNames:
+ - ds_3
+ - ds_4
+ - ds_5
+ discoveryHeartbeatName: mgr_heartbeat
+ discoveryTypeName: mgr
+ discoveryHeartbeats:
+ mgr_heartbeat:
+ props:
+ keep-alive-cron: '0/5 * * * * ?'
+ discoveryTypes:
+ mgr:
+ type: MySQL.MGR
+ props:
+ group-name: 558edd3c-02ec-11ea-9bb3-080027e39bd2
+- !ENCRYPT
+ encryptors:
+ aes_encryptor:
+ type: AES
+ props:
+ aes-key-value: 123456abc
+ md5_encryptor:
+ type: MD5
+ like_encryptor:
+ type: CHAR_DIGEST_LIKE
+ tables:
+ t_encrypt:
+ columns:
+ user_id:
+ plainColumn: user_plain
+ cipherColumn: user_cipher
+ encryptorName: aes_encryptor
+ assistedQueryColumn: assisted_query_user
+ assistedQueryEncryptorName: aes_encryptor
+ likeQueryColumn: like_query_user
+ likeQueryEncryptorName: like_encryptor
+ order_id:
+ cipherColumn: order_cipher
+ encryptorName: md5_encryptor
+ queryWithCipherColumn: true
```