Hierarchy

  • Function

Properties

Properties

$function: {
    args: ArrayExpression<any>;
    body: CodeExpression;
    lang: "js";
}

Defines a custom aggregation function or expression in JavaScript.

Type declaration

  • args: ArrayExpression<any>

    Arguments passed to the function body. If the body function does not take an argument, you can specify an empty array [ ]

  • body: CodeExpression

    The function definition. You can specify the function definition as either BSON type Code or String.

  • lang: "js"

    The language used in the body. You must specify lang: "js".

Generated using TypeDoc