aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Source/Public/FIRDocumentSnapshot.h
diff options
context:
space:
mode:
Diffstat (limited to 'Firestore/Source/Public/FIRDocumentSnapshot.h')
-rw-r--r--Firestore/Source/Public/FIRDocumentSnapshot.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Firestore/Source/Public/FIRDocumentSnapshot.h b/Firestore/Source/Public/FIRDocumentSnapshot.h
index 0aa6830..6ae0199 100644
--- a/Firestore/Source/Public/FIRDocumentSnapshot.h
+++ b/Firestore/Source/Public/FIRDocumentSnapshot.h
@@ -25,6 +25,9 @@ NS_ASSUME_NONNULL_BEGIN
* A `FIRDocumentSnapshot` contains data read from a document in your Firestore database. The data
* can be extracted with the `data` property or by using subscript syntax to access a specific
* field.
+ *
+ * For a `FIRDocumentSnapshot` that points to non-existing document, any data access will return
+ * `nil`. You can use the `exists` property to explicitly verify a documents existence.
*/
NS_SWIFT_NAME(DocumentSnapshot)
@interface FIRDocumentSnapshot : NSObject
@@ -66,9 +69,13 @@ NS_SWIFT_NAME(DocumentSnapshot)
@end
/**
- * A `FIRQueryDocumentSnapshot` contains data read from a document in your Firestore database. The
- * document is guaranteed to exist and its data can be extracted with the `data` property or by
- * using subscript syntax to access a specific field.
+ * A `FIRQueryDocumentSnapshot` contains data read from a document in your Firestore database as
+ * part of a query. The document is guaranteed to exist and its data can be extracted with the
+ * `data` property or by using subscript syntax to access a specific field.
+ *
+ * A `FIRQueryDocumentSnapshot` offers the same API surface as a `FIRDocumentSnapshot`. As
+ * deleted documents are not returned from queries, its `exists` property will always be true and
+ * `data:` will never return `nil`.
*/
NS_SWIFT_NAME(QueryDocumentSnapshot)
@interface FIRQueryDocumentSnapshot : FIRDocumentSnapshot