-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Plugin: database #6676
Comments
What kind of database are you thinking? What kind of data did you need to store? Both platforms expose sqlite. There's also 3rd party services like Realm. |
@sethladd how do we access it in flutter, using platform services (https://flutter.io/platform-services/) ? It would be nice if we have one abstracted dart API to store data, without writing the boilerplate for each host platform. |
True, but unfortunately there isn't One True Way to store and retrieve data. Some people want SQL. Some people want key/value. Some apps want to optimize for size on disk. Some apps want to sync to the cloud. Etc, etc. That said, I think it's fairly common to want to store structured, queriable data locally in some sort of SQL-esque database. Both platforms have APIs for these. Perhaps that's a good place to start. In the meantime, yes, you can use the "platform services" API. |
i agree that there is no one true DB :) a KV store like the one i linked is a good start. https://flutter.io/platform-services/ allow calling out to Android java Land and IOS objc 7 Swift land, which is not what i am proposing because its not cross platform. We can do better. I currently run this on mobiles, desktop and server. Its very useful to be able to run the same queries everywhere .. |
@sethladd I agree. But the thing is, for any non-trivial mobile app requires some database to store it's data/config and providing a data store out of the box would be great instead of writing the host platform interfacing code in both java and obj c/swift (if you are targeting cross platform). |
I will add to this. I was using golang to build mobile database using bolt DB. |
Someone in the community just published a SQLite plugin: |
A reactive SQLite DB in the vein of Room is an absolute necessity. |
I agree with @ZakTaccardi, a Room-like API for Flutter that work on all target platforms would be really great |
This is not something that's on our priority list for the next few months. It seems like a project that would be ripe for making as a separate plugin, though. |
Agree, Android Room SQLite API great |
A first ORM support can be found here https://github.com/Jaguar-dart/jaguar_orm, an sqflite adapter is ongoing and for now a first basic support is already working. |
At this time, there are a number of plugins that support various types of persistent store, including SQLite, Firebase Realtime Database and MongoDB. Closing this issue for now, since the parent use case is increasingly well provided for; feel free to open other issues for more specific needs that remain unaddressed with the current Google and community offerings. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
this was discussed on https://gitter.im/flutter/flutter
There is a need for a Database for flutter apps, that is easy to get going with.
two options were discussed:
https://github.com/adamlofts/leveldb_dart might be interesting
it looks like it has a binary component to it as well, which might require some integration work
https://github.com/pylaligand/dart-sqlite looks similar
i also found https://github.com/tekartik/sembast.dart
It works with flutter now apparently.
i have not tried it yet.
The text was updated successfully, but these errors were encountered: