summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/serializer.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2022-10-11 17:01:43 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2022-10-11 19:05:41 -0400
commit4580239b35642045c847c6faac8dd4fe304bb845 (patch)
tree3558ab9d11852a289b69ee424fe6d5fc3fc89f0c /lib/sqlalchemy/ext/serializer.py
parentd4b8b41832267918e74c114c26def5b38d15e9e2 (diff)
downloadsqlalchemy-4580239b35642045c847c6faac8dd4fe304bb845.tar.gz
implement autobegin=False option
Added new parameter :paramref:`_orm.Session.autobegin`, which when set to ``False`` will prevent the :class:`_orm.Session` from beginning a transaction implicitly. The :meth:`_orm.Session.begin` method must be called explicitly first in order to proceed with operations, otherwise an error is raised whenever any operation would otherwise have begun automatically. This option can be used to create a "safe" :class:`_orm.Session` that won't implicitly start new transactions. As part of this change, also added a new status variable :class:`_orm.SessionTransaction.origin` which may be useful for event handling code to be aware of the origin of a particular :class:`_orm.SessionTransaction`. Fixes: #6928 Change-Id: I246f895c4a475bff352216e5bc74b6a25e6a4ae7
Diffstat (limited to 'lib/sqlalchemy/ext/serializer.py')
0 files changed, 0 insertions, 0 deletions