Introduction

When you execute a query with the find() function, it returns a Promise that resolves to a ContactsQueryResult 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?

items


itemsArray<Contact>Read-only

Returns the items that match the query.

The current page of items retrieved by the query.

List of contacts.

Note: When no items match the query, the items array is empty.

To paginate your query results, use the ContactsQueryResult pagination properties and functions.

Perform a query and get the returned 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


queryContactsQueryBuilderRead-only

Returns the ContactsQueryBuilder object used to get the current results.

Use the query property to create and run a new query by chaining additional ContactsQueryBuilder functions to it.

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 if 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?