INNER CODE UNIT · Python

_ensure_cursor

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

    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

    async def execute(self, operation: Any, parameters: Optional[Sequence[Any]] = None) -> Any:
        await self._ensure_cursor()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…