Search...
query
Returns the SessionQueryBuilder
object used to get the current results.
Description
Use the query
property to create and run a new query by chaining additional SessionQueryBuilder
functions to it. You can only filter on properties that have not already been used in the previous query.
Type:
SessionQueryBuilderRead Only
Was this helpful?
Get the query that produced a query result
Copy Code
1let resultQuery = results.query;
Perform a query and get the query that produced the 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 newQuery = results.query;11 newQuery12 .ge("startTime", "2021-01-01T15:21:41.960Z")13 .find()14 .then((newQueryResults) => {15 let firstItem = newQueryResults.items[0];16 })17 })18 .catch((error) => {19 console.error(error);20 });