This repository was archived by the owner on Apr 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -185,17 +185,6 @@ sanFranciscoDocument.update({
185185});
186186```
187187
188- ### ` collection.doc().delete() `
189- Entirely remove a document from a collection:
190-
191- ``` typescript
192- const sanFranciscoDocument = firebase .firestore ().collection (" cities" ).doc (" SF" );
193-
194- sanFranciscoDocument .delete ().then (() => {
195- console .log (" SF was erased from the face of the earth!" );
196- });
197- ```
198-
199188### ` collection.where() `
200189Firestore supports advanced querying with the ` where ` function. Those ` where ` clauses can be chained to form logical 'AND' queries:
201190
@@ -218,7 +207,18 @@ query
218207 });
219208```
220209
221- ### Deleting specific fields in a document
210+ ### Delete an entire document: ` collection.doc().delete() `
211+ Entirely remove a document from a collection:
212+
213+ ``` typescript
214+ const sanFranciscoDocument = firebase .firestore ().collection (" cities" ).doc (" SF" );
215+
216+ sanFranciscoDocument .delete ().then (() => {
217+ console .log (" SF was erased from the face of the earth!" );
218+ });
219+ ```
220+
221+ ### Delete specific fields in a document
222222To delete one or more fields in a document, do this (showing two flavors, use whatever you fancy):
223223
224224``` typescript
You can’t perform that action at this time.
0 commit comments