dataclasses

Methods

(static) Target(target) → {Target}

Source:
Create a new target
Parameters:
Name Type Description
target object
target_id string unique id for this target
label string label that will be displayed for this target
type_id string the type_id name this target has
Returns:
Type
Target

(static) Operator(operator) → {Operator}

Source:
Create a new operator
Parameters:
Name Type Description
operator object
operator_id string unique id for this operator
label string label that will be displayed for this operator
Returns:
Type
Operator

(static) LogicalType(logic)

Source:
Create a new type logical type Logical types or used in CompoundPredicates
Parameters:
Name Type Description
logic Object The predicate logic
type.logicalType_id string
type.label string

(static) CompoundPredicate(logic, predicates) → {Promise.<dataclasses.CompoundPredicate>}

Source:
A specialized predicate that evaluates logical combinations of other predicates.
Parameters:
Name Type Description
logic dataclasses.LogicalType The predicate logic
predicates Array.<dataclasses.Predicate> predicates
Returns:
Type
Promise.<dataclasses.CompoundPredicate>

(static) CompoundPredicate.reduce(compoundPredicate, f, acc, [parents]) → {T}

Source:
Reduce through the predicates tree
Parameters:
Name Type Attributes Default Description
compoundPredicate dataclasses.CompoundPredicate starter node
f function accumulation function, f(acc, predicate, parents)
acc T accumulator
parents Array
optional
[] path to the node, array of parents
Returns:
yield the accumulator
Type
T

Type Definitions

Predicate

Source:
Abstract Predicate type, a Predicate is the union type of CompoundPredicate | ComparisonPredicate
Type:
  • object

ComparisonPredicate

Source:
Abstract Predicate type, a Predicate is the union type of CompoundPredicate | ComparisonPredicate
Type:
  • object