Creates a query to retrieve a list of bookingPolicy
objects.
The queryBookingPolicies()
function builds a query to retrieve a list of bookingPolicy
objects and returns a BookingPoliciesQueryBuilder
object.
The returned object contains the query definition, which is typically used to run the query using the find() function.
You can refine the query by chaining BookingPoliciesQueryBuilder
functions onto the query. BookingPoliciesQueryBuilder
functions enable you to sort, filter, and control the results that queryBookingPolicies()
returns.
queryBookingPolicies()
runs with the following BookingPoliciesQueryBuilder
defaults that you can override:
limit
is 50
.createdDate
in ascending order.The functions that are chained to queryBookingPolicies()
are applied in the order they are called. For example, if you apply ascending("waitlistPolicy.capacity")
and then ascending("name")
, the results are sorted first by waitlistPolicy.capacity
, and then, if there are multiple results with the same waitlistPolicy.capacity
, the items are sorted by name
.
The following BookingPoliciesQueryBuilder
functions are supported for the queryBookingPolicies()
function. For a full description of the bookingPolicy
object, see the object returned for the items property in BookingPoliciesQueryResult
.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.