OutputWindow
in package
implements
WindowInterface
FinalYes
Specifies the window boundaries and parameters. Window boundaries are inclusive.
Default is an unbounded window, which includes all documents in the partition.
Tags
Table of Contents
Interfaces
- WindowInterface
- Window Operators can be used for $setWindowFields stage partition.
Properties
- $operator : Document|Serializable|WindowInterface|stdClass|array<string|int, mixed>
- Function used to initialize the state. The init function receives its arguments from the initArgs array expression.
- $window : Optional|stdClass
- Specifies the window boundaries and parameters.
Methods
- __construct() : mixed
Properties
$operator
Function used to initialize the state. The init function receives its arguments from the initArgs array expression.
public
Document|Serializable|WindowInterface|stdClass|array<string|int, mixed>
$operator
You can specify the function definition as either BSON type Code or String.
$window
Specifies the window boundaries and parameters.
public
Optional|stdClass
$window
Methods
__construct()
public
__construct(Document|Serializable|WindowInterface|array<string, mixed>|stdClass $operator[, Optional|array{string|int, string|int} $documents = Optional::Undefined ][, Optional|array{string|(numeric), string|(numeric)} $range = Optional::Undefined ][, Optional|non-empty-string $unit = Optional::Undefined ]) : mixed
Parameters
- $operator : Document|Serializable|WindowInterface|array<string, mixed>|stdClass
-
Window operator to use in the $setWindowFields stage.
- $documents : Optional|array{string|int, string|int} = Optional::Undefined
-
A window where the lower and upper boundaries are specified relative to the position of the current document read from the collection.
- $range : Optional|array{string|(numeric), string|(numeric)} = Optional::Undefined
-
Arguments passed to the init function.
- $unit : Optional|non-empty-string = Optional::Undefined
-
Specifies the units for time range window boundaries. If omitted, default numeric range window boundaries are used.