DuckDB Terminal - v0.2.0
    Preparing search index...

    Class PaginationHandler

    PaginationHandler manages the pagination of large query results

    Index

    Constructors

    Properties

    state: PaginationState = ...

    Methods

    • Execute the paginated query for the current page

      Returns Promise<void>

    • Get current page (1-indexed for display)

      Returns number

    • Get the total number of pages

      Returns number

    • Handle user input during pagination

      Parameters

      • data: string

      Returns Promise<boolean>

      true if the input was handled, false otherwise

    • Check if pagination is currently active

      Returns boolean

    • Show navigation hint

      Returns void

    • Initialize pagination for a query

      Parameters

      • query: string
      • totalRows: number
      • pageSize: number

      Returns void

    • Strip trailing semicolon from SQL for pagination

      Parameters

      • sql: string

      Returns string

    • Check if a query should use pagination

      Parameters

      • sql: string

        The SQL query

      • rowCount: number

        The total row count

      • pageSize: number

        The configured page size (0 = disabled)

      Returns boolean

      Whether pagination should be enabled