aggregateToStream method
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);
}