Dynamically changing the database shard that I am connecting too

懵懂的女人 提交于 2019-12-05 06:18:37

问题


I want to have a pool of database connections, connecting to various sharded databases.

On a per query basis I will pass in the tenant/customerId, and based on the customerId I will choose which database to connect and use for the current query.

Is this something that can be done with Slick out of the box?


回答1:


Not supported out of the box, but shouldn't be too hard to implement I think. I created a ticket: https://github.com/slick/slick/issues/703



来源:https://stackoverflow.com/questions/22311838/dynamically-changing-the-database-shard-that-i-am-connecting-too

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!