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 2019/06/28 08:33:18 UTC

[GitHub] [incubator-shardingsphere] duanzonglong opened a new issue #2623: 自定义分库缺少SQL

duanzonglong opened a new issue #2623: 自定义分库缺少SQL
URL: https://github.com/apache/incubator-shardingsphere/issues/2623
 
 
   目前的sharding有个很大的问题是如果要实现分库分表 所有查询 删除脚本都要添加分库分表的关键信息 那么我想到的一种侵入性比较小得方式是
   1 mybatis工程中添加拦截器 修改执行的SQL添加 分库关键字的json信息
   比如 /** {"tenant":["1"],"customer":["2"]} **/
   1 shardingcore需要在执行路由前将待执行SQL放入上下文或者 路由的核心入口里
   2 在定制路由里 拿到SQL再拿到json去读取自己配置的分库信息 这个分库信息可以是另外一个系统提供也可以是阿波罗等配置文件等等

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


With regards,
Apache Git Services