Result class for mapReduce command results.
This class allows for iteration of mapReduce results irrespective of the output method (e.g. inline, collection) via the IteratorAggregate interface. It also provides access to command statistics.
- Full name:
\MongoDB\MapReduceResult
- This class implements:
\IteratorAggregate
See Also:
- \MongoDB\Collection::mapReduce() -
- https://docs.mongodb.com/manual/reference/command/mapReduce/ -
private callable $getIterator
private int $executionTimeMS
private array $counts
private array $timing
Returns various count statistics from the mapReduce command.
public getCounts(): array
Return the command execution time in milliseconds.
public getExecutionTimeMS(): int
Return the mapReduce results as a Traversable.
public getIterator(): \Traversable
See Also:
Returns various timing statistics from the mapReduce command.
public getTiming(): array
Note: timing statistics are only available if the mapReduce command's "verbose" option was true; otherwise, an empty array will be returned.