FIRQuerySnapshot
@interface FIRQuerySnapshot : NSObject
A QuerySnapshot
contains zero or more DocumentSnapshot
objects. It can be enumerated
using the documents
property and its size can be inspected with isEmpty
and
count
.
-
The query on which you called
getDocuments
or listened to in order to get thisQuerySnapshot
.Declaration
Objective-C
@property (nonatomic, strong, readonly) FIRQuery *_Nonnull query;
-
Metadata about this snapshot, concerning its source and if it has local modifications.
Declaration
Objective-C
@property (nonatomic, strong, readonly) FIRSnapshotMetadata *_Nonnull metadata;
-
Indicates whether this
QuerySnapshot
is empty (contains no documents).Declaration
Objective-C
@property (nonatomic, readonly, getter=isEmpty) BOOL empty;
-
The count of documents in this
QuerySnapshot
.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger count;
-
An Array of the
DocumentSnapshots
that make up this document set.Declaration
Objective-C
@property (nonatomic, strong, readonly) NSArray<FIRQueryDocumentSnapshot *> *_Nonnull documents;
-
An array of the documents that changed since the last snapshot. If this is the first snapshot, all documents will be in the list as Added changes.
Declaration
Objective-C
@property (nonatomic, strong, readonly) NSArray<FIRDocumentChange *> *_Nonnull documentChanges;
-
Returns an array of the documents that changed since the last snapshot. If this is the first snapshot, all documents will be in the list as Added changes.
Declaration
Objective-C
- (nonnull NSArray<FIRDocumentChange *> *) documentChangesWithIncludeMetadataChanges:(BOOL)includeMetadataChanges;
Parameters
includeMetadataChanges
Whether metadata-only changes (i.e. only
DocumentSnapshot.metadata
changed) should be included.