Querydeck Docs
  • 👋Welcome to Query Deck
  • Getting Started
    • 😃Get Started With QueryDeck
      • Quickstart With QueryDeck
    • How It Works?
  • REST
    • Select Method
      • Joins
      • Sorting
        • Ascending/ Descending ordering
        • Dynamic Sorting
      • Filter
        • Dynamic Filtering
        • Groups
        • Exists clause
      • Pagination
        • Offset
        • Limit
    • Insert/Upsert Method
      • Nested Inserts (Joins)
      • Conflicting Columns
    • Update Method
      • Filters
    • Delete Method
    • Authentication
    • Authorization
    • Select by Id
  • GraphQL
    • Introduction to GraphQL in QueryDeck
    • Enabling GraphQL for Columns in QueryDeck
  • Testing Endpoints
Powered by GitBook
On this page
  1. REST
  2. Select Method

Pagination

Pagination allows you to efficiently retrieve or manage large datasets by breaking them into smaller chunks (pages). It improves performance and usability for queries involving a substantial amount of data.

How Pagination Works

Pagination is achieved by combining limit and offset parameters:

  • Limit: Defines the maximum number of rows to retrieve.

  • Offset: Specifies the starting point for data retrieval, effectively skipping the first offset rows.

By using these parameters together, you can implement pagination to load data page by page.

Example Use Case

Imagine a customer list with 1000 entries. To retrieve them in pages of 10:

  • Page 1: limit: 10, offset: 0 (Rows 1-10)

  • Page 2: limit: 10, offset: 10 (Rows 11-20)

  • Page 3: limit: 10, offset: 20 (Rows 21-30)

PreviousExists clauseNextOffset

Last updated 4 months ago