When you execute a query with the find()
function, it returns a Promise that resolves to a ResourceCatalogQueryResult
object.
This object contains the items that match the query, information about the
query itself, and functions for paging through the query results.
Returns the index of the current results page number.
The currentPage
is a zero-based index of the current page of results.
The page size is defined by the limit()
function, can be retrieved using the pageSize
property, and
navigating through pages is done with the prev()
and
next()
functions.
The currentPage
property returns undefined
if the query returned no results.
Returns an array of resources, slugs, and schedules that match the query.
The current page of resources, slugs, and schedules retrieved by the query.
The page size is defined by the limit()
function, can be retrieved using the pageSize
property, and
navigating through pages is done with the prev()
and
next()
functions.
When no items match the query, the array is empty.
Returns the ResourceCatalogQueryBuilder object used to get the current results.
Use the query
property to create and run a new query by chaining additional ResourceCatalogQueryBuilder
functions to it. You can only filter on properties that have not already been used in the previous query.
Returns the total number of items that match the query.
The totalCount
returns the total number of items that match the query,
not just the number of items in the current page.
Indicates if the query has more results.
Indicates the query has previous results.
function hasPrev(): boolean;
let hasPrev = results.hasPrev(); // false