Methods

arrayRemove

static

arrayRemove(...var_args) returns firebase.firestore.FieldValue

Returns a sentinel value that can be used with set() or update() that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array.

Parameter

var_args

any type

The elements to remove from the array.

Value may be repeated.

Returns

non-null firebase.firestore.FieldValue The FieldValue sentinel for use in a call to set() or update().

arrayUnion

static

arrayUnion(...var_args) returns firebase.firestore.FieldValue

Returns a sentinel value that can be used with set() or update() that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements.

Parameter

var_args

any type

The elements to union into the array.

Value may be repeated.

Returns

non-null firebase.firestore.FieldValue The FieldValue sentinel for use in a call to set() or update().

delete

static

delete() returns firebase.firestore.FieldValue

Returns a sentinel for use with update() to mark a field for deletion.

Returns

non-null firebase.firestore.FieldValue The FieldValue sentinel for use in a call to update().

serverTimestamp

static

serverTimestamp() returns firebase.firestore.FieldValue

Returns a sentinel used with set() or update() to include a server-generated timestamp in the written data.

Returns

non-null firebase.firestore.FieldValue The FieldValue sentinel for use in a call to set() or update().

isEqual

isEqual(other) returns boolean

Returns 'true' if this FieldValue is equal to the provided one.

Parameter

other

firebase.firestore.FieldValue

The FieldValue to compare against.

Value must not be null.

Returns

boolean 'true' if this FieldValue is equal to the provided one.