updateFieldPath method
- @JS('update')
- DocumentReference documentRef,
- JSAny field,
- JSObject value, [
- JSArray<
JSAny> precondition,
Updates fields in the document referred to by the provided
DocumentReference
. The update will fail if applied to a document that
does not exist.
Nested fields can be updated by providing dot-separated field path strings or by providing FieldPath objects.
A Precondition
restricting this update can be specified as the last
argument.
@param documentRef A reference to the document to be updated.
@param field The first field to update.
@param value The first value
@param fieldsOrPrecondition An alternating list of field paths and values
to update, optionally followed by a Precondition
to enforce on this
update.
@throws Error If the provided input is not valid Firestore data.
@return This Transaction
instance. Used for chaining method calls.
Implementation
@JS('update')
external Transaction updateFieldPath(
DocumentReference documentRef,
JSAny field,
JSObject value, [
JSArray<JSAny> precondition,
]);