Return the current root transaction in progress, if any. .. versionadded:: 1.4
(self)
| 1842 | return self._nested_transaction is not None |
| 1843 | |
| 1844 | def get_transaction(self) -> Optional[SessionTransaction]: |
| 1845 | """Return the current root transaction in progress, if any. |
| 1846 | |
| 1847 | .. versionadded:: 1.4 |
| 1848 | |
| 1849 | """ |
| 1850 | trans = self._transaction |
| 1851 | while trans is not None and trans._parent is not None: |
| 1852 | trans = trans._parent |
| 1853 | return trans |
| 1854 | |
| 1855 | def get_nested_transaction(self) -> Optional[SessionTransaction]: |
| 1856 | """Return the current nested transaction in progress, if any. |
no outgoing calls