Prepare this :class:`.TwoPhaseTransaction`. After a PREPARE, the transaction can be committed.
(self)
| 2870 | super().__init__(connection) |
| 2871 | |
| 2872 | def prepare(self) -> None: |
| 2873 | """Prepare this :class:`.TwoPhaseTransaction`. |
| 2874 | |
| 2875 | After a PREPARE, the transaction can be committed. |
| 2876 | |
| 2877 | """ |
| 2878 | if not self.is_active: |
| 2879 | raise exc.InvalidRequestError("This transaction is inactive") |
| 2880 | self.connection._prepare_twophase_impl(self.xid) |
| 2881 | self._is_prepared = True |
| 2882 | |
| 2883 | def _connection_begin_impl(self) -> None: |
| 2884 | self.connection._begin_twophase_impl(self) |
nothing calls this directly
no test coverage detected