Retrieves the next page of aggregate results.
The next()
function retrieves the next page of aggregate results.
The page size is defined by the limit()
function.
If items are added or removed between calls to next()
the values returned
by WixDataAggregateResult
may change.
function next(): Promise<WixDataAggregateResult>;
oldResults
.next()
.then((newResults) => {
let items = newResults.items;
let numItems = newResults.length;
let hasNext = newResults.hasNext();
})
.catch((error) => {
let errorMsg = error.message;
let code = error.code;
});
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.