The Aggregator class provides functionality to process data collections through an aggregation pipeline. It supports streaming and executing aggregation operations with customizable options.
Aggregator
Creates an instance of the Aggregator class.
An array of objects representing the aggregation pipeline stages.
Optional
Optional configuration settings for the aggregator.
Executes the aggregation pipeline on the provided collection and returns the resulting array.
The type of the objects in the resulting array.
The input data source to run the aggregation on.
Optional settings to customize the aggregation behavior.
An array of objects of type T resulting from the aggregation.
T
Processes a collection through an aggregation pipeline and returns an iterator for the transformed results.
The input collection to process. This can be any source that implements the Source interface.
Source
Optional configuration for processing. If not provided, the default options of the aggregator instance will be used.
An iterator that yields the results of the aggregation pipeline.
Will throw an error if:
$documents
The
Aggregator
class provides functionality to process data collections through an aggregation pipeline. It supports streaming and executing aggregation operations with customizable options.