items


itemsArray<Item>Read-only

Returns the items that match the query.

The current page of items 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 items array is empty.

Perform a query and get the public pricing plan 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 query used to get the current results.

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
Request
This method does not take any parameters
Returns
Return Type:boolean
Get the previous page of a query result
JavaScript
Did this help?

next( )


Retrieves the next page of query results.

The next() function retrieves the next page of query 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.

If items are added or removed between calls to next() the values returned by PublicPlansQueryResult may change.

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

prev( )


Retrieves the previous page of query results.

The prev() function retrieves the previous page of query 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.

If items are added or removed between calls to prev() the values returned may change.

Method Declaration
Copy
function prev(): Promise<PublicPlansQueryResult>;
Request
This method does not take any parameters
Returns
Return Type:Promise<PublicPlansQueryResult>
Get the previous page of a query result
JavaScript
oldResults .prev() .then((results) => { const newResults = results; const items = newResults.items; const firstItem = items[0]; const totalCount = newResults.totalCount; const pageSize = newResults.pageSize; const currentPage = newResults.currentPage; const totalPages = newResults.totalPages; const hasNext = newResults.hasNext(); const hasPrev = newResults.hasPrev(); const length = newResults.length; const query = newResults.query; }) .catch((error) => { const queryError = error; });
Did this help?