MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / connect

Method connect

lib/sqlalchemy/pool/impl.py:438–449  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

436 return c
437
438 def connect(self) -> PoolProxiedConnection:
439 # vendored from Pool to include the now removed use_threadlocal
440 # behavior
441 try:
442 rec = cast(_ConnectionFairy, self._fairy.current())
443 except AttributeError:
444 pass
445 else:
446 if rec is not None:
447 return rec._checkout_existing()
448
449 return _ConnectionFairy._checkout(self, self._fairy)
450
451
452class StaticPool(Pool):

Calls 3

_checkout_existingMethod · 0.80
_checkoutMethod · 0.80
castFunction · 0.50