Liking cljdoc? Tell your friends :D

clara-eav.rules

Thin layer over Clara-Rules common API functions that simplifies working with EAV triplets, and adds some specific features like transient EAVs, upserts and accumulators that rebuild entity maps out of EAVs.

Thin layer over Clara-Rules common API functions that simplifies working with
EAV triplets, and adds some specific features like transient EAVs, upserts and
accumulators that rebuild entity maps out of EAVs.
raw docstring

defqueryclj/smacro

(defquery name & form)

Like Clara-Rules defquery but with support for EAV fact expressions.

Like Clara-Rules defquery but with support for EAV fact expressions.
sourceraw docstring

defruleclj/smacro

(defrule name & form)

Like Clara-Rules defrule but with support for EAV fact expressions.

Like Clara-Rules defrule but with support for EAV fact expressions.
sourceraw docstring

defsessionclj/smacro

(defsession name & nss)

Wrapper on Clara-Rules defsession with EAV's :fact-type-fn and :ancestors-fn. Pass name and namespaces (defsession my-session 'my.rules 'my.more.rules).

Wrapper on  Clara-Rules defsession with EAV's `:fact-type-fn` and
`:ancestors-fn`. Pass name and namespaces `(defsession my-session 'my.rules
'my.more.rules)`.
sourceraw docstring

entitiesclj/s

Clara-Rules Accumulator that accumulates EAVs in a list of entity maps. Ex: [?all-entities <- ce/entities :from [[:eav/all]].

Clara-Rules Accumulator that accumulates EAVs in a list of entity maps.
Ex: `[?all-entities <- ce/entities :from [[:eav/all]]`.
sourceraw docstring

entityclj/s

Clara-Rules Accumulator that accumulates EAVs in an entity map. Make sure to filter such that all EAVs returned have the eid, or you get whatever entity is first. Ex: [?new-todo-template <- ce/entity :from [[:new-todo]]].

Clara-Rules Accumulator that accumulates EAVs in an entity map.
Make sure to filter such that all EAVs returned have the eid, or you get 
whatever entity is first. Ex: `[?new-todo-template <- ce/entity :from 
[[:new-todo]]]`.
sourceraw docstring

retractclj/s

(retract session tx)

Like Clara-Rules retract; tx is transaction data with no tempids.

Like Clara-Rules retract; tx is transaction data with no tempids.
sourceraw docstring

retract!clj/s

(retract! tx)

Like Clara-Rules retract!; tx is transaction data with no tempids.

Like Clara-Rules retract!; tx is transaction data with no tempids.
sourceraw docstring

upsertclj/s

(upsert session tx)

Similar to Clara-Rules insert-all; tx is transaction data. Retracts EAVs that have the same eid and attribute but with a new value. The returned session has an extra :tempids key with the resolved tempids map {tempid -> eid}.

Similar to Clara-Rules insert-all; tx is transaction data. Retracts EAVs that
have the same eid and attribute but with a new value. The returned session has
an extra `:tempids` key with the resolved tempids map {tempid -> eid}.
sourceraw docstring

upsert!clj/s

(upsert! tx)

Similar to Clara-Rules insert-all!; tx is transaction data. Retracts EAVs that have the same eid and attribute but come with a new value.

Similar to Clara-Rules insert-all!; tx is transaction data. Retracts EAVs
that have the same eid and attribute but come with a new value.
sourceraw docstring

upsert-unconditional!clj/s

(upsert-unconditional! tx)

Similar to Clara-Rules insert-all-unconditional!; tx is transaction data. Retracts EAVs that have the same eid and attribute but with a new value.

Similar to Clara-Rules insert-all-unconditional!; tx is transaction data.
Retracts EAVs that have the same eid and attribute but with a new value.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close