Reputation: 133
I'm currently developing an Android app with ORMLite.
My problem is that i have to do big database transaction in the background while the user wants to read some data from the database. The unacceptable result is that the app does not respond until the transaction is finished.
I have read many about transactions and ORMLite now but I am still not sure how to solve the problem. I think that i want do a "non-exclusive" transaction (or also called "immediate mode").
If this is right, how can i do such an transaction with ORMLite?
Upvotes: 2
Views: 363
Reputation: 133
After spending 2 days reading documentations and blogs I found the answer!
It just one method call on the SQLiteDatabase which does the job:
enableWriteAheadLogging()
That's it. Now I can read and write simultaneously.
For more information have a look at SQLite simultaneous reading and writing
Upvotes: 1