MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / raw_connection

Method raw_connection

lib/sqlalchemy/engine/base.py:3262–3284  ·  lib/sqlalchemy/engine/base.py::Engine.raw_connection

Return a "raw" DBAPI connection from the connection pool. The returned object is a proxied version of the DBAPI connection object used by the underlying driver in use. The object will have all the same behavior as the real DBAPI connection, except that its ``close()`

(self)

Source from the content-addressed store, hash-verified

3260 return self._connection_cls(self)
3261
3262 def raw_connection(self) -> PoolProxiedConnection:
3263 class="st">""class="st">"Return a "raw" DBAPI connection from the connection pool.
3264
3265 The returned object is a proxied version of the DBAPI
3266 connection object used by the underlying driver in use.
3267 The object will have all the same behavior as the real DBAPI
3268 connection, except that its ``close()`` method will result in the
3269 connection being returned to the pool, rather than being closed
3270 for real.
3271
3272 This method provides direct DBAPI connection access for
3273 special situations when the API provided by
3274 :class:`_engine.Connection`
3275 is not needed. When a :class:`_engine.Connection` object is already
3276 present, the DBAPI connection is available using
3277 the :attr:`_engine.Connection.connection` accessor.
3278
3279 .. seealso::
3280
3281 :ref:`dbapi_connections`
3282
3283 class="st">"""
3284 return self.pool.connect()
3285
3286
3287class OptionEngineMixin(log.Identified):

Callers 9

__init__Method · 0.45
test_cursor_iterableMethod · 0.45
test_dbapi_terminateMethod · 0.45
_test_dbapi_rawFunction · 0.45
_test_dbapi_rawFunction · 0.45

Calls 1

connectMethod · 0.45