modernAggregate method

Stream<Map<String, dynamic>> modernAggregate(
  1. dynamic pipeline, {
  2. bool? explain,
  3. Map<String, Object>? cursor,
  4. String? hint,
  5. Map<String, Object>? hintDocument,
  6. AggregateOptions? aggregateOptions,
  7. Map<String, Object>? rawOptions,
})

This method returns a stream that can be read or transformed into a list with .toList()

It corresponds to the legacy method aggregateToStream().

The pipeline can be either an AggregationPipelineBuilder or a List of Maps (List<Map<String, Object>>)

Implementation

Stream<Map<String, dynamic>> modernAggregate(dynamic pipeline,
        {bool? explain,
        Map<String, Object>? cursor,
        String? hint,
        Map<String, Object>? hintDocument,
        AggregateOptions? aggregateOptions,
        Map<String, Object>? rawOptions}) =>
    modernAggregateCursor(pipeline,
            explain: explain,
            cursor: cursor,
            hint: hint,
            hintDocument: hintDocument,
            aggregateOptions: aggregateOptions,
            rawOptions: rawOptions)
        .stream;