Skip to content

Commit 02b0688

Browse files
committed
Format
1 parent 02d70c3 commit 02b0688

File tree

7 files changed

+60
-59
lines changed

7 files changed

+60
-59
lines changed

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-encrypt.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ mode:
2424
server-lists: localhost:2181
2525

2626
dataSources:
27-
ds-encrypt:
27+
ds_encrypt:
2828
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
2929
driverClassName: com.mysql.jdbc.Driver
3030
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -38,9 +38,9 @@ rules:
3838
columns:
3939
status:
4040
cipherColumn: status
41-
encryptorName: status-encryptor
41+
encryptorName: status_encryptor
4242
encryptors:
43-
status-encryptor:
43+
status_encryptor:
4444
type: AES
4545
props:
4646
aes-key-value: 123456

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ mode:
2323
namespace: demo_spring_boot_readwrite_ds
2424
server-lists: localhost:2181
2525

26-
databaseName: sharding-databases-tables
26+
databaseName: sharding_databases_tables
2727

2828
dataSources:
29-
write-ds:
29+
write_ds:
3030
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3131
driverClassName: com.mysql.jdbc.Driver
3232
jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3333
username: root
3434
password:
35-
read-ds-0:
35+
read_ds_0:
3636
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3737
driverClassName: com.mysql.jdbc.Driver
3838
jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3939
username: root
4040
password:
41-
read-ds-1:
41+
read_ds_1:
4242
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
4343
driverClassName: com.mysql.jdbc.Driver
4444
jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -50,10 +50,10 @@ rules:
5050
dataSources:
5151
readwrite_ds:
5252
staticStrategy:
53-
writeDataSourceName: write-ds
53+
writeDataSourceName: write_ds
5454
readDataSourceNames:
55-
- read-ds-0
56-
- read-ds-1
55+
- read_ds_0
56+
- read_ds_1
5757
loadBalancerName: round_robin
5858
loadBalancers:
5959
round_robin:

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dataSources:
3030
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3131
username: root
3232
password: 123456
33-
shadow-ds:
33+
shadow_ds:
3434
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3535
driverClassName: com.mysql.jdbc.Driver
3636
jdbcUrl: jdbc:mysql://localhost:3306/shadow_demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -40,38 +40,38 @@ dataSources:
4040
rules:
4141
- !SHADOW
4242
dataSources:
43-
shadow-data-source:
43+
shadow_data_source:
4444
productionDataSourceName: ds
45-
shadowDataSourceName: shadow-ds
45+
shadowDataSourceName: shadow_ds
4646
tables:
4747
t_user:
4848
dataSourceNames:
49-
- shadow-data-source
49+
- shadow_data_source
5050
shadowAlgorithmNames:
51-
- user-id-insert-match-algorithm
52-
- user-id-delete-match-algorithm
53-
- user-id-select-match-algorithm
54-
- simple-hint-algorithm
51+
- user_id_insert_match_algorithm
52+
- user_id_delete_match_algorithm
53+
- user_id_select_match_algorithm
54+
- simple_hint_algorithm
5555
shadowAlgorithms:
56-
user-id-insert-match-algorithm:
56+
user_id_insert_match_algorithm:
5757
type: VALUE_MATCH
5858
props:
5959
operation: insert
6060
column: user_type
6161
value: '1'
62-
user-id-delete-match-algorithm:
62+
user_id_delete_match_algorithm:
6363
type: VALUE_MATCH
6464
props:
6565
operation: delete
6666
column: user_type
6767
value: '1'
68-
user-id-select-match-algorithm:
68+
user_id_select_match_algorithm:
6969
type: VALUE_MATCH
7070
props:
7171
operation: select
7272
column: user_type
7373
value: '1'
74-
simple-hint-algorithm:
74+
simple_hint_algorithm:
7575
type: SIMPLE_HINT
7676
props:
7777
shadow: 'true'

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-boot-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml

+12-11
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ mode:
2323
namespace: demo_spring_boot_ds_sharding
2424
server-lists: localhost:2181
2525

26-
databaseName: sharding-databases-tables
26+
databaseName: sharding_databases_tables
2727

2828
dataSources:
29-
ds-0:
29+
ds_0:
3030
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3131
driverClassName: com.mysql.jdbc.Driver
3232
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3333
username: root
3434
password: 123456
35-
ds-1:
35+
ds_1:
3636
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3737
driverClassName: com.mysql.jdbc.Driver
3838
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -43,25 +43,26 @@ rules:
4343
- !SHARDING
4444
tables:
4545
t_order:
46-
actualDataNodes: ds-$->{0..1}.t_order_$->{0..1}
46+
actualDataNodes: ds_$->{0..1}.t_order_$->{0..1}
4747
tableStrategy:
4848
standard:
4949
shardingColumn: order_id
50-
shardingAlgorithmName: t-order-inline
50+
shardingAlgorithmName: t_order_inline
5151
keyGenerateStrategy:
5252
column: order_id
5353
keyGeneratorName: snowflake
5454
t_order_item:
55-
actualDataNodes: ds-$->{0..1}.t_order_item_$->{0..1}
55+
actualDataNodes: ds_$->{0..1}.t_order_item_$->{0..1}
5656
tableStrategy:
5757
standard:
5858
shardingColumn: order_id
59-
shardingAlgorithmName: t-order-item-inline
59+
shardingAlgorithmName: t_order_item_inline
6060
keyGenerateStrategy:
6161
column: order_item_id
6262
keyGeneratorName: snowflake
6363
bindingTables:
64-
- t_order,t_order_item
64+
- t_order
65+
- t_order_item
6566
broadcastTables:
6667
- t_address
6768
defaultDatabaseStrategy:
@@ -73,12 +74,12 @@ rules:
7374
database-inline:
7475
type: INLINE
7576
props:
76-
algorithm-expression: ds-$->{user_id % 2}
77-
t-order-inline:
77+
algorithm-expression: ds_$->{user_id % 2}
78+
t_order_inline:
7879
type: INLINE
7980
props:
8081
algorithm-expression: t_order_$->{order_id % 2}
81-
t-order-item-inline:
82+
t_order_item_inline:
8283
type: INLINE
8384
props:
8485
algorithm-expression: t_order_item_$->{order_id % 2}

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-readwrite-splitting.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,22 @@ mode:
2323
namespace: demo_spring_boot_readwrite_ds
2424
server-lists: localhost:2181
2525

26-
databaseName: sharding-databases-tables
26+
databaseName: sharding_databases_tables
2727

2828
dataSources:
29-
write-ds:
29+
write_ds:
3030
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3131
driverClassName: com.mysql.jdbc.Driver
3232
jdbcUrl: jdbc:mysql://localhost:3306/demo_write_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3333
username: root
3434
password:
35-
read-ds-0:
35+
read_ds_0:
3636
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3737
driverClassName: com.mysql.jdbc.Driver
3838
jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3939
username: root
4040
password:
41-
read-ds-1:
41+
read_ds_1:
4242
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
4343
driverClassName: com.mysql.jdbc.Driver
4444
jdbcUrl: jdbc:mysql://localhost:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -50,10 +50,10 @@ rules:
5050
dataSources:
5151
demo_ds:
5252
staticStrategy:
53-
writeDataSourceName: write-ds
53+
writeDataSourceName: write_ds
5454
readDataSourceNames:
55-
- read-ds-0
56-
- read-ds-1
55+
- read_ds_0
56+
- read_ds_1
5757
loadBalancerName: randomStrategy
5858
loadBalancers:
5959
randomStrategy:

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-shadow.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dataSources:
3030
jdbcUrl: jdbc:mysql://localhost:3306/demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
3131
username: root
3232
password:
33-
shadow-ds:
33+
shadow_ds:
3434
dataSourceClassName: com.zaxxer.hikari.HikariDataSource
3535
driverClassName: com.mysql.jdbc.Driver
3636
jdbcUrl: jdbc:mysql://localhost:3306/shadow_demo_ds?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=UTF-8
@@ -40,38 +40,38 @@ dataSources:
4040
rules:
4141
- !SHADOW
4242
dataSources:
43-
shadow-data-source:
43+
shadow_data_source:
4444
productionDataSourceName: ds
45-
shadowDataSourceName: shadow-ds
45+
shadowDataSourceName: shadow_ds
4646
tables:
4747
t_user:
4848
dataSourceNames:
49-
- shadow-data-source
49+
- shadow_data_source
5050
shadowAlgorithmNames:
51-
- user-id-insert-match-algorithm
52-
- user-id-delete-match-algorithm
53-
- user-id-select-match-algorithm
54-
- simple-hint-algorithm
51+
- user_id_insert_match_algorithm
52+
- user_id_delete_match_algorithm
53+
- user_id_select_match_algorithm
54+
- simple_hint_algorithm
5555
shadowAlgorithms:
56-
user-id-insert-match-algorithm:
56+
user_id_insert_match_algorithm:
5757
type: REGEX_MATCH
5858
props:
5959
operation: insert
6060
column: user_type
6161
regex: [1]
62-
user-id-delete-match-algorithm:
62+
user_id_delete_match_algorithm:
6363
type: REGEX_MATCH
6464
props:
6565
operation: delete
6666
column: user_type
6767
regex: [1]
68-
user-id-select-match-algorithm:
68+
user_id_select_match_algorithm:
6969
type: REGEX_MATCH
7070
props:
7171
operation: select
7272
column: user_type
7373
regex: [1]
74-
simple-hint-algorithm:
74+
simple_hint_algorithm:
7575
type: SIMPLE_HINT
7676
props:
7777
shadow: true

examples/shardingsphere-jdbc-example/single-feature-example/cluster-mode-example/cluster-mode-spring-namespace-mybatis-example/src/main/resources/local-zookeeper-sharding-databases-tables.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ mode:
2323
namespace: demo_spring_boot_ds_sharding
2424
server-lists: localhost:2181
2525

26-
databaseName: sharding-databases-tables
26+
databaseName: sharding_databases_tables
2727

2828
dataSources:
2929
demo_ds_0:
@@ -47,7 +47,7 @@ rules:
4747
tableStrategy:
4848
standard:
4949
shardingColumn: order_id
50-
shardingAlgorithmName: t-order-inline
50+
shardingAlgorithmName: t_order_inline
5151
keyGenerateStrategy:
5252
column: order_id
5353
keyGeneratorName: snowflake
@@ -56,7 +56,7 @@ rules:
5656
tableStrategy:
5757
standard:
5858
shardingColumn: order_id
59-
shardingAlgorithmName: t-order-item-inline
59+
shardingAlgorithmName: t_order_item_inline
6060
keyGenerateStrategy:
6161
column: order_item_id
6262
keyGeneratorName: snowflake
@@ -67,18 +67,18 @@ rules:
6767
defaultDatabaseStrategy:
6868
standard:
6969
shardingColumn: user_id
70-
shardingAlgorithmName: database-inline
70+
shardingAlgorithmName: database_inline
7171

7272
shardingAlgorithms:
73-
database-inline:
73+
database_inline:
7474
type: INLINE
7575
props:
7676
algorithm-expression: demo_ds_$->{user_id % 2}
77-
t-order-inline:
77+
t_order_inline:
7878
type: INLINE
7979
props:
8080
algorithm-expression: t_order_$->{order_id % 2}
81-
t-order-item-inline:
81+
t_order_item_inline:
8282
type: INLINE
8383
props:
8484
algorithm-expression: t_order_item_$->{order_id % 2}

0 commit comments

Comments
 (0)