The WixDataBulkPatch
methods enable you to specify the modifications you want to make in the specified data items. You can make multiple modifications in each item.
Build a bulk patch operation by calling the bulkPatch()
method on the data items, and refine it by chaining WixDataBulkPatch
modification methods. You can set or increment a field value, as well as add or remove items from an array field. The methods are applied in the order in which they are chained.
Finally, run the patch operation by calling run()
.
Notes:
WixDataBulkPatch
modification method before calling run()
.For example, the following code patches a costume item by adding more sizes, removing a color option, and marking the item as available:
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a patch operation to append the specified value to the specified array field.
Value to append to the specified array field.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a patch operation to increment the specified field by the specified value.
Value by which to increment the specified field. You can specify positive or negative values.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a patch operation to clear the specified field.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a patch operation to remove the specified value from the specified array field.
Value to remove from the specified array field.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Runs the bulk patch operation and returns a Promise that resolves to information about the operation results.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.
This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Refines a patch operation to set the specified field to the specified value.
Value to set for the specified field.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.