Returns the index of the current page of results.
currentPage
is a zero-based index of the current page of results, meaning the 1st page is 0
, the 2nd page is 1
, and so on.
If no results match the query, currentPage
is undefined.
The page size is defined by the limit()
function and can be retrieved using the pageSize
property. You can use the next()
and prev()
functions returned by activityCounters
to navigate the pages of a query result.
const resultPage = results.currentPage;
const hasNext = results.hasNext();
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
const hasPrev = results.hasPrev();
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
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 and can be retrieved using the pageSize
property. You can use the next()
and prev()
functions returned by activityCounters
to navigate the pages of a query result.
If items are added or removed between calls to next()
, the values returned by ActivityCountersQueryBuilder
may change.
function next(): Promise<ActivityCountersQueryResult>;
const nextPage = results.next();
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
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 and can be retrieved using the pageSize
property. You can use the next()
and prev()
functions returned by activityCounters
to navigate the pages of a query result.
If items are added or removed between calls to prev()
, the values returned may change.
function prev(): Promise<ActivityCountersQueryResult>;
const previousPage = results.prev();
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.