Interface Options

Generic options interface passed down to all operators

interface Options {
    collation?: CollationSpec;
    collectionResolver?: CollectionResolver;
    context: Context;
    hashFunction?: HashFunction;
    idKey: string;
    jsonSchemaValidator?: JsonSchemaValidator;
    processingMode: ProcessingMode;
    scriptEnabled: boolean;
    useGlobalContext: boolean;
    useStrictMode: boolean;
    variables?: Readonly<RawObject>;
}

Implemented by

Properties

collation?: CollationSpec

The collation specification for string sorting operations.

collectionResolver?: CollectionResolver

Function to resolve strings to arrays for use with operators that reference other collections such as; $lookup, $out and $merge.

context: Context

Extra references to operators to be used for processing.

hashFunction?: HashFunction

Hash function to replace the Effective Java default implementation.

idKey: string

The key that is used to lookup the ID value of a document.

Default

"_id".
jsonSchemaValidator?: JsonSchemaValidator

JSON schema validator to use with the '$jsonSchema' operator. Required in order to use the operator.

processingMode: ProcessingMode

Determines how to treat inputs and outputs.

Default

ProcessingMode.CLONE_OFF.
scriptEnabled: boolean

Enable or disable custom script execution via $where, $accumulator, and $function operators.

Default

true.
useGlobalContext: boolean

Enable or disable falling back to the global context for operators.

Default

true.
useStrictMode: boolean

Enforces strict MongoDB compatibilty. See README.

Default

true.
variables?: Readonly<RawObject>

Global variables.