Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

SDK Database Command, Aggregate Operator, Aggregate Expression


May 20, 2021 WeChat Mini Program Development Document


Table of contents


Expression

Aggregate expression

Description

An expression can be a field path, a constant, or an aggregate operator. Expressions can nest expressions.

The field path

Expressions use field path notation to specify fields in a record. T he field path is represented by a $ symbol plus the field name or nested field name. N ested field names use points to connect nested levels of fields. If $profile represents the field path of the profile, $profile.name represents the field path of profile.name (the nested name field in the profile field).

Constant

Constants can be of any type. Strings that start with $ are treated as field paths by default, and if you want to avoid this behavior, use AggregateCommand.literal to declare as a constant.

The aggregate operator

AggregateCommand