MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / remove

Method remove

lib/sqlalchemy/ext/asyncio/scoping.py:206–216  ·  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

204 self.session_factory.configure(**kwargs)
205
206 async def remove(self) -> None:
207 """Dispose of the current :class:`.AsyncSession`, if present.
208
209 Different from scoped_session's remove method, this method would use
210 await to wait for the close method of AsyncSession.
211
212 """
213
214 if self.registry.has():
215 await self.registry().close()
216 self.registry.clear()
217
218 # START PROXY METHODS async_scoped_session
219

Callers 1

Calls 4

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

Tested by

no test coverage detected