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/05/22 03:52:23 UTC

[GitHub] [shardingsphere] tristaZero commented on pull request #5732: optimize sharding-proxy-example datasource config.

tristaZero commented on pull request #5732:
URL: https://github.com/apache/shardingsphere/pull/5732#issuecomment-632463802


   I can feel the pain at the tedious work of DataSource configuration. Thanks for your effort in this issue.
   Considering configuration format, currently, I have no satisfying solution, here is just some of my daft idea for discussion, which is inspired by `defaultDatabaseStrategy` of `Sharding rule`.
   ```yaml
   dataSources:
     ds_0:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
     ds_1:
       url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
     defaultProps:
       username: root
       password:
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
   
   -------
   tables:
     t_order:
       actualDataNodes: ds_${0..1}.t_order_${0..1}
       tableStrategy:
         standard:
           shardingColumn: order_id
           shardingAlgorithm:
   
     t_order_item:
       actualDataNodes: ds_${0..1}.t_order_${0..1}
   
     defaultDatabaseStrategy:
   
     ```


----------------------------------------------------------------
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