runAggregationQuery method
Runs an aggregation query.
Rather than producing Document results like
Firestore.RunQuery, this API
allows running an aggregation to produce a series of
AggregationResult server-side.
High-Level Example:
-- Return the number of documents in table given a filter.
SELECT COUNT(*) FROM ( SELECT * FROM k where a = true );
Throws a http.ClientException if there were problems communicating with
the API service. Throws a ServiceException if the API method failed for
any reason.
Implementation
Stream<RunAggregationQueryResponse> runAggregationQuery(
RunAggregationQueryRequest request,
) {
final url = _endPoint.replace(
path: '/v1/${request.parent}:runAggregationQuery',
);
return _client
.postStreaming(url, body: request, enableSse: false)
.map(RunAggregationQueryResponse.fromJson);
}