add sqladmin (#32)

This commit is contained in:
Dmitry Afanasyev
2023-10-11 02:05:02 +03:00
committed by GitHub
parent e9f76d0ea9
commit 7cd0f30c55
7 changed files with 211 additions and 108 deletions

View File

@@ -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()