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

Method __init__

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

Source from the content-addressed store, hash-verified

2654 __slots__ = ("connection", "is_active")
2655
2656 def __init__(self, connection: Connection):
2657 assert connection._transaction is None
2658 if connection._trans_context_manager:
2659 TransactionalContext._trans_ctx_check(connection)
2660 self.connection = connection
2661 self._connection_begin_impl()
2662 connection._transaction = self
2663
2664 self.is_active = True
2665
2666 def _deactivate_from_connection(self) -> None:
2667 if self.is_active:

Callers

nothing calls this directly

Calls 2

_trans_ctx_checkMethod · 0.80

Tested by

no test coverage detected