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 2020/09/02 11:33:32 UTC
[GitHub] [shardingsphere] lxj1027997254 commented on issue #7225: how to use bindingTables rightly
lxj1027997254 commented on issue #7225:
URL: https://github.com/apache/shardingsphere/issues/7225#issuecomment-685669990
yes, but i got 4 actual SQL when i configured the same as you.
my configuration is:
spring.shardingsphere.datasource.names=ds_0
spring.shardingsphere.datasource.ds_0.type=com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.ds_0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds_0.jdbc-url=jdbc:mysql://localhost:3306/ds
spring.shardingsphere.datasource.ds_0.username=root
spring.shardingsphere.datasource.ds_0.password=1234
spring.shardingsphere.sharding.binding-tables=t_student,t_student_item
spring.shardingsphere.sharding.tables.t_student.actual-data-nodes=ds_0.t_student_$->{0..1}
spring.shardingsphere.sharding.tables.t_student.table-strategy.inline.sharding-column=student_id
spring.shardingsphere.sharding.tables.t_student.table-strategy.inline.algorithm-expression=t_student_$->{student_id % 2}
spring.shardingsphere.sharding.tables.t_student.key-generator.column=id
spring.shardingsphere.sharding.tables.t_student.key-generator.type=SNOWFLAKE
spring.shardingsphere.sharding.tables.t_student_item.actual-data-nodes=ds_0.t_student_item_$->{0..1}
spring.shardingsphere.sharding.tables.t_student_item.table-strategy.inline.sharding-column=student_id
spring.shardingsphere.sharding.tables.t_student_item.table-strategy.inline.algorithm-expression=t_student_item_$->{student_id % 2}
spring.shardingsphere.sharding.tables.t_student_item.key-generator.column=id
spring.shardingsphere.sharding.tables.t_student_item.key-generator.type=SNOWFLAKE
----------------------------------------------------------------
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