Search...
totalPages
Returns the total number of pages the query produced.
Description
Type:
numberRead Only
Was this helpful?
Get the total number of pages in a query result
Copy Code
1let resultPages = results.totalPages; // 3
Perform a query and get the total number of pages in the query result
Copy Code
1import { sessions } from "wix-bookings-backend";23// ...45sessions.querySessions()6 .ge("end.timestamp", "2021-01-01T00:00:00.000Z")7 .lt("start.timestamp", "2021-05-01T00:00:00.000Z")8 .find()9 .then((results) => {10 let resultPages = results.totalPages; // 311 })12 .catch((error) => {13 console.error(error);14 });