Skip to content

Commit e5fb670

Browse files
authored
chore(doc): use valid example in doc (#38)
1 parent 941c9d2 commit e5fb670

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def example(session: Session = Depends()):
9090

9191
@router.get("/async_example")
9292
async def async_example(session: AsyncSession = Depends()):
93-
return await session.execute("SELECT now()").scalar()
93+
return await session.scalar("SELECT now()")
9494
```
9595

9696
#### Using a context manager
@@ -121,7 +121,7 @@ def run_bg():
121121

122122
async def run_async_bg():
123123
async with asyncio_support.open_session() as session:
124-
await session.execute("SELECT now()").scalar()
124+
await session.scalar("SELECT now()")
125125
```
126126

127127
### Pagination

0 commit comments

Comments
 (0)