diff options
author | mike bayer <mike_mp@zzzcomputing.com> | 2021-09-18 14:00:16 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@ci3.zzzcomputing.com> | 2021-09-18 14:00:16 +0000 |
commit | 955e6bd558e15fa1b0cde9a944d6f53d202d91c2 (patch) | |
tree | 61a64b7361ab0890521771a5d185db787482eaaf /lib/sqlalchemy/ext/asyncio/engine.py | |
parent | c50183274728544e40e7da4fd35cf240da5df656 (diff) | |
parent | 26140c08111da9833dd2eff0b5091494f253db46 (diff) | |
download | sqlalchemy-955e6bd558e15fa1b0cde9a944d6f53d202d91c2.tar.gz |
Merge "Surface driver connection object when using a proxied dialect"
Diffstat (limited to 'lib/sqlalchemy/ext/asyncio/engine.py')
-rw-r--r-- | lib/sqlalchemy/ext/asyncio/engine.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/sqlalchemy/ext/asyncio/engine.py b/lib/sqlalchemy/ext/asyncio/engine.py index ab29438ed..a9e43a65f 100644 --- a/lib/sqlalchemy/ext/asyncio/engine.py +++ b/lib/sqlalchemy/ext/asyncio/engine.py @@ -113,7 +113,6 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): def connection(self): """Not implemented for async; call :meth:`_asyncio.AsyncConnection.get_raw_connection`. - """ raise exc.InvalidRequestError( "AsyncConnection.connection accessor is not implemented as the " @@ -125,9 +124,14 @@ class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable): """Return the pooled DBAPI-level connection in use by this :class:`_asyncio.AsyncConnection`. - This is typically the SQLAlchemy connection-pool proxied connection - which then has an attribute .connection that refers to the actual - DBAPI-level connection. + This is a SQLAlchemy connection-pool proxied connection + which then has the attribute + :attr:`_pool._ConnectionFairy.driver_connection` that refers to the + actual driver connection. Its + :attr:`_pool._ConnectionFairy.dbapi_connection` refers instead + to an :class:`_engine.AdaptedConnection` instance that + adapts the driver connection to the DBAPI protocol. + """ conn = self._sync_connection() |