MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / remove

Method remove

lib/sqlalchemy/ext/asyncio/scoping.py:214–224  ·  view source on GitHub ↗

Dispose of the current :class:`.AsyncSession`, if present. Different from scoped_session's remove method, this method would use await to wait for the close method of AsyncSession.

(self)

Source from the content-addressed store, hash-verified

212 self.session_factory.configure(**kwargs)
213
214 async def remove(self) -> None:
215 """Dispose of the current :class:`.AsyncSession`, if present.
216
217 Different from scoped_session's remove method, this method would use
218 await to wait for the close method of AsyncSession.
219
220 """
221
222 if self.registry.has():
223 await self.registry().close()
224 self.registry.clear()
225
226 # START PROXY METHODS async_scoped_session
227

Callers 1

Calls 4

registryMethod · 0.80
hasMethod · 0.45
closeMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected