interface WeivDataQueryResult<CItem> {
    _filters: any;
    _pipeline?: PipelineStage[];
    currentPage: number;
    items: CItem[];
    length: number;
    pageSize: number;
    totalCount: number;
    totalPages: number;
    hasNext(): boolean;
    hasPrev(): boolean;
    next(): Promise<WeivDataQueryResult<CItem>>;
    prev(): Promise<WeivDataQueryResult<CItem>>;
}

Type Parameters

  • CItem

Properties

_filters: any

Filters applied to query.

_pipeline?: PipelineStage[]

Pipeline of aggregation if used if not undefined.

currentPage: number

Returns the index of the current results page number.

items: CItem[]

Returns the items that match the query.

length: number

Returns the number of items in the current results page.

pageSize: number

Returns the query page size.

totalCount: number

Returns the total number of items that match the query.

totalPages: number

Returns the total number of pages the query produced. (will be deleted in v5 doesn't work correctly)

Methods

  • Returns boolean

    Indicates if the query has more results.

  • Returns boolean

    Indicates the query has previous results.