firebase:: firestore:: AggregateQuerySnapshot
#include <aggregate_query_snapshot.h>
The results of executing anAggregateQuery.
Summary
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.
Constructors and Destructors | |
|---|---|
AggregateQuerySnapshot()Creates an invalidAggregateQuerySnapshot that has to be reassigned before it can be used. | |
AggregateQuerySnapshot(constAggregateQuerySnapshot & other)Copy constructor. | |
AggregateQuerySnapshot(AggregateQuerySnapshot && other)Move constructor. | |
~AggregateQuerySnapshot() |
Public functions | |
|---|---|
count() const | virtual int64_tReturns the number of documents in the result set of the underlying query. |
is_valid() const | boolReturns true if this AggregateQuerySnapshot is valid, false if it is not valid. |
operator=(constAggregateQuerySnapshot & other) | Copy assignment operator. |
operator=(AggregateQuerySnapshot && other) | Move assignment operator. |
query() const | virtualAggregateQueryReturns the query that was executed to produce this result. |
Public functions
AggregateQuerySnapshot
AggregateQuerySnapshot()
Creates an invalidAggregateQuerySnapshot that has to be reassigned before it can be used.
Calling any member function on an invalidAggregateQuerySnapshot 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.
AggregateQuerySnapshot
AggregateQuerySnapshot(constAggregateQuerySnapshot&other)
Copy constructor.
AggregateQuerySnapshot is immutable and can be efficiently copied (no deep copy is performed).
| Details | |||
|---|---|---|---|
| Parameters |
|
AggregateQuerySnapshot
AggregateQuerySnapshot(AggregateQuerySnapshot&&other)
Move constructor.
Moving is more efficient than copying for aAggregateQuerySnapshot. After being moved from, aAggregateQuerySnapshot is equivalent to its default-constructed state.
| Details | |||
|---|---|---|---|
| Parameters |
|
count
virtualint64_tcount()const
Returns the number of documents in the result set of the underlying query.
| Details | |
|---|---|
| Returns | The number of documents in the result set of the underlying query. |
is_valid
boolis_valid()const
Returns true if thisAggregateQuerySnapshot is valid, false if it is not valid.
An invalidAggregateQuerySnapshot could be the result of:
- Creating a
AggregateQuerySnapshotusing the default constructor. - Moving from the
AggregateQuerySnapshot. - Deleting yourFirestore instance, which will invalidate all the
AggregateQuerySnapshotinstances associated with it.
| Details | |
|---|---|
| Returns | true if this AggregateQuerySnapshot is valid, false if thisAggregateQuerySnapshot is invalid. |
operator=
AggregateQuerySnapshot&operator=(constAggregateQuerySnapshot&other)
Copy assignment operator.
AggregateQuerySnapshot is immutable and can be efficiently copied (no deep copy is performed).
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Reference to the destination AggregateQuerySnapshot. |
operator=
AggregateQuerySnapshot&operator=(AggregateQuerySnapshot&&other)
Move assignment operator.
Moving is more efficient than copying for aAggregateQuerySnapshot. After being moved from, aAggregateQuerySnapshot is equivalent to its default-constructed state.
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Reference to the destination AggregateQuerySnapshot. |
query
virtualAggregateQueryquery()const
Returns the query that was executed to produce this result.
| Details | |
|---|---|
| Returns | The AggregateQuery instance. |
~AggregateQuerySnapshot
virtual~AggregateQuerySnapshot()
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.