Firestore v1 API - Class StructuredAggregationQuery.Types.Aggregation (3.7.0)

public sealed class StructuredAggregationQuery.Types.Aggregation : IMessage<StructuredAggregationQuery.Types.Aggregation>, IEquatable<StructuredAggregationQuery.Types.Aggregation>, IDeepCloneable<StructuredAggregationQuery.Types.Aggregation>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore v1 API class StructuredAggregationQuery.Types.Aggregation.

Defines an aggregation that produces a single result.

Inheritance

object > StructuredAggregationQuery.Types.Aggregation

Namespace

Google.Cloud.Firestore.V1

Assembly

Google.Cloud.Firestore.V1.dll

Constructors

Aggregation()

public Aggregation()

Aggregation(Aggregation)

public Aggregation(StructuredAggregationQuery.Types.Aggregation other)
Parameter
Name Description
other StructuredAggregationQueryTypesAggregation

Properties

Alias

public string Alias { get; set; }

Optional. Optional name of the field to store the result of the aggregation into.

If not provided, Firestore will pick a default name following the format field_<incremental_id++>. For example:

AGGREGATE
  COUNT_UP_TO(1) AS count_up_to_1,
  COUNT_UP_TO(2),
  COUNT_UP_TO(3) AS count_up_to_3,
  COUNT(*)
OVER (
  ...
);

becomes:

AGGREGATE
  COUNT_UP_TO(1) AS count_up_to_1,
  COUNT_UP_TO(2) AS field_1,
  COUNT_UP_TO(3) AS count_up_to_3,
  COUNT(*) AS field_2
OVER (
  ...
);

Requires:

  • Must be unique across all aggregation aliases.
  • Conform to [document field name][google.firestore.v1.Document.fields] limitations.
Property Value
Type Description
string

Avg

public StructuredAggregationQuery.Types.Aggregation.Types.Avg Avg { get; set; }

Average aggregator.

Property Value
Type Description
StructuredAggregationQueryTypesAggregationTypesAvg

Count

public StructuredAggregationQuery.Types.Aggregation.Types.Count Count { get; set; }

Count aggregator.

Property Value
Type Description
StructuredAggregationQueryTypesAggregationTypesCount

OperatorCase

public StructuredAggregationQuery.Types.Aggregation.OperatorOneofCase OperatorCase { get; }
Property Value
Type Description
StructuredAggregationQueryTypesAggregationOperatorOneofCase

Sum

public StructuredAggregationQuery.Types.Aggregation.Types.Sum Sum { get; set; }

Sum aggregator.

Property Value
Type Description
StructuredAggregationQueryTypesAggregationTypesSum