具有多个数据库的Sugar ORM Android [英] Sugar ORM Android With multiple databases

查看:127
本文介绍了具有多个数据库的Sugar ORM Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为具有多个数据库的多个用户创建一个应用程序.每次用户登录时,App都会选择特定用户的数据库并从中获取值.是否可以用Sugar ORM来实现它,因为在Sugar ORM中,我们只能在清单

I am trying to create an application for multiple users with multiple database. Each time a user login ,App will select the particular user's database and fetch the values from it. Is it possible to implement it with Sugar ORM because in Sugar ORM , we can specify only One db in manifest

<meta-data android:name="DATABASE" android:value="Example.db" />

是否有办法关闭现有数据库并选择另一个数据库?

Is there any possible to way to close the existing DB and select another DB?

推荐答案

您在Sugar上问了同样的问题

You asked the same question on the Sugar GitHub Library.

GitHub Repo上有多个问题提到了多数据库想法(示例).所有这些问题仍未解决,没有显示解决方案.

There are multiple issues on the GitHub Repo that mention the multiple database idea (example). All these issues are still open and do not show a solution.

您也无法在Wiki上找到任何相关内容.

You can also not find anything about it at the wiki.

因此,您可以得出结论,在SugarORM中不可能.

So you can conclude it is not possible in SugarORM.

这篇关于具有多个数据库的Sugar ORM Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆