tiangolo / full-stack-fastapi-template

Full stack, modern web application template. Using FastAPI, React, SQLModel, PostgreSQL, Docker, GitHub Actions, automatic HTTPS and more.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Paginated Database Query with Schema and Total Count

FredericoIsaac opened this issue · comments

Problem Statement:
Currently, our application lacks the functionality to paginate database queries with skip and limit while also returning the schema of the queried table and the total count of records matching the query. This feature is essential for improving the user experience and providing a more comprehensive response to API clients.

The API response should include the following components:

Data: The paginated records based on the provided skip and limit parameters.
Schema: The schema or structure of the queried table to help clients understand the data.
Total Count: The total count of records that match the query, regardless of pagination.