Execute after a real DBAPI rollback has occurred. Note that this event only fires when the *actual* rollback against the database occurs - it does *not* fire each time the :meth:`.Session.rollback` method is called, if the underlying DBAPI transaction has already bee
(self, session: Session)
| 1891 | """ |
| 1892 | |
| 1893 | def after_rollback(self, session: Session) -> None: |
| 1894 | """Execute after a real DBAPI rollback has occurred. |
| 1895 | |
| 1896 | Note that this event only fires when the *actual* rollback against |
| 1897 | the database occurs - it does *not* fire each time the |
| 1898 | :meth:`.Session.rollback` method is called, if the underlying |
| 1899 | DBAPI transaction has already been rolled back. In many |
| 1900 | cases, the :class:`.Session` will not be in |
| 1901 | an "active" state during this event, as the current |
| 1902 | transaction is not valid. To acquire a :class:`.Session` |
| 1903 | which is active after the outermost rollback has proceeded, |
| 1904 | use the :meth:`.SessionEvents.after_soft_rollback` event, checking the |
| 1905 | :attr:`.Session.is_active` flag. |
| 1906 | |
| 1907 | :param session: The target :class:`.Session`. |
| 1908 | |
| 1909 | """ |
| 1910 | |
| 1911 | def after_soft_rollback( |
| 1912 | self, session: Session, previous_transaction: SessionTransaction |