INNER CODE UNIT · Python
Connection
Xeron2000/openOii · backend/aiosqlite/__init__.py:126
class Connection:
# SQLAlchemy sets this attribute on the object returned by connect().
daemon: bool = False
def __init__(self, connector) -> None:
self._connector = connector
self._conn: sqlite3.Connection | None = None
def __await__(self):
return self._open().__await__()
async def __aenter__(self) -> "Connection":
return await self._open()
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None:
await self.close()
async def _open(self) -> "Connection":