Interface Expression<T>

Interface describing the shape of an Expression which may be employed through the Params as part of a Model.findAll. Expressions can either be the plain shape of an entity or compositions of multiple conjunctions.

interface Expression<T> {
    conjunction?: {
        operands: Expression<T>[];
        operator?: Conjunction;
    };
    entity?: {
        operator?: Operator;
        path: Path<T, []>;
        value: unknown;
    };
}

Type Parameters

Properties

conjunction?: {
    operands: Expression<T>[];
    operator?: Conjunction;
}

conjunction of multiple filter Expressions requested data Models are matched against. The conjunction sibling parameter entity has to be undefined when supplying this parameter. By supplying filter Expressions, conjunct by specific Conjunction operators, fine-grained filter operations can be compiled.

Type declaration

entity?: {
    operator?: Operator;
    path: Path<T, []>;
    value: unknown;
}

Shape the requested data Models are matched against. Supplying this parameter requires the conjunction sibling parameter to be undefined. By specifying the entity shape to match data Models against, simple filter operations can be compiled.

Type declaration

  • Optional Readonly operator?: Operator

    Operator to use for matching.

  • Readonly path: Path<T, []>

    Property path from within the data Model which to match against. The value which will be matched against has to be supplied through the value property.

  • Readonly value: unknown

    Property value to match data Models against. The property path to this value has to be supplied through the path property.

Generated using TypeDoc