- Source:
ui-predicate core public API
Members
(static) root
- Source:
Get root CompoundPredicate
Methods
(static) setData(root) → {Promise.<undefined, errors.RootPredicateMustBeACompoundPredicate>}
- Source:
- Since:
- 1.0.0
Set PredicateCore data
Parameters:
Name | Type | Description |
---|---|---|
root
|
dataclasses.CompoundPredicate | CompoundPredicate |
Returns:
resolved promise yield nothing, rejected promise yield RootPredicateMustBeACompoundPredicate error
- Type
- Promise.<undefined, errors.RootPredicateMustBeACompoundPredicate>
(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) remove(predicate) → {Promise.<dataclasses.Predicate>}
- Source:
- Since:
- 1.0.0
Remove a ComparisonPredicate or CompoundPredicate
Parameters:
Name | Type | Description |
---|---|---|
predicate
|
dataclasses.ComparisonPredicate | dataclasses.CompoundPredicate |
Returns:
yield the removed predicate, will reject the promise if remove was called with the root CompoundPredicate or the last ComparisonPredicate of the root CompoundPredicate
- 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>