firebase:: firestore:: AggregateQuery
#include <aggregate_query.h>
A query that calculates aggregations over an underlying query.
Summary
Constructors and Destructors |
|
---|---|
AggregateQuery()
Creates an invalid AggregateQuery that has to be reassigned before it can be used.
|
|
AggregateQuery(const AggregateQuery & other)
Copy constructor.
|
|
AggregateQuery(AggregateQuery && other)
Move constructor.
|
|
~AggregateQuery()
|
Public functions |
|
---|---|
Get(AggregateSource aggregate_source) const
|
virtual Future< AggregateQuerySnapshot >
Executes this query.
|
is_valid() const
|
bool
Returns true if this
AggregateQuery is valid, false if it is not valid. |
operator=(const AggregateQuery & other)
|
Copy assignment operator.
|
operator=(AggregateQuery && other)
|
Move assignment operator.
|
query() const
|
virtual Query
Returns the query whose aggregations will be calculated by this object.
|
Public functions
AggregateQuery
AggregateQuery()
Creates an invalid AggregateQuery that has to be reassigned before it can be used.
Calling any member function on an invalid AggregateQuery 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( const AggregateQuery & 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 a AggregateQuery
. After being moved from, a AggregateQuery
is equivalent to its default-constructed state.
Details | |||
---|---|---|---|
Parameters |
|
Get
virtual Future< AggregateQuerySnapshot > Get( AggregateSource aggregate_source ) const
Executes this query.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
A Future that will be resolved with the results of the AggregateQuery.
|
is_valid
bool is_valid() const
Returns true if this AggregateQuery
is valid, false if it is not valid.
An invalid AggregateQuery
could be the result of:
- Creating a
AggregateQuery
using the default constructor. - Moving from the
AggregateQuery
. - Deleting your Firestore instance, which will invalidate all the
AggregateQuery
instances associated with it.
Details | |
---|---|
Returns |
true if this
AggregateQuery is valid, false if this AggregateQuery is invalid. |
operator=
AggregateQuery & operator=( const AggregateQuery & 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 a AggregateQuery
. After being moved from, a AggregateQuery
is equivalent to its default-constructed state.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Reference to the destination
AggregateQuery . |
query
virtual Query query() const
Returns the query whose aggregations will be calculated by this object.
~AggregateQuery
virtual ~AggregateQuery()