PaginateQueryOptions: {
    filter?: FilterQuery<T>;
    limit: number;
    page: number;
    populate?: PopulateOptions<T>[];
    select?: SelectQuery<T>[];
    sort?: string | Record<string, string | number>;
}

Options for Paginate Query.

Type Parameters

  • T

Type declaration

  • Optionalfilter?: FilterQuery<T>

    Specifies the filter query

  • limit: number

    Specifies the maximum number of records the query will return

  • page: number

    Specifies the page number (1-based)

  • Optionalpopulate?: PopulateOptions<T>[]

    Allows to populate referenced documents using a collection

  • Optionalselect?: SelectQuery<T>[]

    Specifies the fields to select

  • Optionalsort?: string | Record<string, string | number>

    Sets the sort order