INNER CODE UNIT · Python

get_db

hunvreus/devpush · app/db.py:29

async def get_db():
    async with AsyncSessionLocal() as session:
        try:
            yield session
            await session.commit()
        except Exception:
            await session.rollback()
            raise
        finally:
            await session.close()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…