mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-08-14 17:41:37 +08:00
📝 Update docs, use offset
in example with limit
and where
(#273)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@ -43,7 +43,7 @@ def create_heroes():
|
||||
|
||||
def select_heroes():
|
||||
with Session(engine) as session:
|
||||
statement = select(Hero).where(Hero.age > 32).limit(3)
|
||||
statement = select(Hero).where(Hero.age > 32).offset(1).limit(2)
|
||||
results = session.exec(statement)
|
||||
heroes = results.all()
|
||||
print(heroes)
|
||||
|
Reference in New Issue
Block a user