MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _begin_impl

Method _begin_impl

lib/sqlalchemy/engine/base.py:1104–1124  ·  view source on GitHub ↗
(self, transaction: RootTransaction)

Source from the content-addressed store, hash-verified

1102 return self._nested_transaction
1103
1104 def _begin_impl(self, transaction: RootTransaction) -> None:
1105 if self._echo:
1106 if self._is_autocommit_isolation():
1107 self._log_info(
1108 "BEGIN (implicit; DBAPI should not BEGIN due to "
1109 "autocommit mode)"
1110 )
1111 else:
1112 self._log_info("BEGIN (implicit)")
1113
1114 self.__in_begin = True
1115
1116 if self._has_events or self.engine._has_events:
1117 self.dispatch.begin(self)
1118
1119 try:
1120 self.engine.dialect.do_begin(self.connection)
1121 except BaseException as e:
1122 self._handle_dbapi_exception(e, None, None, None, None)
1123 finally:
1124 self.__in_begin = False
1125
1126 def _rollback_impl(self) -> None:
1127 if self._has_events or self.engine._has_events:

Callers 1

Calls 5

_log_infoMethod · 0.95
beginMethod · 0.45
do_beginMethod · 0.45

Tested by

no test coverage detected