-
Notifications
You must be signed in to change notification settings - Fork 34
with-transaction
in Sqlitex
and Sqlitex.Server
#87
Conversation
I think the only downside here is that @ConnorRigby do you know if |
@mmmries Slow functions are a danger here, absolutely. I should have made this more clear in the docs. I'm not using I'm also fine with deprecating |
@ConnorRigby just wanted to check in on this. Do you use |
Sorry for the long wait - Checking right now. |
@mmmries sqlite_ecto2 actually exclusively only uses Sqlitex.Server I'm okay with depreciating the Sqlitex.Server, starting with removing it from the ecto2 adapter. |
Any movement here? I'm in need of the transactions as well. So probably just gonna work of the-kennys fork until this is either merged or otherwise moved forward. |
Note that I also started a new project using DBConnection (the connection pool by Ecto) for SQLite: https://github.com/the-kenny/exqlite
It’s still pretty barebones but builds on a solid and tested base.
… On 20. Feb 2020, at 12:51, Dominic Letz ***@***.***> wrote:
Any movement here? I'm in need of the transactions as well. So probably just gonna work of the-kennys fork until this is either merged or otherwise moved forward.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Sorry for the long delay. @the-kenny could you rebase this off of master? |
@ConnorRigby merging was actually easier, sorry for not doing the rebase :) |
@ConnorRigby now that the conflicts are gone you can use Githubs builtin "Rebase and Merge" or "Squas and merge" and you wont have those ugly merge commits. |
This was expanded upon by #99 |
This adds two new functions:
Sqlitex.with_transaction
andSqlitex.Server.with_transaction
.Sqlitex.with_transaction
runs a given function in a transaction, automatically callingcommit
orrollback
, the latter if an error is raised.Sqlitex.Server.with_transaction
has the same behavior, but runs in the scope of the server process. This assures no other messages can sneak into an open transaction as described in #85