wgy8283335 commented on issue #2133: sharding-proxy customer database or table strategy config URL: https://github.com/apache/incubator-shardingsphere/issues/2133#issuecomment-478856971 Hello, my friend. Sharding-Proxy already provide custom strategy. U could find some examples at link : https://github.com/apache/incubator-shardingsphere-example For example,shardingColumn and algorithmExpression could be configured in yaml file. "shardingRule: tables: t_order: actualDataNodes: ds_${0..1}.t_order_${0..1} tableStrategy: inline: shardingColumn: order_id algorithmExpression: t_order_${order_id % 2} keyGeneratorColumnName: order_id t_order_item: actualDataNodes: ds_${0..1}.t_order_item_${0..1} tableStrategy: inline: shardingColumn: order_id algorithmExpression: t_order_item_${order_id % 2} bindingTables: - t_order,t_order_item defaultDatabaseStrategy: inline: shardingColumn: user_id algorithmExpression: ds_${user_id % 2} defaultTableStrategy: none: defaultKeyGeneratorClassName: io.shardingsphere.core.keygen.DefaultKeyGenerator"
---------------------------------------------------------------- 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
