Perfect SQLite for Flutter #3
Replies: 3 comments
-
Thanks for the feedback! My thoughts:
I think it would be great to have some collaboration with |
Beta Was this translation helpful? Give feedback.
-
It might also be worth looking at what SQFlite does to manage connections and isolates. I can throw multiple queries at it recursively and it quickly executes them all and never complains. sqlite3 also manages to do this on its single thread (at the risk of potential UI stuttering). I implemented the fix in #4 and still get connection exceptions because I'm doing ~30 transactions in quick succession. The use case is downloading a bunch of records from a server and populating my local database. But the records get fed at unpredictable intervals based on whenever my HTTP fetches complete. Food for thought. 😄 Thanks for your help! 🙏🏼 |
Beta Was this translation helpful? Give feedback.
-
Sqflite doesn't manage multiple connections and isolates - it only supports a single concurrent transaction, and only from the main isolate. This library uses multiple connections in separate isolates to achieve concurrent read transactions, and also allows you to pass a connection to a separate isolate. Since it's so new it's possible that there are some underlying bugs, but I haven't been able to reproduce the issue you mentioned. Could you open a new issue with the error message you're getting, and some sample code (even if you can't share everything)? |
Beta Was this translation helpful? Give feedback.
-
I just wanted to say thank you for this package. In my opinion, it's exactly what 95% of Flutter devs need for SQLite, but they just don't know it yet.
As a Flutter dev, I want:
build_runner
to renderpart
files, etc.).You've done exactly that, so thank you!
A couple other thoughts:
I wonder if you should talk to the author of SQLite3 and just merge all your isolate management goodness into it so that more people can know about it.
I'll post my thoughts on Flutter's Reddit channel as well in hopes of spreading the word about your package.
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions