INNER CODE UNIT · Python
__aexit__
Xeron2000/openOii · backend/aiosqlite/__init__.py:140
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
await self.close()
async def _open(self) -> "Connection":
await asyncio.sleep(0)
if self._conn is None:
self._conn = self._connector()
return self
async def cursor(self, *args: Any, **kwargs: Any) -> Cursor:
await asyncio.sleep(0)
await self._open()
return Cursor(self)
async def create_function(self, *args: Any, **kwargs: Any) -> None:
await asyncio.sleep(0)
await self._open()
assert self._conn is not None