Skip to content

feat: add native forward cursor pagination - #164

Open
hadrien wants to merge 5 commits into
mainfrom
feat/cursor-pagination
Open

feat: add native forward cursor pagination#164
hadrien wants to merge 5 commits into
mainfrom
feat/cursor-pagination

Conversation

@hadrien

@hadrien hadrien commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Problem

  • Offset pagination provides no cursor-based continuation.

Solution

  • Add CursorPage, CursorPaginate, and a configurable native SQLAlchemy paginator.
  • Use next_cursor as the only continuation metadata.
  • Support composite ordering, mixed directions, ORM entities, and column projections.
  • Validate typed cursor values before querying.
  • Preserve offset pagination without adding dependencies.
  • Document validated POST searches with pagination, filters, and ordering in JSON.

Next

  • N/A

Bead: fs-i5c

@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.77%. Comparing base (b746622) to head (5d0262e).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #164      +/-   ##
==========================================
+ Coverage   97.74%   98.77%   +1.03%     
==========================================
  Files           1        1              
  Lines         133      245     +112     
  Branches        7       29      +22     
==========================================
+ Hits          130      242     +112     
  Misses          3        3              
Flag Coverage Δ
fastapi-post121 98.77% <100.00%> (+1.03%) ⬆️
fastapi-pre121 98.77% <100.00%> (+1.03%) ⬆️
sqlmodel 98.77% <100.00%> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant