diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-12-20 12:48:08 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2022-12-27 16:18:18 -0500 |
commit | 0f7ba068a91cbaa7233315d93d0d8624a6a7930f (patch) | |
tree | 8b6e724144a62c72a749b1ef070fb32d99e2e0dd /lib/sqlalchemy/dialects/postgresql/json.py | |
parent | 6eceb939744e000e627edeabe2da4694fa193eff (diff) | |
download | sqlalchemy-0f7ba068a91cbaa7233315d93d0d8624a6a7930f.tar.gz |
establish explicit join transaction modes
The behavior of "joining an external transaction into a Session" has been
revised and improved, allowing explicit control over how the
:class:`_orm.Session` will accommodate an incoming
:class:`_engine.Connection` that already has a transaction and possibly a
savepoint already established. The new parameter
:paramref:`_orm.Session.join_transaction_mode` includes a series of option
values which can accommodate the existing transaction in several ways, most
importantly allowing a :class:`_orm.Session` to operate in a fully
transactional style using savepoints exclusively, while leaving the
externally initiated transaction non-committed and active under all
circumstances, allowing test suites to rollback all changes that take place
within tests.
Additionally, revised the :meth:`_orm.Session.close` method to fully close
out savepoints that may still be present, which also allows the
"external transaction" recipe to proceed without warnings if the
:class:`_orm.Session` did not explicitly end its own SAVEPOINT
transactions.
Fixes: #9015
Change-Id: I31c22ee0fd9372fa0eddfe057e76544aee627107
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/json.py')
0 files changed, 0 insertions, 0 deletions