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
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
other
AggregateQuery to copy from.

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
other
AggregateQuery to move data from.

Get

virtual Future< AggregateQuerySnapshot > Get(
  AggregateSource aggregate_source
) const 

Executes this query.

Details
Parameters
aggregate_source
The source from which to acquire the aggregate results.
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:

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
other
AggregateQuery to copy from.
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
other
AggregateQuery to move data from.
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()