We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 544f22c commit 07ed043Copy full SHA for 07ed043
docs_src/tutorial/cursor_pagination.py
@@ -10,7 +10,7 @@
10
app = FastAPI()
11
add_pagination(app)
12
13
-engine = create_engine("sqlite:///.db", connect_args={"check_same_thread": False})
+engine = create_engine("sqlite:///.db")
14
15
16
class Base(DeclarativeBase):
@@ -55,4 +55,4 @@ def on_startup():
55
@app.get("/users")
56
def get_users() -> CursorPage[UserOut]:
57
with Session(engine) as session:
58
- return paginate(session, select(User))
+ return paginate(session, select(User).order_by(User.id))
0 commit comments