Abstract class that provides a blueprint for creating specific translator classes. Defines two abstract methods: formatFunction and mergeFilters.

Type Parameters

Hierarchy (view full)

Constructors

Properties

VisitComparisonOutput: object
VisitOperationOutput: object
VisitStructuredQueryOutput: {
    filter?: T["FilterType"];
}

Type declaration

  • Optional filter?: T["FilterType"]
allowedComparators: Comparator[]
allowedOperators: Operator[]

Methods

  • Formats a given function (either an operator or a comparator) into a string.

    Parameters

    • func: "or" | "and" | "lt" | "lte" | "gt" | "gte" | "not" | "eq" | "ne"

      The function to format.

    Returns string

    Formatted string representation of the function.

  • Merges two filters into one, using a specified merge type.

    Parameters

    • defaultFilter: undefined | T["FilterType"]

      The default filter.

    • generatedFilter: undefined | T["FilterType"]

      The generated filter.

    • Optional mergeType: "or" | "and" | "replace"

      The type of merge to perform. Can be 'and', 'or', or 'replace'.

    • Optional forceDefaultFilter: boolean

      If true, the default filter will be used even if the generated filter is not empty.

    Returns undefined | T["FilterType"]

    The merged filter, or undefined if both filters are empty.

Generated using TypeDoc