You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is useful for [this](https://firebase.google.com/docs/firestore/reference/rest/v1beta1/projects.databases.documents/patch#query-parameters):
98
+
> If the document exists on the server and has fields not referenced in the mask, they are left unchanged. Fields referenced in the mask, but not present in the input document (the `data` in our example), are deleted from the document on the server.
99
+
93
100
##### Deleting Documents
94
101
To delete a document at this location, we can use the `deleteDocument` function:
Copy file name to clipboardExpand all lines: FirestoreWrite.ts
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -30,16 +30,25 @@ class FirestoreWrite {
30
30
* @param {string} path the path of the document to update
31
31
* @param {object} fields the document's new fields
32
32
* @param {string} request the Firestore Request object to manipulate
33
-
* @param {boolean} mask if true, the update will use a mask. i.e. true: updates only specific fields, false: overwrites document with specified fields
33
+
* @param {boolean|string[]} mask the update will mask the given fields,
34
+
* if is an array (of field names), that array would be used as the mask. i.e. true: updates only specific fields, false: overwrites document with specified fields
35
+
* see jsdoc of the `updateDocument` method in Firestore.ts for more details
34
36
* @return {object} the Document object written to Firestore
0 commit comments