MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / in_transaction

Method in_transaction

lib/sqlalchemy/orm/session.py:1863–1874  ·  view source on GitHub ↗

Return True if this :class:`_orm.Session` has begun a transaction. .. versionadded:: 1.4 .. seealso:: :attr:`_orm.Session.is_active`

(self)

Source from the content-addressed store, hash-verified

1861 yield self
1862
1863 def in_transaction(self) -> bool:
1864 """Return True if this :class:`_orm.Session` has begun a transaction.
1865
1866 .. versionadded:: 1.4
1867
1868 .. seealso::
1869
1870 :attr:`_orm.Session.is_active`
1871
1872
1873 """
1874 return self._transaction is not None
1875
1876 def in_nested_transaction(self) -> bool:
1877 """Return True if this :class:`_orm.Session` has begun a nested

Calls

no outgoing calls