MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / __init__

Method __init__

lib/sqlalchemy/engine/base.py:2774–2782  ·  view source on GitHub ↗
(self, connection: Connection)

Source from the content-addressed store, hash-verified

2772 _savepoint: str
2773
2774 def __init__(self, connection: Connection):
2775 assert connection._transaction is not None
2776 if connection._trans_context_manager:
2777 TransactionalContext._trans_ctx_check(connection)
2778 self.connection = connection
2779 self._savepoint = self.connection._savepoint_impl()
2780 self.is_active = True
2781 self._previous_nested = connection._nested_transaction
2782 connection._nested_transaction = self
2783
2784 def _deactivate_from_connection(self, warn: bool = True) -> None:
2785 if self.connection._nested_transaction is self:

Callers

nothing calls this directly

Calls 2

_trans_ctx_checkMethod · 0.80
_savepoint_implMethod · 0.80

Tested by

no test coverage detected