Predicates are functions that takes as a param a value and return true if the value matches predicate, false otherwise and nil if comparison can't be done. Predicate functions can be expressed via a query language represented with vector. This namespace is about managing that language
Predicates are functions that takes as a param a value and return true if the value matches predicate, false otherwise and nil if comparison can't be done. Predicate functions can be expressed via a query language represented with vector. This namespace is about managing that language
(apply-query pred d)
(apply-query reg pred d)
Accepts pred
query vector, translates it with reg
and applies it to d
Returns response from predicate or nil if application couldn't be done
Accepts `pred` query vector, translates it with `reg` and applies it to `d` Returns response from predicate or nil if application couldn't be done
(apply-query-detailed pred d)
(apply-query-detailed reg pred d)
Same as apply-query
, but in case of an error it returns a map with more detailed information
Same as `apply-query`, but in case of an error it returns a map with more detailed information
(is-predicate? reg pred)
Predicate vector language consists of :keyword represnting the name of predicate and zero or more parameters for that predicate See predicate language
Predicate vector language consists of :keyword represnting the name of predicate and zero or more parameters for that predicate [See predicate language](docs/archi/transformation/predicate_query.png)
Predicate registry consists of keyword keys representing predicate name with map as a value, containing an implementation of the predicate under :pred-fn and metadata for the predicate
Predicate registry consists of keyword keys representing predicate name with map as a value, containing an implementation of the predicate under :pred-fn and metadata for the predicate
(predicate-lang->pred-fn-detailed pred)
(predicate-lang->pred-fn-detailed reg pred)
Turns predicate query language into a function
Turns predicate query language into a function
(predicate-lang->predicate-fn pred)
(predicate-lang->predicate-fn reg pred)
Translates pred
vector language into a function. Expects reg
map containing predicate name as keys with values containing a function under :pred-fn
Translates `pred` vector language into a function. Expects `reg` map containing predicate name as keys with values containing a function under :pred-fn
(predicate-validation reg pred)
Default predicates language registry. See more
Default predicates language registry. [See more](docs/archi/transformation/predicate_registry.png)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close