MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / connection

Method connection

lib/sqlalchemy/engine/base.py:581–604  ·  view source on GitHub ↗

The underlying DB-API connection managed by this Connection. This is a SQLAlchemy connection-pool proxied connection which then has the attribute :attr:`_pool._ConnectionFairy.dbapi_connection` that refers to the actual driver connection. .. seealso::

(self)

Source from the content-addressed store, hash-verified

579
580 @property
581 def connection(self) -> PoolProxiedConnection:
582 """The underlying DB-API connection managed by this Connection.
583
584 This is a SQLAlchemy connection-pool proxied connection
585 which then has the attribute
586 :attr:`_pool._ConnectionFairy.dbapi_connection` that refers to the
587 actual driver connection.
588
589 .. seealso::
590
591
592 :ref:`dbapi_connections`
593
594 """
595
596 if self._dbapi_connection is None:
597 try:
598 return self._revalidate_connection()
599 except (exc.PendingRollbackError, exc.ResourceClosedError):
600 raise
601 except BaseException as e:
602 self._handle_dbapi_exception(e, None, None, None, None)
603 else:
604 return self._dbapi_connection
605
606 def get_isolation_level(self) -> IsolationLevel:
607 """Return the current **actual** isolation level that's present on

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected