diff options
author | Olly Cope <olly@ollycope.com> | 2022-10-29 16:05:43 +0000 |
---|---|---|
committer | Olly Cope <olly@ollycope.com> | 2022-10-29 16:05:43 +0000 |
commit | 5e66d76c03a4eadb01eb6e88b4480b303a3d9e9e (patch) | |
tree | 30795886930a445c2b8f5a0437c445397e1147f5 /yoyo/backends/core/postgresql.py | |
parent | 236b839acc6c7a20cb30cd84985f3ece725a6939 (diff) | |
download | yoyo-5e66d76c03a4eadb01eb6e88b4480b303a3d9e9e.tar.gz |
transaction handling: replace confusing rollback method with function argument
This code:
with backend.transaction() as transaction:
transaction.rollback()
...
Looks like it rolls back the connection at the start of the block - but
that's not what is actually happening. The code becomes much clearer with this
change:
with backend.transaction(rollback_on_exit=True):
...
Diffstat (limited to 'yoyo/backends/core/postgresql.py')
0 files changed, 0 insertions, 0 deletions