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 or :then-finally block.
Provides the current value of the session from inside a :then or :then-finally block.
(add-rule session rule)
Adds a rule to the given session.
Adds a rule to the given session.
(fire-rules session)
Fires :then and :then-finally blocks for any rules with a complete set of matches.
Fires :then and :then-finally blocks for any rules with a complete set of matches.
(insert session [id attr value])
(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)
Equivalent to:
(o/reset! (o/insert o/session id attr value))
Using the long form is recommended.
Equivalent to: (o/reset! (o/insert o/*session* id attr value)) Using the long form is recommended.
(query-all session)
(query-all session rule-name)
When called with just a session, returns a vector of all inserted facts. Otherwise, returns a vector of maps containing all the matches for the given rule.
When called with just a session, returns a vector of all inserted facts. Otherwise, returns a vector of maps containing all the matches for the given rule.
(reset! new-session)
Mutates the session from a :then or :then-finally block.
Mutates the session from a :then or :then-finally 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)
Equivalent to:
(o/reset! (o/retract o/session id attr))
Using the long form is recommended.
Equivalent to: (o/reset! (o/retract o/*session* id attr)) Using the long form is recommended.
(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