Do we need to wrap calls with RunInTransaction?
Issue #16
closed
Hi,
I've been using the extensions and appreciating it very much. Question: do I need to wrap calls to the functions (e.g. GetWithChildren) with a RunInTransaction(() => ... ) call?
Comments (4)
-
-
More info about SQLite transactions: http://sqlite.org/lang_transaction.html
-
reporter Very helpful Guillermo. Thanks again for writing this extension!
-
- changed status to closed
- Log in to comment
Transactions are only useful for perform batch write operations, so if any of the write operation fails, none of them is applied. For example, SQLite.Net
InsertAll
method wraps allInsert
calls into a transaction, so if any of them fails, no object is inserted. It could make sense wrapping recursive inserts in a transaction, but on the other side, transactions have no effect on read operations.Kind regards.