invariants

Methods

(static) CompoundPredicateMustHaveAtLeastOneSubPredicate(predicatesnullable) → {Promise.<undefined, errors.CompoundPredicateMustHaveAtLeastOneSubPredicate>}

Source:
Since:
  • 1.0.0
[CompoundPredicateMustHaveAtLeastOneSubPredicate description]
Parameters:
Name Type Attributes Description
predicates Array.<Predicate>
nullable
list of predicates to add to a CompoundPredicate at creation time
Returns:
resolve the promise if the invariant pass or yield a `CompoundPredicateMustHaveAtLeastOneSubPredicate` error otherwise
Type
Promise.<undefined, errors.CompoundPredicateMustHaveAtLeastOneSubPredicate>

(static) PredicateTypeMustBeValid(type, acceptedTypes) → {Promise.<undefined, errors.InvalidPredicateType>}

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
type String Predicate type
acceptedTypes Object list of accepted types
Returns:
resolve the promise if the invariant pass or yield a `InvalidPredicateType` error otherwise
Type
Promise.<undefined, errors.InvalidPredicateType>

(static) RootPredicateMustBeACompoundPredicate(root, CompoundPredicate) → {Promise.<dataclasses.CompoundPredicate, errors.RootPredicateMustBeACompoundPredicate>}

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
root dataclasses.CompoundPredicate root
CompoundPredicate dataclasses.CompoundPredicate CompoundPredicate
Returns:
resolve the promise if the invariant pass or yield a `RootPredicateMustBeACompoundPredicate` error otherwise
Type
Promise.<dataclasses.CompoundPredicate, errors.RootPredicateMustBeACompoundPredicate>

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

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
predicate dataclasses.Predicate predicate
ComparisonPredicate dataclasses.ComparisonPredicate ComparisonPredicate constructor
Returns:
resolve the promise if the invariant pass or yield a `PredicateMustBeAComparisonPredicate` error otherwise
Type
Promise.<undefined, errors.PredicateMustBeAComparisonPredicate>

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

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
predicate dataclasses.Predicate predicate
CompoundPredicate dataclasses.CompoundPredicate CompoundPredicate constructor
Returns:
resolve the promise if the invariant pass or yield a `PredicateMustBeACompoundPredicate` error otherwise
Type
Promise.<undefined, errors.PredicateMustBeACompoundPredicate>

(static) LogicalType_idMustReferToADefinedLogicalType(logicalType) → {Promise.<dataclasses.LogicalType, errors.LogicalType_idMustReferToADefinedLogicalType>}

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
logicalType Option.<dataclasses.LogicalType> logicalType
Returns:
resolve the promise if the invariant pass or yield a `LogicalType_idMustReferToADefinedLogicalType` error otherwise
Type
Promise.<dataclasses.LogicalType, errors.LogicalType_idMustReferToADefinedLogicalType>

(static) RemovePredicateMustDifferFromRootPredicate(root, predicateToRemove) → {Promise.<predicateToRemove, errors.ForbiddenCannotRemoveRootCompoundPredicate>}

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
root dataclasses.CompoundPredicate root
predicateToRemove dataclasses.Predicate predicateToRemove
Returns:
resolve the promise if the invariant pass or yield a `ForbiddenCannotRemoveRootCompoundPredicate` error otherwise
Type
Promise.<predicateToRemove, errors.ForbiddenCannotRemoveRootCompoundPredicate>

(static) RemovePredicateCannotBeTheLastComparisonPredicate(root, predicateToRemove, CompoundPredicate, ComparisonPredicate) → {Promise.<undefined, errors.ForbiddenCannotRemoveLastComparisonPredicate>}

Source:
Since:
  • 1.0.0
Parameters:
Name Type Description
root dataclasses.CompoundPredicate root
predicateToRemove dataclasses.Predicate predicateToRemove
CompoundPredicate dataclasses.CompoundPredicate CompoundPredicate
ComparisonPredicate dataclasses.ComparisonPredicate ComparisonPredicate
Returns:
resolve the promise if the invariant pass or yield a `RootPredicateMustBeACompoundPredicate` error otherwise
Type
Promise.<undefined, errors.ForbiddenCannotRemoveLastComparisonPredicate>