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