A QuerySnapshot contains the results of a query. It can contain zero or more DocumentSnapshot objects.
Subclassing Note: Firestore classes are not meant to be subclassed except for use in test mocks. Subclassing is not supported in production code and new SDK releases may break code that does so.
| boolean | |
| List<DocumentChange> |
getDocumentChanges()
Returns the list of documents that changed since the last snapshot.
|
| List<DocumentChange> |
getDocumentChanges(MetadataChanges metadataChanges)
Returns the list of documents that changed since the last snapshot.
|
| List<DocumentSnapshot> |
getDocuments()
Returns the documents in this QuerySnapshot as a List in order of the query.
|
| SnapshotMetadata | |
| Query |
getQuery()
|
| int |
hashCode()
|
| boolean |
isEmpty()
Returns true if there are no documents in the QuerySnapshot.
|
| Iterator<QueryDocumentSnapshot> |
iterator()
|
| int |
size()
Returns the number of documents in the QuerySnapshot.
|
| <T> List<T> |
toObjects(Class<T> clazz, DocumentSnapshot.ServerTimestampBehavior serverTimestampBehavior)
Returns the contents of the documents in the QuerySnapshot, converted to the provided class, as
a list.
|
| <T> List<T> |
Returns the list of documents that changed since the last snapshot. If it's the first snapshot all documents will be in the list as added changes.
Documents with changes only to their metadata will not be included.
Returns the list of documents that changed since the last snapshot. If it's the first snapshot all documents will be in the list as added changes.
| metadataChanges | Indicates whether metadata-only changes (i.e. only Query.getMetadata() changed) should be included. |
|---|
Returns the documents in this QuerySnapshot as a List in order of the query.
Returns true if there are no documents in the QuerySnapshot.
Returns the number of documents in the QuerySnapshot.
Returns the contents of the documents in the QuerySnapshot, converted to the provided class, as a list.
| clazz | The POJO type used to convert the documents in the list. |
|---|---|
| serverTimestampBehavior | Configures the behavior for server timestamps that have not yet been set to their final value. |