easy-swoole / easyswoole

swoole,easyswoole,swoole framework
https://www.easyswoole.com/
Apache License 2.0
4.75k stars 511 forks source link

框架如何动态切换数据库 #469

Closed afraidjpg closed 3 years ago

afraidjpg commented 3 years ago

因为业务,要分库,有一张前置表通过,前置表来决定后续连接哪个数据库,然后每个数据库结构都是一样的,这种在框架里怎么处理,还是说现在框架无法支持这种? easyswoole版本:3.3.7

Player626 commented 3 years ago

https://www.easyswoole.com/Components/Orm/readWriteSeparation.html https://www.easyswoole.com/Components/Orm/definitionModel.html