aggregateToStream method
Stream<Map<String, dynamic> >
aggregateToStream(
- List<
Map< pipeline, {String, Object> > - Map<
String, Object> cursorOptions = const <String, Object>{}, - bool allowDiskUse = false,
inherited
Executes an aggregation pipeline
Implementation
Stream<Map<String, dynamic>> aggregateToStream(
List<Map<String, Object>> pipeline,
{Map<String, Object> cursorOptions = const <String, Object>{},
bool allowDiskUse = false}) {
if (db._masterConnectionVerified.serverCapabilities.supportsOpMsg) {
return modernAggregate(pipeline,
cursor: cursorOptions,
aggregateOptions: AggregateOptions(allowDiskUse: allowDiskUse));
}
return legacyAggregateToStream(pipeline,
cursorOptions: cursorOptions, allowDiskUse: allowDiskUse);
}