Skip to content

2.1.4

Choose a tag to compare

@krylosov-aa krylosov-aa released this 28 Nov 22:37
· 26 commits to main since this release

atomic_db_session

There are several options that define how the function will handle
an already open transaction.
current_transaction:
"commit" - commits the open transaction and starts a new one
"rollback" - rolls back the open transaction and starts a new one
"append" - continues using the current transaction and commits it
"raise" - raises an InvalidRequestError

set_test_context

Use auto_close=False if you’re using a test session and transaction
that you close manually elsewhere in your code.

Use auto_close=True if, for example, you want to call a
function in a test that uses a context bypassing the
middleware, and you want all sessions to be closed automatically.