This commit is contained in:
Yusur 2025-07-31 23:14:16 +02:00
parent 6daedc3dee
commit 8a209a729c

View file

@ -37,7 +37,7 @@ class SQLAlchemy:
self.engine = None
def bind(self, url: str):
self.engine = create_async_engine(url)
async def begin(self):
async def begin(self) -> Session:
if self.engine is None:
raise RuntimeError('database is not connected')
return await self.engine.begin()