Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Shift

Index

Properties

Properties

$shift: { output: any; by: number; default?: any }

Returns the value from an expression applied to a document in a specified position relative to the current document in the $setWindowFields stage partition.

version

5.0

see

https://docs.mongodb.com/manual/reference/operator/aggregation/shift/#mongodb-expression-exp.-shift

Type declaration

  • output: any

    Specifies an expression to evaluate and return in the output.

  • by: number

    Specifies an integer with a numeric document position relative to the current document in the output.

  • Optional default?: any

    Specifies an optional default expression to evaluate if the document position is outside of the implicit $setWindowFields stage window. The implicit window contains all the documents in the partition.

Generated using TypeDoc