Asynchronously perform database operations on queue, using transactions.#469
Asynchronously perform database operations on queue, using transactions.#469sunilsharma08 wants to merge 2 commits into
Conversation
|
What's the advantage of putting this in FMDB, vs just throwing it in a background block? (PS- what's the point of the FMDBRetain & FMDBRelease outside the block?) |
|
FWIW, I second the vote that there should be an asynchronous rendition of My only question (setting aside the |
|
I'm actually for an async method as well (as it's planned for 3.0: https://github.com/ccgus/fmdb/blob/three/FUTURE_PLANS.markdown ) I asked the question because I was curious. 3.0 has taken a backseat in my free time lately though. I had hoped to get something going last Dec, but it just didn't happen. Maybe this should be part of 2.x, because I don't know when 3 will happen? |
My intention to add asynchronous method is to provide non blocking database operation even when working with large records.
I put the
It will be more appropriate to give both option to perform database operations either synchronously or asynchronously.Let the developer to choose which one is better for the task. |
|
FWIW, I've just added async transactions to the three branch: Discussion on it here: |
Synchronous transaction on queue hangs ui if some insertion/updation is performed on large no of rows.
To avoid ui hang because of synchronous transaction I have added a method named "inTransactionAsync" which perform database operations asynchronously.