clara

http://www.clara-rules.org/
Joel 2019-04-27T04:04:55.008100Z

I want to have multiple rule systems, each would have it's own namespace, but I'd like to share not only records, but defquerys as well. However, I'm not figuring out how to add the defquery from another namespace.

2019-04-27T17:08:26.008200Z

@joel380 you can pass ns names, or a collection of rule/query structures to mk -session

2019-04-27T17:08:30.008300Z

So if you did defquery, you’d just do:

(mk-session [my-query])

👍 1
2019-04-27T17:08:34.008400Z

There is more you can do too if you mark a var metadata with :production-seq that allows you to store sequences of rule/query structures under a single var when a ns is searched for rules/queries.

Joel 2019-04-27T23:14:44.009300Z

thanks, i had tried (mk-session '(my-query)) ... still getting up to speed on clojure

Joel 2019-04-27T23:18:47.009700Z

hopefully that let's me use another ns as well. ill give it a go.

2019-04-28T09:53:40.013Z

Yes, you can use an arbitrary mix of namespaces and sequences of explicitly included rules/queries when defining your session.