Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit a27a467

Browse files
Delete individual field feature #975
1 parent 14de679 commit a27a467

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

docs/FIRESTORE.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff 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()`
200189
Firestore 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
222222
To delete one or more fields in a document, do this (showing two flavors, use whatever you fancy):
223223

224224
```typescript

0 commit comments

Comments
 (0)