queryCategories( )


Creates a query to retrieve a list of category objects.

The queryCategories() function builds a query to retrieve a list of category objects and returns a categoriesQueryBuilder 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 CategoriesQueryBuilder functions onto the query. CategoriesQueryBuilder functions enable you to sort, filter, and control the results that queryCategories() returns.

queryCategories() runs with the following CategoriesQueryBuilder defaults that you can override:

  • limit is 100.
  • Sorted by createdDate in ascending order.

The functions that are chained to queryCategories() are applied in the order they are called. For example, if you apply ascending("name") and then ascending("id"), the results are sorted first by name, and then, if there are multiple results with the same name, the items are sorted by id.

The following CategoriesQueryBuilder functions are supported for the queryCategories() function. For a full description of the category object, see the object returned for the items property in CategoriesQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
_ideq(),ne(),exists(),in(),hasSome(),startsWith(),gt(),lt(),le(),ge(),ascending(),descending()
nameeq(),ne(),exists(),in(),hasSome(),startsWith(),gt(),lt(),le(),ge(),ascending(),descending()
sortOrdereq(),ne(),exists(),in(),hasSome(),lt(),le(),gt(),ge(),ascending(),descending()
Permissions
Manage Bookings Services and Settings
Manage Bookings - all permissions
Read Bookings - all read permissions
Manage Bookings
Read Bookings - Public Data
Read Bookings - Including Participants
Manage Stores
Learn more about app permissions.
Method Declaration
Copy
Request
This method does not take any parameters
Returns
Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?