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)
| 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 | |
| 3287 | class OptionEngineMixin(log.Identified): |