MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / prepare

Method prepare

lib/sqlalchemy/engine/base.py:2872–2881  ·  view source on GitHub ↗

Prepare this :class:`.TwoPhaseTransaction`. After a PREPARE, the transaction can be committed.

(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected