(self, try_deactivate: bool = False)
| 2685 | self.connection._commit_impl() |
| 2686 | |
| 2687 | def _close_impl(self, try_deactivate: bool = False) -> None: |
| 2688 | try: |
| 2689 | if self.is_active: |
| 2690 | self._connection_rollback_impl() |
| 2691 | |
| 2692 | if self.connection._nested_transaction: |
| 2693 | self.connection._nested_transaction._cancel() |
| 2694 | finally: |
| 2695 | if self.is_active or try_deactivate: |
| 2696 | self._deactivate_from_connection() |
| 2697 | if self.connection._transaction is self: |
| 2698 | self.connection._transaction = None |
| 2699 | |
| 2700 | assert not self.is_active |
| 2701 | assert self.connection._transaction is not self |
| 2702 | |
| 2703 | def _do_close(self) -> None: |
| 2704 | self._close_impl() |
no test coverage detected