mirror of
https://github.com/Balshgit/gpt_chat_bot.git
synced 2025-12-16 21:20:39 +03:00
add sqladmin (#32)
This commit is contained in:
@@ -51,6 +51,10 @@ class Database:
|
||||
session.commit()
|
||||
session.close()
|
||||
|
||||
@property
|
||||
def async_engine(self) -> AsyncEngine:
|
||||
return self._async_engine
|
||||
|
||||
@asynccontextmanager
|
||||
async def session(self) -> AsyncGenerator[AsyncSession, None]:
|
||||
session: AsyncSession = self._async_session_factory()
|
||||
|
||||
Reference in New Issue
Block a user