api

Methods

(static) add(option) → {Promise.<dataclasses.Predicate>}

Source:
Since:
  • 1.0.0
Add a ComparisonPredicate or CompoundPredicate
Parameters:
Name Type Attributes Default Description
option Object
options.type string what type of Predicate to add
options.how string
optional
after should we insert it before, after or instead of? (currently only after is supported)
options.where dataclasses.Predicate current element
Returns:
inserted predicate
Type
Promise.<dataclasses.Predicate>

(static) setPredicateLogicalType_id(predicate, newLogicalType_id) → {Promise.<undefined, errors.PredicateMustBeACompoundPredicate>}

Source:
Since:
  • 1.0.0
Change a CompoundPredicate logical
Parameters:
Name Type Description
predicate dataclasses.CompoundPredicate
newLogicalType_id string
Returns:
yield nothing if everything went right, otherwise yield a reject promise with the PredicateMustBeACompoundPredicate error
Type
Promise.<undefined, errors.PredicateMustBeACompoundPredicate>

(static) setPredicateTarget_id(predicate, newTarget_id) → {Promise}

Source:
Since:
  • 1.0.0
Change a predicate's target
Parameters:
Name Type Description
predicate dataclasses.ComparisonPredicate
newTarget_id string
Returns:
yield nothing if everything went right, otherwise yield a reject promise with the PredicateMustBeAComparisonPredicate error
Type
Promise

(static) setPredicateOperator_id(predicate, newTarget_id) → {Promise.<undefined, errors.PredicateMustBeAComparisonPredicate>}

Source:
Since:
  • 1.0.0
Change a predicate's operator
Parameters:
Name Type Description
predicate dataclasses.ComparisonPredicate
newTarget_id string
Returns:
yield nothing if everything went right, otherwise yield a reject promise with the PredicateMustBeAComparisonPredicate error
Type
Promise.<undefined, errors.PredicateMustBeAComparisonPredicate>