MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _rollback_twophase_impl

Method _rollback_twophase_impl

lib/sqlalchemy/engine/base.py:1214–1225  ·  view source on GitHub ↗
(self, xid: Any, is_prepared: bool)

Source from the content-addressed store, hash-verified

1212 self._handle_dbapi_exception(e, None, None, None, None)
1213
1214 def _rollback_twophase_impl(self, xid: Any, is_prepared: bool) -> None:
1215 if self._has_events or self.engine._has_events:
1216 self.dispatch.rollback_twophase(self, xid, is_prepared)
1217
1218 if self._still_open_and_dbapi_connection_is_valid:
1219 assert isinstance(self._transaction, TwoPhaseTransaction)
1220 try:
1221 self.engine.dialect.do_rollback_twophase(
1222 self, xid, is_prepared
1223 )
1224 except BaseException as e:
1225 self._handle_dbapi_exception(e, None, None, None, None)
1226
1227 def _commit_twophase_impl(self, xid: Any, is_prepared: bool) -> None:
1228 if self._has_events or self.engine._has_events:

Callers 1

Calls 3

rollback_twophaseMethod · 0.80
do_rollback_twophaseMethod · 0.45

Tested by

no test coverage detected