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

Method prepare

lib/sqlalchemy/orm/session.py:1278–1284  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1276 self._state = SessionTransactionState.ACTIVE
1277
1278 def prepare(self) -> None:
1279 if self._parent is not None or not self.session.twophase:
1280 raise sa_exc.InvalidRequestError(
1281 "'twophase' mode not enabled, or not root transaction; "
1282 "can't prepare."
1283 )
1284 self._prepare_impl()
1285
1286 @_StateChange.declare_states(
1287 (SessionTransactionState.ACTIVE,), SessionTransactionState.PREPARED

Callers

nothing calls this directly

Calls 1

_prepare_implMethod · 0.95

Tested by

no test coverage detected