QuerySnapshot(const QuerySnapshot & other)
QuerySnapshot(QuerySnapshot && other)
~QuerySnapshot()
Public functions | |
---|---|
DocumentChanges(MetadataChanges metadata_changes) const | virtual std::vector< DocumentChange > The list of documents that changed since the last snapshot. |
documents() const | virtual std::vector< DocumentSnapshot > The list of documents in this QuerySnapshot in order of the query. |
empty() const | bool Checks the emptiness of the QuerySnapshot. |
is_valid() const | bool Returns true if this QuerySnapshot is valid, false if it is not valid. |
metadata() const | virtual SnapshotMetadata Metadata about this snapshot, concerning its source and if it has local modifications. |
operator=(const QuerySnapshot & other) | Copy assignment operator. |
operator=(QuerySnapshot && other) | Move assignment operator. |
query() const | virtual Query The query from which you got this QuerySnapshot. |
size() const | virtual std::size_t Checks the size of the QuerySnapshot. |
virtualstd::vector<DocumentChange>DocumentChanges(MetadataChangesmetadata_changes)const
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.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | The list of document changes since the last snapshot. |
QuerySnapshot()
Creates an invalid QuerySnapshot that has to be reassigned before it can be used.
Calling any member function on an invalid QuerySnapshot will be a no-op. If the function returns a value, it will return a zero, empty, or invalid value, depending on the type of the value.
QuerySnapshot(constQuerySnapshot&other)
Copy constructor.
QuerySnapshot
is immutable and can be efficiently copied (no deep copy is performed).
Details | |||
---|---|---|---|
Parameters |
|
QuerySnapshot(QuerySnapshot&&other)
Move constructor.
Moving is more efficient than copying for a QuerySnapshot
. After being moved from, a QuerySnapshot
is equivalent to its default-constructed state.
Details | |||
---|---|---|---|
Parameters |
|
virtualstd::vector<DocumentSnapshot>documents()const
The list of documents in this QuerySnapshot in order of the query.
Details | |
---|---|
Returns | The list of documents. |
boolempty()const
Checks the emptiness of the QuerySnapshot.
Details | |
---|---|
Returns | True if there are no documents in the QuerySnapshot. |
boolis_valid()const
Returns true if this QuerySnapshot
is valid, false if it is not valid.
An invalid QuerySnapshot
could be the result of:
QuerySnapshot
using the default constructor.QuerySnapshot
.QuerySnapshot
instances associated with it.Details | |
---|---|
Returns | true if this QuerySnapshot is valid, false if this QuerySnapshot is invalid. |
virtualSnapshotMetadatametadata()const
Metadata about this snapshot, concerning its source and if it has local modifications.
Details | |
---|---|
Returns | The metadata for this document snapshot. |
QuerySnapshot&operator=(constQuerySnapshot&other)
Copy assignment operator.
QuerySnapshot
is immutable and can be efficiently copied (no deep copy is performed).
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Reference to the destination QuerySnapshot . |
QuerySnapshot&operator=(QuerySnapshot&&other)
Move assignment operator.
Moving is more efficient than copying for a QuerySnapshot
. After being moved from, a QuerySnapshot
is equivalent to its default-constructed state.
Details | |||
---|---|---|---|
Parameters |
| ||
Returns | Reference to the destination QuerySnapshot . |
virtualstd::size_tsize()const
Checks the size of the QuerySnapshot.
Details | |
---|---|
Returns | The number of documents in the QuerySnapshot. |
virtual~QuerySnapshot()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.