Type alias ComputedValueOptions

ComputedValueOptions: {
    computeOn?: WriteOperation[];
    expression: string | AqlLiteral | AqlQuery;
    failOnWarning?: boolean;
    keepNull?: boolean;
    name: string;
    overwrite?: boolean;
}

Options for creating a computed value.

Type declaration

  • Optional computeOn?: WriteOperation[]

    Which operations should result in the value being computed.

    Default: ["insert", "update", "replace"]

  • expression: string | AqlLiteral | AqlQuery

    AQL RETURN expression that computes the value.

    Note that when passing an AQL query object, the bindVars will be ignored.

  • Optional failOnWarning?: boolean

    Whether the write operation should fail if the expression produces a warning.

    Default: false

  • Optional keepNull?: boolean

    If set to false, the field will be unset if the expression evaluates to null. Otherwise the field will be set to the value null. Has no effect if overwrite is set to false.

    Default: true

  • name: string

    Name of the target attribute of the computed value.

  • Optional overwrite?: boolean

    If set to false, the computed value will not be applied if the expression evaluates to null.

    Default: true