Reputation: 14711
I want to perform a group of several queries to my OrmLite db in Android and I want to make sure that no other thread writes to this table in between two of those queries. How do I use ORMLITE in order to lock/unlock the DB for these few queries?
Upvotes: 1
Views: 476
Reputation: 2947
As I know there no mechanism supported to get a lock explicitly in SQLite and Ormlite, as its maintain its behaviour itself for locking and releasing the database. But you can create Transaction for getting a lock till you are doing something and free it as its over.
For Ormlite transaction you can see this Link
For SQLite transaction you can see this Link
Upvotes: 2