Closed RomainFranceschini closed 7 months ago
This seems ok, thank you for the PR. If all goes well I will release today or tomorrow
After looking it to it further I will probably change this a bit once merged to do not affect existing users, i.e. I will make it an opt-in feature the outcome will be the same but with a slightly different API. I will update here once done
Added two new methods:
You can use them to create a background isolate and thus achieve the same that you were proposing with your PR. It was released on the 5.1.0 version of stash_sqlite
Great, thank you
Is your feature request related to a problem? Please describe. As sqlite3 is a synchronous C library, accessing the database from the main isolate can cause blocking IO operations
Describe the solution you'd like drift can spawn a long-running isolate to run SQL statements using
NativeDatabase.createInBackground
instead of the default NativeDatabase constructor.Describe alternatives you've considered None
Additional context https://drift.simonbinder.eu/docs/advanced-features/isolates/