Introduction

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.

Did this help?

currentPage


currentPagenumberRead-only

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.

JavaScript
Did this help?

items


itemsArray<ResourceQueryResults>Read-only

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.

Perform a query and get the resource catalog items from the result
JavaScript
Did this help?

length


lengthnumberRead-only

Returns the number of items in the current results page.

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.

JavaScript
Did this help?

pageSize


pageSizenumberRead-only

Returns the query page size.

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.

JavaScript
Did this help?

query


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.

JavaScript
Did this help?

totalCount


totalCountnumberRead-only

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.

JavaScript
Did this help?

totalPages


totalPagesnumberRead-only

Returns the total number of pages the query produced.

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.

JavaScript
Did this help?

hasNext( )


Indicates if the query has more results.

Method Declaration
Copy
Request
This method does not take any parameters
Returns
Return Type:boolean
JavaScript
Did this help?

hasPrev( )


Indicates the query has previous results.

Method Declaration
Copy
function hasPrev(): boolean;
Request
This method does not take any parameters
Returns
Return Type:boolean
Get whether the query result object has previous results
JavaScript
let hasPrev = results.hasPrev(); // false
Did this help?