You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/02/03 02:39:13 UTC

[GitHub] [shardingsphere] tristaZero commented on a change in pull request #9281: Update mix.en.md

tristaZero commented on a change in pull request #9281:
URL: https://github.com/apache/shardingsphere/pull/9281#discussion_r569088374



##########
File path: docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
##########
@@ -3,4 +3,67 @@ title = "Mixed Rules"
 weight = 6
 +++
 
-TODO
+* Configuration Item Explanation
+
+## Configuration Item Explanation
+```yml
+
+rules:
+  - !SHARDING
+    tables:
+      t_order_item_calcite_sharding:
+        actualDataNodes: calcite_ds.t_order_item_calcite_sharding_${0..1}

Review comment:
       1. Could you give `calcite_ds` some explanation?

##########
File path: docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
##########
@@ -3,4 +3,67 @@ title = "Mixed Rules"
 weight = 6
 +++
 
-TODO
+* Configuration Item Explanation
+
+## Configuration Item Explanation
+```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

Review comment:
       3. These props are optional, right? Could we point users that they can get more information on xxxx?

##########
File path: docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
##########
@@ -3,4 +3,67 @@ title = "Mixed Rules"
 weight = 6
 +++
 
-TODO
+* Configuration Item Explanation
+
+## Configuration Item Explanation
+```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:

Review comment:
       2. Could you give `t_user_encrypt_calcite` some explanations?

##########
File path: docs/document/content/user-manual/shardingsphere-jdbc/configuration/yaml/mix.en.md
##########
@@ -3,4 +3,67 @@ title = "Mixed Rules"
 weight = 6
 +++
 
-TODO
+* Configuration Item Explanation
+

Review comment:
       Hi, 
   
   I suppose we need some introduction about this new section. At least we need to tell users, 
   Hi, this is a mixed configuration example, and you can leverage all the features togather.
   In order to xx, this page xxxx
   Still, to scan the corresponding pages to learn more about the specific feature configuration.xxx




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org