Closed avkhozov closed 7 years ago
Why only isolation level? Deferred mode is every bit as useful and there are others listed here: https://www.postgresql.org/docs/current/static/sql-set-transaction.html
I do like the idea of making it easier to set transaction properties but it also shouldn't be some at the expense of others.
I think until we all agree that this is definitely the right thing to do, it might be best to stick closely to vanilla DBD::Pg
behavior.
@jberger i think need to see on this page https://www.postgresql.org/docs/9.5/static/sql-begin.html because it should be read like this:
begin transaction isolation level serializable
@jberger, oh, i missed DEFERRABLE mode
Afraid it looks like this pull request did not get the required votes.
Summary
When you need to specify a custom transaction isolation level you have to write additional code. Like this:
Useful when there is a helper in
Mojo::Pg::Database
:Also in such cases, the query
set transaction
must be first in this transaction, so it is more logical to put this query inMojo::Pg::Transaction
.