英文:
how can i see Object box database in flutter?
问题
我已经制作了一个Flutter应用程序,并在离线模式下使用ObjectBox数据库来存储数据。
但现在的问题是如何查看数据库中存储了哪些数据,有多少表格或条目?
我阅读了ObjectBox的文档,但像我这样刚入门的人需要一些指导或简单的步骤,来查看ObjectBox数据库。
ObjectBox包:https://pub.dev/packages/objectbox
英文:
I have made a flutter application and to store data in offline mode I use an object box database.
but now the issue is how can see what data are stored in a database. how many tables or entries are there?
i read documentation from the object box but like me who is fresher in it need some guidance or simple steps how can I see the object box database?
object box package : https://pub.dev/packages/objectbox
答案1
得分: 1
我相信您要找的是这个:
您需要进行必要的设置,然后使用以下代码获取您的 ObjectBox 数据库的 Admin
实例:
if (Admin.isAvailable()) {
// 在不再需要时或手动关闭之前保留引用。
admin = Admin(store);
}
// (可选)稍后关闭。
admin.close();
英文:
I believe what you are looking for is this:
you will need to do the required setup for, then get an Admin
instance for your ObjectBox database with:
if (Admin.isAvailable()) {
// Keep a reference until no longer needed or manually closed.
admin = Admin(store);
}
// (Optional) Close at some later point.
admin.close();
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论