This is an automated email from the ASF dual-hosted git repository.

zhyee 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 ff7e922  Add user-manual/yaml/read-write-spilt (#6109)
ff7e922 is described below

commit ff7e922e849edf0cb82606863e8fa29ea46c1e0a
Author: Liang Zhang <[email protected]>
AuthorDate: Thu Jun 18 12:06:46 2020 +0800

    Add user-manual/yaml/read-write-spilt (#6109)
---
 .../configuration/yaml/encrypt.cn.md               |  2 +-
 .../configuration/yaml/encrypt.en.md               |  2 +-
 .../configuration/yaml/read-write-split.cn.md      | 67 ++++++++++++++++++++++
 .../configuration/yaml/read-write-split.en.md      | 67 ++++++++++++++++++++++
 4 files changed, 136 insertions(+), 2 deletions(-)

diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.cn.md
index a2fa87a..c5dbc1f 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.cn.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.cn.md
@@ -58,7 +58,7 @@ rules:
         # ...
 
 props:
-  query.with.cipher.column: true # 是否使用密文列查询
+  # ...
 ```
 
 
算法类型的详情,请参见[内置加密算法列表](/cn/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/encrypt)。
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.en.md
index 8a20052..b87c5e5 100644
--- 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.en.md
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/encrypt.en.md
@@ -58,7 +58,7 @@ rules:
         # ...
 
 props:
-  query.with.cipher.column: true # Query with cipher or not
+  # ...
 ```
 
 Please refer to [Built-in Encrypt Algorithm 
List](/en/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/encrypt)
 for more details about type of algorithm.
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.cn.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.cn.md
new file mode 100644
index 0000000..92943b3
--- /dev/null
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.cn.md
@@ -0,0 +1,67 @@
++++
+title = "读写分离"
+weight = 2
++++
+
+## 配置示例
+
+```yaml
+dataSources:
+  master_ds: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/master_ds
+    username: root
+    password: root
+  slave_ds0: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/slave_ds0
+    username: root
+    password: root
+  slave_ds1: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/slave_ds1
+    username: root
+    password: root
+
+rules:
+- !MASTER_SLAVE
+  dataSources:
+    master_slave_ds:
+      masterDataSourceName: master_ds
+      slaveDataSourceNames:
+        - slave_ds0
+        - slave_ds1
+      loadBalancerName: roundRobin
+  
+  loadBalancers:
+    roundRobin:
+      type: ROUND_ROBIN
+
+props:
+  sql.show: true
+```
+
+## 配置项说明
+
+```yaml
+dataSources: # 省略数据源配置
+
+rules:
+- !MASTER_SLAVE
+  dataSources:
+    <data_source_name> (+): # 读写分离逻辑数据源名称
+      masterDataSourceName: # 主库数据源名称
+      slaveDataSourceNames: 
+        - <slave_data_source_name> (+) # 从库数据源名称
+      loadBalancerName: # 负载均衡算法名称
+  loadBalancers:
+    <load_balancer_name> (+): # 负载均衡算法名称
+      type: # 负载均衡算法类型
+      props: # 负载均衡算法属性配置
+        # ...
+
+props:
+  # ...
+```
+
+算法类型的详情,请参见[内置负载均衡算法列表](/cn/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance)。
diff --git 
a/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.en.md
 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.en.md
new file mode 100644
index 0000000..d67dd6d
--- /dev/null
+++ 
b/docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/read-write-split.en.md
@@ -0,0 +1,67 @@
++++
+title = "Read-write Split"
+weight = 2
++++
+
+## Configuration Example
+
+```yaml
+dataSources:
+  master_ds: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/master_ds
+    username: root
+    password: root
+  slave_ds0: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/slave_ds0
+    username: root
+    password: root
+  slave_ds1: !!org.apache.commons.dbcp2.BasicDataSource
+    driverClassName: com.mysql.jdbc.Driver
+    url: jdbc:mysql://127.0.0.1:3306/slave_ds1
+    username: root
+    password: root
+
+rules:
+- !MASTER_SLAVE
+  dataSources:
+    master_slave_ds:
+      masterDataSourceName: master_ds
+      slaveDataSourceNames:
+        - slave_ds0
+        - slave_ds1
+      loadBalancerName: roundRobin
+  
+  loadBalancers:
+    roundRobin:
+      type: ROUND_ROBIN
+
+props:
+  sql.show: true
+```
+
+## Configuration Item Explanation
+
+```yaml
+dataSource: # Ignore data source configuration
+
+rules:
+- !MASTER_SLAVE
+  dataSources:
+    <data_source_name> (+): # Logic data source name of master slave
+      masterDataSourceName: # Master data source name
+      slaveDataSourceNames: 
+        - <slave_data_source_name> (+) # Slave data source name
+      loadBalancerName: # Load balance algorithm name
+  loadBalancers:
+    <load_balancer_name> (+): # Load balance algorithm name
+      type: # Load balance algorithm type
+      props: # Load balance algorithm properties
+        # ...
+
+props:
+  # ...
+```
+
+Please refer to [Built-in Load Balance Algorithm 
List](/en/user-manual/shardingsphere-jdbc/configuration/built-in-algorithm/load-balance)
 for more details about type of algorithm.

Reply via email to