public sealed class AggregateQuerySnapshot : IEquatable<AggregateQuerySnapshot>
Reference documentation and code samples for the Firestore API class AggregateQuerySnapshot.
An immutable snapshot of aggregate query results.
Implements
IEquatableAggregateQuerySnapshotNamespace
Google.Cloud.FirestoreAssembly
Google.Cloud.Firestore.dll
Properties
Count
public long? Count { get; }
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.
Property Value | |
---|---|
Type | Description |
long |
Query
public AggregateQuery Query { get; }
The query producing this snapshot.
Property Value | |
---|---|
Type | Description |
AggregateQuery |
ReadTime
public Timestamp ReadTime { get; }
The time at which the snapshot was read.
Property Value | |
---|---|
Type | Description |
Timestamp |
Methods
GetHashCode()
public override int GetHashCode()
Serves as the default hash function.
Returns | |
---|---|
Type | Description |
int | A hash code for the current object. |
GetValue<T>(AggregateField)
public T GetValue<T>(AggregateField aggregateField)
Fetches the value from the dictionary, throwing an exception if the value does not exist.
Parameter | |
---|---|
Name | Description |
aggregateField | AggregateField The aggregate field to fetch. Must not be null. |
Returns | |
---|---|
Type | Description |
T | The deserialized value. |
Type Parameter | |
---|---|
Name | Description |
T |
Exceptions | |
---|---|
Type | Description |
InvalidOperationException | The field does not exist in the dictionary. |
GetValue<T>(string)
public T GetValue<T>(string alias)
Fetches the value from the dictionary, throwing an exception if the value does not exist.
Parameter | |
---|---|
Name | Description |
alias | string The parameter to match the alias of aggregation result to be fetched. Must not be null. |
Returns | |
---|---|
Type | Description |
T | The deserialized value. |
Type Parameter | |
---|---|
Name | Description |
T |
Exceptions | |
---|---|
Type | Description |
InvalidOperationException | The field does not exist in the dictionary. |