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

zhonghongsheng 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 dd5d2b5a6fc Fix JDBC sharding config template (#22774)
dd5d2b5a6fc is described below

commit dd5d2b5a6fcfdcb4ba4d0f2b22d008eff7eac2e0
Author: ChenJiaHao <37339007+pace2...@users.noreply.github.com>
AuthorDate: Fri Dec 9 21:29:02 2022 +0800

    Fix JDBC sharding config template (#22774)
---
 .../jdbc/resources/yaml/feature/sharding.ftl       | 54 +++++++++++-----------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git 
a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/yaml/feature/sharding.ftl
 
b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/yaml/feature/sharding.ftl
index d290c4c2015..c31566b0554 100644
--- 
a/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/yaml/feature/sharding.ftl
+++ 
b/examples/shardingsphere-example-generator/src/main/resources/template/jdbc/resources/yaml/feature/sharding.ftl
@@ -20,8 +20,8 @@
       actualDataNodes: ds_$->{0..1}.t_order_$->{0..1}
       tableStrategy:
         standard:
-        shardingColumn: order_id
-        shardingAlgorithmName: t_order_inline
+          shardingColumn: order_id
+          shardingAlgorithmName: t_order_inline
       keyGenerateStrategy:
         column: order_id
         keyGeneratorName: snowflake_generator
@@ -33,8 +33,8 @@
       actualDataNodes: ds_$->{0..1}.t_order_item_$->{0..1}
       tableStrategy:
         standard:
-        shardingColumn: order_id
-        shardingAlgorithmName: t_order_item_inline
+          shardingColumn: order_id
+          shardingAlgorithmName: t_order_item_inline
       keyGenerateStrategy:
         column: order_item_id
         keyGeneratorName: snowflake_generator
@@ -42,28 +42,28 @@
       - t_order,t_order_item
     broadcastTables:
       - t_address
-
-    defaultDatabaseStrategy:
-      standard:
+  
+  defaultDatabaseStrategy:
+    standard:
       shardingColumn: user_id
       shardingAlgorithmName: database_inline
-
-    shardingAlgorithms:
-      database_inline:
-        type: INLINE
-        props:
-          algorithm-expression: 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_generator:
-        type: SNOWFLAKE
-    auditors:
-      sharding_key_required_auditor:
-        type: DML_SHARDING_CONDITIONS
+  
+  shardingAlgorithms:
+    database_inline:
+      type: INLINE
+      props:
+        algorithm-expression: 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_generator:
+      type: SNOWFLAKE
+  auditors:
+    sharding_key_required_auditor:
+      type: DML_SHARDING_CONDITIONS

Reply via email to