Documentation

MapReduceResult
in package
implements IteratorAggregate

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.

Tags
see
Collection::mapReduce()
see
https://docs.mongodb.com/manual/reference/command/mapReduce/

Interfaces, Classes, Traits and Enums

IteratorAggregate

Table of Contents

$counts  : array<string|int, mixed>
$executionTimeMS  : int
$getIterator  : callable
$timing  : array<string|int, mixed>
getCounts()  : array<string|int, mixed>
Returns various count statistics from the mapReduce command.
getExecutionTimeMS()  : int
Return the command execution time in milliseconds.
getIterator()  : Traversable
Return the mapReduce results as a Traversable.
getTiming()  : array<string|int, mixed>
Returns various timing statistics from the mapReduce command.

Properties

Methods

getCounts()

Returns various count statistics from the mapReduce command.

public getCounts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExecutionTimeMS()

Return the command execution time in milliseconds.

public getExecutionTimeMS() : int
Return values
int

getTiming()

Returns various timing statistics from the mapReduce command.

public getTiming() : array<string|int, mixed>

Note: timing statistics are only available if the mapReduce command's "verbose" option was true; otherwise, an empty array will be returned.

Return values
array<string|int, mixed>

Search results