Skip to main content

Expression

aggregate expression

Notes

An expression can be a field path, a constant, or an aggregation operator. Expressions can be nested.

Field Path

Expressions use field path notation to specify fields in a record. A field path representation consists of a $ symbol followed by a field name or a nested field name. Nested field names are connected by dots to represent nested levels. For example, $profile represents the field path for profile, and \$profile.name represents the field path for profile.name (the name field nested within the profile field).

Constant

Constants can be of any type. By default, strings starting with \$ are treated as field paths. To avoid this behavior, use AggregateCommand.literal to declare them as constants.

Aggregation Operators

AggregateCommand