runAggregationQuery method
Stream<RunAggregationQueryResponse>
runAggregationQuery(
- RunAggregationQueryRequest request
override
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
@override
Stream<RunAggregationQueryResponse> runAggregationQuery(
RunAggregationQueryRequest request,
) {
if (isClosed) throw StateError('Service is closed');
if (_runAggregationQuery case final runAggregationQuery?) {
return runAggregationQuery(request);
}
throw UnsupportedError('runAggregationQuery');
}