Type parameters
-
T
Index
Constructors
Properties
Methods
Constructors
Private constructor
-
Returns QuerySnapshot
Properties
docs
An array of all the documents in the QuerySnapshot
.
empty
True if there are no documents in the QuerySnapshot
.
metadata
Metadata about this snapshot, concerning its source and if it has local modifications.
query
The query on which you called get
or onSnapshot
in order to get this
QuerySnapshot
.
size
The number of documents in the QuerySnapshot
.
Methods
docChanges
-
Returns an array of the documents changes since the last snapshot. If this is the first snapshot, all documents will be in the list as added changes.
Parameters
-
Optional options: SnapshotListenOptions
SnapshotListenOptions
that control whether metadata-only changes (i.e. onlyDocumentSnapshot.metadata
changed) should trigger snapshot events.
Returns Array<DocumentChange<T>>
-
forEach
-
Enumerates all of the documents in the
QuerySnapshot
.Parameters
-
callback: (result: QueryDocumentSnapshot<T>) => void
A callback to be called with a
QueryDocumentSnapshot
for each document in the snapshot.-
-
Parameters
-
result: QueryDocumentSnapshot<T>
Returns void
-
-
-
-
Optional thisArg: any
The
this
binding for the callback.
Returns void
-
isEqual
-
Returns true if this
QuerySnapshot
is equal to the provided one.Parameters
-
other: QuerySnapshot<T>
The
QuerySnapshot
to compare against.
Returns boolean
true if this
QuerySnapshot
is equal to the provided one. -
A
QuerySnapshot
contains zero or moreDocumentSnapshot
objects representing the results of a query. The documents can be accessed as an array via thedocs
property or enumerated using theforEach
method. The number of documents can be determined via theempty
andsize
properties.