Rollback the current transaction in progress. If no transaction is in progress, this method is a pass-through. The method always rolls back the topmost database transaction, discarding any nested transactions that may be in progress. .. seealso::
(self)
| 1976 | return self.begin(nested=True) |
| 1977 | |
| 1978 | def rollback(self) -> None: |
| 1979 | """Rollback the current transaction in progress. |
| 1980 | |
| 1981 | If no transaction is in progress, this method is a pass-through. |
| 1982 | |
| 1983 | The method always rolls back |
| 1984 | the topmost database transaction, discarding any nested |
| 1985 | transactions that may be in progress. |
| 1986 | |
| 1987 | .. seealso:: |
| 1988 | |
| 1989 | :ref:`session_rollback` |
| 1990 | |
| 1991 | :ref:`unitofwork_transaction` |
| 1992 | |
| 1993 | """ |
| 1994 | if self._transaction is None: |
| 1995 | pass |
| 1996 | else: |
| 1997 | self._transaction.rollback(_to_root=True) |
| 1998 | |
| 1999 | def commit(self) -> None: |
| 2000 | """Flush pending changes and commit the current transaction. |
no outgoing calls