Setu-TS
    Preparing search index...

    Function mintNextCursor

    • Mint the next-page cursor from the last row of a non-terminal page.

      The cursor is only ever produced when hasMore is true AND the page is non-empty: on a terminal page there is no next row to continue to, and reading the ordered/key values off an empty page would crash on the missing last row.

      Parameters

      • pageRows: readonly Record<string, unknown>[]

        The rows of the page about to be returned (empty is fine)

      • orderBy: Readonly<Record<string, OrderDirection>>

        The resolved sort specification

      • keyColumns: readonly string[]

        The primary-key columns for cursor minting

      • fingerprint: string

        The sort fingerprint to embed in the cursor

      • hasMore: boolean

        Whether a further page exists

      Returns string | null

      The encoded cursor, or null when the page is terminal

      0.2.0