-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Help]希望提供多数据库连接的实现示例 #45
Comments
你好, 这边更新了 相关文档 可以参考下 |
感谢您,我学习一下 |
抱歉,是我的场景没有描述清楚,您示例给的场景和我的情况有差异,我的场景是同一个程序需要操作不通的数据库表,例如用户表在用户数据库,文章表在文章数据库。在同一个接口中,需要同时从这两个数据库获取数据,目前我虽然实现了这个场景的需求,但是感觉实现的不合理,希望您帮我看看。
S 0.newQuery() |
你好, 根据你表述的情况, 需要先确认下
|
|
如下代码示例, 其中的
|
由于项目中需要读取多个数据库,希望提供一个操作多个数据库的实现示例,目前提供的文档只说了建议实现自定义代理类,继承GaarasonDataSourceWrapper(即实现GaarasonDataSource接口), 并重写protected DataSource getRealDataSource(boolean isWriteOrTransaction)。但是具体如何实现,以及Model中如何使用,没有说明,希望给出一个示例参考。谢谢!
The text was updated successfully, but these errors were encountered: