feat: add include_total flag to offset pagination to skip COUNT query (#158)

This commit is contained in:
d3vyce
2026-03-21 15:16:22 +01:00
committed by GitHub
parent 6d6fae5538
commit f8c9bf69fe
6 changed files with 146 additions and 23 deletions

View File

@@ -98,13 +98,14 @@ class OffsetPagination(PydanticBase):
"""Pagination metadata for offset-based list responses.
Attributes:
total_count: Total number of items across all pages
total_count: Total number of items across all pages.
``None`` when ``include_total=False``.
items_per_page: Number of items per page
page: Current page number (1-indexed)
has_more: Whether there are more pages
"""
total_count: int
total_count: int | None
items_per_page: int
page: int
has_more: bool