typing
This commit is contained in:
parent
6daedc3dee
commit
8a209a729c
1 changed files with 1 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue