firebase:: firestore:: AggregateQuery
#include <aggregate_query.h>
A query that calculates aggregations over an underlying query.
Summary
Constructors and Destructors | |
|---|---|
AggregateQuery()Creates an invalidAggregateQuery that has to be reassigned before it can be used. | |
AggregateQuery(constAggregateQuery & other)Copy constructor. | |
AggregateQuery(AggregateQuery && other)Move constructor. | |
~AggregateQuery() |
Public functions | |
|---|---|
Get(AggregateSource aggregate_source) const | virtualFuture<AggregateQuerySnapshot >Executes this query. |
is_valid() const | boolReturns true if this AggregateQuery is valid, false if it is not valid. |
operator=(constAggregateQuery & other) | Copy assignment operator. |
operator=(AggregateQuery && other) | Move assignment operator. |
query() const | virtualQueryReturns the query whose aggregations will be calculated by this object. |
Public functions
AggregateQuery
AggregateQuery()
Creates an invalidAggregateQuery that has to be reassigned before it can be used.
Calling any member function on an invalidAggregateQuery 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.
AggregateQuery
AggregateQuery(constAggregateQuery&other)
Copy constructor.
AggregateQuery is immutable and can be efficiently copied (no deep copy is performed).
| Details | |||
|---|---|---|---|
| Parameters |
|
AggregateQuery
AggregateQuery(AggregateQuery&&other)
Move constructor.
Moving is more efficient than copying for aAggregateQuery. After being moved from, aAggregateQuery is equivalent to its default-constructed state.
| Details | |||
|---|---|---|---|
| Parameters |
|
Get
virtualFuture<AggregateQuerySnapshot>Get(AggregateSourceaggregate_source)const
Executes this query.
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | AFuture that will be resolved with the results of theAggregateQuery. |
is_valid
boolis_valid()const
Returns true if thisAggregateQuery is valid, false if it is not valid.
An invalidAggregateQuery could be the result of:
- Creating a
AggregateQueryusing the default constructor. - Moving from the
AggregateQuery. - Deleting yourFirestore instance, which will invalidate all the
AggregateQueryinstances associated with it.
| Details | |
|---|---|
| Returns | true if this AggregateQuery is valid, false if thisAggregateQuery is invalid. |
operator=
AggregateQuery&operator=(constAggregateQuery&other)
Copy assignment operator.
AggregateQuery is immutable and can be efficiently copied (no deep copy is performed).
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Reference to the destination AggregateQuery. |
operator=
AggregateQuery&operator=(AggregateQuery&&other)
Move assignment operator.
Moving is more efficient than copying for aAggregateQuery. After being moved from, aAggregateQuery is equivalent to its default-constructed state.
| Details | |||
|---|---|---|---|
| Parameters |
| ||
| Returns | Reference to the destination AggregateQuery. |
query
virtualQueryquery()const
Returns the query whose aggregations will be calculated by this object.
~AggregateQuery
virtual~AggregateQuery()
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.