FirebaseFirestore Framework Reference

FIRAggregateQuery


@interface FIRAggregateQuery : NSObject

A query that calculates aggregations over an underlying query.

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

    Declaration

    Objective-C

    @property (nonatomic, readonly) FIRQuery *_Nonnull query;
  • Executes this query.

    Declaration

    Objective-C

    - (void)aggregationWithSource:(FIRAggregateSource)source
                       completion:
                           (nonnull void (^)(FIRAggregateQuerySnapshot *_Nullable,
                                             NSError *_Nullable))completion;

    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.