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 value by the specified parameter.
Field whose value is incremented. Nested fields can be specified using dot notation. For example: address.street
.
Value by which to increment the specified field. To decrement, specify a negative value.
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.
Field whose value is cleared. Nested fields can be specified using dot notation. For example: address.street
.
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 first instance of the specified value from the specified array field.
Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: address.street
.
Value whose first instance is removed 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 results.
function run(options: WixDataPatchOptions): Promise<WixDataBulkResult>;
import { items } from "@wix/data";
async function appendToArray() {
const results = await items
.bulkPatch("BlogPosts", [
"fb071093-9a40-432d-ae1f-2e5966fecbfa",
"9fe1a67f-fc60-4e99-8898-3f9e719ca62f",
])
.appendToArray("tags", "travel")
.setField("published", true)
.run();
const updated = results.updated; // 2
const errors = results.errors; // []
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.