This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Creates a query to retrieve a list of item variants.
The queryVariants() function builds a query to retrieve a list of item variants and returns a VariantsQueryBuilder object.
The returned object contains the query definition, which is used to run the query using the find() function.
You can refine the query by chaining VariantsQueryBuilder functions onto the query. VariantsQueryBuilder functions enable you to filter, sort, and control the results that queryVariants() returns.
queryVariants() runs with the following VariantsQueryBuilder defaults, which you can override:
The following VariantsQueryBuilder functions are supported for queryVariants(). For a full description of the item variant object, see the object returned for the items property in VariantsQueryResult.
| PROPERTY | SUPPORTED FILTERS & SORTING |
|---|---|
_id | eq(),ne(),in() |
_createdDate | eq(),ne(),gt(),ge(),lt(),le() |
_updatedDate | eq(),ne(),gt(),ge(),lt(),le() |
name | eq(),ne(),in() |
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.