summaryrefslogtreecommitdiff
path: root/doc/build/errors.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/errors.rst')
-rw-r--r--doc/build/errors.rst28
1 files changed, 28 insertions, 0 deletions
diff --git a/doc/build/errors.rst b/doc/build/errors.rst
index 5081928dd..4058b06ea 100644
--- a/doc/build/errors.rst
+++ b/doc/build/errors.rst
@@ -1265,6 +1265,34 @@ attempt, which is unsupported when using SQLAlchemy with AsyncIO dialects.
:ref:`asyncio_orm_avoid_lazyloads` - covers most ORM scenarios where
this problem can occur and how to mitigate.
+.. _error_xd3s:
+
+No Inspection Avaliable
+-----------------------
+
+Using the :func:`_sa.inspect` function directly on an
+:class:`_asyncio.AsyncConnection` or :class:`_asyncio.AsyncEngine` object is
+not currently supported, as there is not yet an awaitable form of the
+:class:`_reflection.Inspector` object available. Instead, the object
+is used by acquiring it using the
+:func:`_sa.inspect` function in such a way that it refers to the underlying
+:attr:`_asyncio.AsyncConnection.sync_connection` attribute of the
+:class:`_asyncio.AsyncConnection` object; the :class:`_engine.Inspector` is
+then used in a "synchronous" calling style by using the
+:meth:`_asyncio.AsyncConnection.run_sync` method along with a custom function
+that performs the desired operations::
+
+ async def async_main():
+ async with engine.connect() as conn:
+ tables = await conn.run_sync(
+ lambda sync_conn: inspect(sync_conn).get_table_names()
+ )
+
+.. seealso::
+
+ :ref:`asyncio_inspector` - additional examples of using :func:`_sa.inspect`
+ with the asyncio extension.
+
Core Exception Classes
======================