MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / in_transaction

Method in_transaction

lib/sqlalchemy/orm/session.py:1822–1833  ·  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

1820 yield self
1821
1822 def in_transaction(self) -> bool:
1823 """Return True if this :class:`_orm.Session` has begun a transaction.
1824
1825 .. versionadded:: 1.4
1826
1827 .. seealso::
1828
1829 :attr:`_orm.Session.is_active`
1830
1831
1832 """
1833 return self._transaction is not None
1834
1835 def in_nested_transaction(self) -> bool:
1836 """Return True if this :class:`_orm.Session` has begun a nested

Calls

no outgoing calls