Provides a map of all the matched values from inside a :then block.
Provides a map of all the matched values from inside a :then block.
Provides the current value of the session from inside a :then block. Normally used to allow querying the session from inside a rule.
Provides the current value of the session from inside a :then block. Normally used to allow querying the session from inside a rule.
(add-rule session rule)
Adds a rule to the given session.
Adds a rule to the given session.
(fire-rules session)
Fires :then blocks for any rules with a complete set of matches.
Fires :then blocks for any rules with a complete set of matches.
(insert session id attr->value)
(insert session id attr value)
Inserts a fact into the session. Can optionally insert multiple facts with the same id.
Inserts a fact into the session. Can optionally insert multiple facts with the same id.
(insert! id attr->value)
(insert! id attr value)
Same as insert
but can be used inside of a :then block.
The function is DEPRECATED. It will never be removed, but prefer this instead:
(o/reset! (o/insert o/session id attr))
Same as `insert` but can be used inside of a :then block. The function is DEPRECATED. It will never be removed, but prefer this instead: (o/reset! (o/insert o/*session* id attr))
(query-all session rule-name)
Returns a vector of maps containing all the matches for the given rule.
Returns a vector of maps containing all the matches for the given rule.
(reset! new-session)
Mutates the session from a :then block.
Mutates the session from a :then block.
(retract session id attr)
Retracts the fact with the given id + attr combo.
Retracts the fact with the given id + attr combo.
(retract! id attr)
Same as retract
but can be used inside of a :then block.
The function is DEPRECATED. It will never be removed, but prefer this instead:
(o/reset! (o/retract o/session id attr))
Same as `retract` but can be used inside of a :then block. The function is DEPRECATED. It will never be removed, but prefer this instead: (o/reset! (o/retract o/*session* id attr))
(ruleset rules)
Returns a vector of rules after transforming the given map.
Returns a vector of rules after transforming the given map.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close