diff options
author | Sebastian Schmidt <mrschmidt@google.com> | 2017-12-12 07:59:44 +0800 |
---|---|---|
committer | Sebastian Schmidt <mrschmidt@google.com> | 2017-12-12 07:59:44 +0800 |
commit | fe4783838ede114acf6372932d447ab4f27086fb (patch) | |
tree | 53ba9496fdd853a5f5020a064af46197f5dd9b36 /Firestore/Source/Public | |
parent | fe4ed518d7a5d139a530155508296a842e76b42d (diff) |
Addressing comments
Diffstat (limited to 'Firestore/Source/Public')
-rw-r--r-- | Firestore/Source/Public/FIRDocumentSnapshot.h | 13 |
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 |