databases icon indicating copy to clipboard operation
databases copied to clipboard

Transactions error

Open jiangshujsf opened this issue 5 years ago • 3 comments

https://www.encode.io/databases/connections_and_transactions/ For a lower-level transaction API:

transaction = await database.transaction()
try:
    await transaction.start()
    ...
except:
    await transaction.rollback()
else:
    await transaction.commit()

it's unable work nomaly

but in https://www.starlette.io/database/ After reomve 'await transaction.start()',it's working

jiangshujsf avatar Feb 17 '21 13:02 jiangshujsf

Also happen on my case @jiangshujsf

using

databases==0.2.6
Python 3.8.7

rollback and commit works after removing
await transaction.start()

adiferd avatar Feb 18 '21 14:02 adiferd

I also can confirm that rollback and commit works fine after removing await transaction.start()

mrsakkaro avatar Apr 27 '21 05:04 mrsakkaro

I can't reproduce this with databases==0.5.1, python3.8 and postgresql. If this still exists please create another issue.

aminalaee avatar Sep 03 '21 06:09 aminalaee