Class AggregateQuerySnapshot
An immutable snapshot of aggregate query results.
Implements
Namespace: Google.Cloud.Firestore
Assembly: Google.Cloud.Firestore.dll
Syntax
public sealed class AggregateQuerySnapshot : IEquatable<AggregateQuerySnapshot>
Properties
Count
Number of documents that matches the query. May be null when count aggregation is not applied on the Query. Note that when the query contains a limit, the count is restricted by that limit.
Declaration
public long? Count { get; }
Property Value
Type | Description |
---|---|
long? |
Query
The query producing this snapshot.
Declaration
public AggregateQuery Query { get; }
Property Value
Type | Description |
---|---|
AggregateQuery |
ReadTime
The time at which the snapshot was read.
Declaration
public Timestamp ReadTime { get; }
Property Value
Type | Description |
---|---|
Timestamp |
Methods
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
GetValue<T>(AggregateField)
Fetches the value from the dictionary, throwing an exception if the value does not exist.
Declaration
public T GetValue<T>(AggregateField aggregateField)
Parameters
Type | Name | Description |
---|---|---|
AggregateField | aggregateField | The aggregate field to fetch. Must not be null. |
Returns
Type | Description |
---|---|
T | The deserialized value. |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The field does not exist in the dictionary. |
GetValue<T>(string)
Fetches the value from the dictionary, throwing an exception if the value does not exist.
Declaration
public T GetValue<T>(string alias)
Parameters
Type | Name | Description |
---|---|---|
string | alias | The parameter to match the alias of aggregation result to be fetched. Must not be null. |
Returns
Type | Description |
---|---|
T | The deserialized value. |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The field does not exist in the dictionary. |