wgy8283335 commented on issue #2158: support for SQL route extension
URL: 
https://github.com/apache/incubator-shardingsphere/issues/2158#issuecomment-481942023
 
 
   @lalicw. Hi, my friend. Could you make a example of setting context to use 
few tables?
   Beacuse, we could set tables which to use sharding currently. 
   Parameters tables could configre only t_order and t_order_item will be 
sharded, as below:
   ```
   dataSources:
     ds_0: !!org.apache.commons.dbcp.BasicDataSource
       driverClassName: com.mysql.jdbc.Driver
       url: jdbc:mysql://localhost:3306/demo_ds_0
       username: root
       password:
     ds_1: !!org.apache.commons.dbcp.BasicDataSource
       driverClassName: com.mysql.jdbc.Driver
       url: jdbc:mysql://localhost:3306/demo_ds_1
       username: root
       password:
   
   shardingRule:  
     tables:
       t_order: 
         actualDataNodes: ds_${0..1}.t_order
         keyGeneratorColumnName: order_id
       t_order_item:
         actualDataNodes: ds_${0..1}.t_order_item
         keyGeneratorColumnName: order_item_id
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to