MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / connect

Method connect

lib/sqlalchemy/pool/base.py:440–448  ·  view source on GitHub ↗

Return a DBAPI connection from the pool. The connection is instrumented such that when its ``close()`` method is called, the connection will be returned to the pool.

(self)

Source from the content-addressed store, hash-verified

438 raise NotImplementedError()
439
440 def connect(self) -> PoolProxiedConnection:
441 """Return a DBAPI connection from the pool.
442
443 The connection is instrumented such that when its
444 ``close()`` method is called, the connection will be returned to
445 the pool.
446
447 """
448 return _ConnectionFairy._checkout(self)
449
450 def _return_conn(self, record: ConnectionPoolEntry) -> None:
451 """Given a _ConnectionRecord, return it to the :class:`_pool.Pool`.

Calls 1

_checkoutMethod · 0.80