Undocumented
Class | AsyncSession |
Asyncio version of _orm.Session . |
Class | AsyncSessionTransaction |
A wrapper for the ORM _orm.SessionTransaction object. |
Class | _AsyncSessionContextManager |
Undocumented |
Function | async_object_session |
Return the _asyncio.AsyncSession to which the given instance belongs. |
Function | async_session |
Return the _asyncio.AsyncSession which is proxying the given _orm.Session object, if any. |
Constant | _EXECUTE_OPTIONS |
Undocumented |
Constant | _STREAM_OPTIONS |
Undocumented |
Return the _asyncio.AsyncSession
to which the given instance
belongs.
This function makes use of the sync-API function
_orm.object_session
to retrieve the _orm.Session
which
refers to the given instance, and from there links it to the original
_asyncio.AsyncSession
.
If the _asyncio.AsyncSession
has been garbage collected, the
return value is None.
This functionality is also available from the
_orm.InstanceState.async_session
accessor.
Parameters | |
instance | an ORM mapped instance |
Returns | |
an _asyncio.AsyncSession object, or None. |