Creates a query to retrieve a list of tip distributions.
The queryTipDistributions() function builds a query to retrieve a list of tip distributions and returns a TipDistributionsQueryBuilder 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 TipDistributionsQueryBuilder functions onto the query. TipDistributionsQueryBuilder functions enable you to sort, filter, and control the results that queryTipDistributions() returns.
queryTipDistributions() runs with the following TipDistributionsQueryBuilder default that you can override:
limit is 50The functions that are chained to queryTipDistributions() are applied in the order they are called. For example, if you apply ascending("transaction.transactionDate") and then ascending("staff.id"), the results are sorted first by the "transaction.transactionDate", and then, if there are multiple results with the same "transaction.transactionDate", the items are sorted by "staff.id".
When setting a date filter remember to use UTC time.
The following TipDistributionsQueryBuilder functions are supported for the queryTipDistributions() function. For a full description of the tip distributions object, see the object returned for the items property in TipDistributionsQueryResult.
| PROPERTY | SUPPORTED FILTERS & SORTING |
|---|---|
_id | eq(),ne(),exists(),in(),hasSome(),startsWith(),gt(),lt(),le(),ge(),ascending(),descending() |
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.