BTW I think that I have a very interesting use case for Clara rules, once done ill share it but I'm very excited about it
Hi Clara team, is there an option to run a query that matches any fact? for example:
(defquery get-failures []
(?f <- [_ true]))
Assuming that the first value in the vector is not important we only care for the second true valueOr alternatively:
(defquery get-failures []
(?f <- _ (= ?failure true)))
(looks like ancestors-fn might be useful in such a case?)
A rule/query that has a fact type of Object would find all facts
In my case I'm using a keyword as the fact type, if I understand this correctly (ancestors :foo) is nil so Object dosent capture this?
(defquery get-failures []
(?f <- Object (= ?failure true)))
Sounds like I need to use an actual clojure keys hierarchy?
ah when using a custom fact-type-fn i think the only reliable way to achieve this would be to also provide a matching custom ancestors-fn
Makes sense, ill continue to fiddle with it
Thanks