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
Executes this query.
is_valid() const
bool
Returns true if thisAggregateQuery is valid, false if it is not valid.
operator=(constAggregateQuery & other)
Copy assignment operator.
operator=(AggregateQuery && other)
Move assignment operator.
query() const
virtualQuery
Returns 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
other
AggregateQuery to copy from.

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

Get

virtualFuture<AggregateQuerySnapshot>Get(AggregateSourceaggregate_source)const

Executes this query.

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

Details
Returns
true if thisAggregateQuery 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
other
AggregateQuery to copy from.
Returns
Reference to the destinationAggregateQuery.

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
other
AggregateQuery to move data from.
Returns
Reference to the destinationAggregateQuery.

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.