devsite/tools/jazzy/templates

FirebaseFirestore Framework Reference

AggregateQuery

class AggregateQuery : NSObject, @unchecked Sendable

A query that calculates aggregations over an underlying query.

  • The query whose aggregations will be calculated by this object.

    Declaration

    Swift

    var query: FIRQuery { get }
  • Executes this query.

    Declaration

    Swift

    func getAggregation(source: AggregateSource) async throws -> FIRAggregateQuerySnapshot

    Parameters

    source

    The source from which to acquire the aggregate results.

    completion

    a block to execute once the results have been successfully read. snapshot will be nil only if error is non-nil.