Returns a special 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.
Returns a special 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.
Returns a special value that can be used with set() or update() that tells
the server to increment the field's current value by the given value.
If either the operand or the current field value uses floating point precision,
all arithmetic follows IEEE 754 semantics. If both values are integers,
values outside of JavaScript's safe number range (Number.MIN_SAFE_INTEGER to
Number.MAX_SAFE_INTEGER) are also subject to precision loss. Furthermore,
once processed by the Firestore backend, all integer operations are capped
between -2^63 and 2^63-1.
If the current field value is not of type number, or if the field does not
yet exist, the transformation sets the field to the given value.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2022-07-27 UTC."],[],[],null,["- [firebase](/docs/reference/js/v8/firebase).\n- [firestore](/docs/reference/js/v8/firebase.firestore).\n- FieldValue \nSentinel values that can be used when writing document fields with `set()`\nor `update()`.\n\nIndex\n\nConstructors\n\n- [constructor](/docs/reference/js/v8/firebase.firestore.FieldValue#constructor)\n\nMethods\n\n- [isEqual](/docs/reference/js/v8/firebase.firestore.FieldValue#isequal)\n- [arrayRemove](/docs/reference/js/v8/firebase.firestore.FieldValue#arrayremove)\n- [arrayUnion](/docs/reference/js/v8/firebase.firestore.FieldValue#arrayunion)\n- [delete](/docs/reference/js/v8/firebase.firestore.FieldValue#delete)\n- [increment](/docs/reference/js/v8/firebase.firestore.FieldValue#increment)\n- [serverTimestamp](/docs/reference/js/v8/firebase.firestore.FieldValue#servertimestamp)\n\nConstructors\n\nPrivate constructor\n\n- new FieldValue ( ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n-\n\n Returns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n\nMethods\n\nisEqual\n\n- isEqual ( other : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue) ) : boolean\n- Returns true if this `FieldValue` is equal to the provided one.\n\n Parameters\n -\n\n other: [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue) \n The `FieldValue` to compare against.\n\n Returns boolean\n\n true if this `FieldValue` is equal to the provided one.\n\nStatic arrayRemove\n\n- arrayRemove ( ... elements : any \\[\\] ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- Returns a special value that can be used with `set()` or `update()` that tells\n the server to remove the given elements from any array value that already\n exists on the server. All instances of each element specified will be\n removed from the array. If the field being modified is not already an\n array it will be overwritten with an empty array.\n\n Parameters\n -\n\n Rest ...elements: any\\[\\] \n The elements to remove from the array.\n\n Returns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n\n The FieldValue sentinel for use in a call to `set()` or `update()`.\n\nStatic arrayUnion\n\n- arrayUnion ( ... elements : any \\[\\] ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- Returns a special value that can be used with `set()` or `update()` that tells\n the server to union the given elements with any array value that already\n exists on the server. Each specified element that doesn't already exist in\n the array will be added to the end. If the field being modified is not\n already an array it will be overwritten with an array containing exactly\n the specified elements.\n\n Parameters\n -\n\n Rest ...elements: any\\[\\] \n The elements to union into the array.\n\n Returns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n\n The FieldValue sentinel for use in a call to `set()` or `update()`.\n\nStatic delete\n\n- delete ( ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- Returns a sentinel for use with `update()` to mark a field for deletion.\n\n Returns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n\nStatic increment\n\n- increment ( n : number ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- Returns a special value that can be used with `set()` or `update()` that tells\n the server to increment the field's current value by the given value.\n\n If either the operand or the current field value uses floating point precision,\n all arithmetic follows IEEE 754 semantics. If both values are integers,\n values outside of JavaScript's safe number range (`Number.MIN_SAFE_INTEGER` to\n `Number.MAX_SAFE_INTEGER`) are also subject to precision loss. Furthermore,\n once processed by the Firestore backend, all integer operations are capped\n between -2\\^63 and 2\\^63-1.\n\n If the current field value is not of type `number`, or if the field does not\n yet exist, the transformation sets the field to the given value.\n\n Parameters\n -\n\n n: number \n The value to increment by.\n\n Returns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n\n The FieldValue sentinel for use in a call to `set()` or `update()`.\n\nStatic serverTimestamp\n\n- serverTimestamp ( ) : [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)\n- Returns a sentinel used with `set()` or `update()` to include a\n server-generated timestamp in the written data.\n\nReturns [FieldValue](/docs/reference/js/v8/firebase.firestore.FieldValue)"]]
Sentinel values that can be used when writing document fields with
set()
orupdate()
.