now Db works like it did

This commit is contained in:
AF 2022-11-01 03:36:43 +00:00
parent 4a67e2421a
commit 632569a135

View File

@ -301,3 +301,10 @@ class Db(DbFactory, DbConnection):
def __init__(self, path: str | pathlib.Path, *, kvrequest_type: Type[KVRequest], buffersize=1048576): def __init__(self, path: str | pathlib.Path, *, kvrequest_type: Type[KVRequest], buffersize=1048576):
DbFactory.__init__(self, path, kvrequest_type=kvrequest_type, buffersize=buffersize) DbFactory.__init__(self, path, kvrequest_type=kvrequest_type, buffersize=buffersize)
DbConnection.__init__(self, self) DbConnection.__init__(self, self)
async def __aenter__(self):
await self._initialize()
return self
async def __aexit__(self, exc_type, exc_val, exc_tb):
await self.aclose()