Retree - v1.0.0
    Preparing search index...

    Interface PaginationOptions

    The options passed to OrderedQuery.paginate.

    To use this type in argument validation, use the paginationOptsValidator.

    interface PaginationOptions {
        cursor: string | null;
        endCursor?: string | null;
        maximumBytesRead?: number;
        maximumRowsRead?: number;
        numItems: number;
    }
    Index

    Properties

    cursor: string | null

    A Cursor representing the start of this page or null to start at the beginning of the query results.

    endCursor?: string | null

    A Cursor representing the end of this page or null | undefined to use numItems instead.

    This explicitly sets the range of documents the query will return, from cursor to endCursor. It's used by reactive pagination clients to ensure there are no gaps between pages when data changes, and to split pages when pageStatus indicates a split is recommended or required.

    When splitting a page, use the returned splitCursor as endCursor for the first half and as cursor for the second half.

    maximumBytesRead?: number

    The maximum number of bytes to read from the database during pagination.

    This limits bytes entering the query pipeline before filters are applied. Use this to control bandwidth usage when documents are large. If the limit is reached, the query may return an incomplete page and require a page split.

    Currently this is not enforced for search queries.

    maximumRowsRead?: number

    The maximum number of rows to read from the database during pagination.

    This limits rows entering the query pipeline before filters are applied. Use this when filtering for rare items, where low numItems won't bound execution time because the query scans many rows to find matches.

    Currently this is not enforced for search queries.

    numItems: number

    Number of items to load in this page of results.

    Note: This is only an initial value!

    If you are running this paginated query in a reactive query function, you may receive more or less items than this if items were added to or removed from the query range.