2241101100 commented on issue #10909:
URL:
https://github.com/apache/shardingsphere/issues/10909#issuecomment-876876788
configurations:
```
spring:
shardingsphere:
datasource:
names: ds0,ds1
ds0:
jdbc-url:
jdbc:mysql://127.0.0.1:3306/sb_1?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimeZone=Asia/Shanghai
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
ds1:
jdbc-url:
jdbc:mysql://127.0.0.1:3306/sb_2?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimeZone=Asia/Shanghai
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.jdbc.Driver
username: root
password: root
rules:
sharding:
sharding-algorithms:
table-inline:
type: INLINE
props:
algorithm-expression: wx_user_$->{ id % 10 }
allow-range-query-with-inline-sharding: true
table-interval:
type: INTERVAL
props:
datetime-pattern: 'yyyy-MM-dd HH:mm:ss'
datetime-lower: '1970-01-01 00:00:00'
datetime-upper: '2050-12-31 23:59:59'
sharding-suffix-pattern: 'yyyy_MM'
datetime-interval-amount: 1
datetime-interval-unit: MONTHS
key-generators:
snowflake:
type: SNOWFLAKE
props:
worker-id: 1
tables:
-wx_user:
actual-data-nodes: prds.wx_user_$->{0..9}
table-strategy:
standard:
sharding-column: id
sharding-algorithm-name: table-inline
-t_split_time:
actual-data-nodes:
prds.t_split_time_$->{1970..2050}_$->{['01','02','03','04','05','06','07','08','09','10','11','12']}
table-strategy:
standard:
sharding-column: create_time
sharding-algorithm-name: table-interval
replica-query:
load-balancers:
-round-robin:
type: ROUND_ROBIN
props:
default: ds0
data-sources:
-prds:
primary-data-source-name: ds0
replica-data-source-names: ds0
load-balancer-name: round_robin
enabled: true
props:
sql-show: true
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]