INNER CODE UNIT · Python

__aexit__

Xeron2000/openOii · backend/aiosqlite/__init__.py:46

    async def __aexit__(self, exc_type, exc, tb) -> None:
        await self.close()

    async def _ensure_cursor(self) -> None:
        await asyncio.sleep(0)
        await self._conn._open()
        if self._cursor is None:
            assert self._conn._conn is not None
            self._cursor = self._conn._conn.cursor()

    async def close(self) -> None:
        await asyncio.sleep(0)
        if self._closed:
            return
        self._closed = True
        if self._cursor is not None:
            self._cursor.close()
            self._cursor = None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…