Fork me on GitHub
Lone Ranger16:10:16

You can do arbitrary predicates, but it's not well documented

Lone Ranger16:10:21

let me see if I can get an example

Lone Ranger16:10:35

You can also do transaction functions

Lone Ranger16:10:50

IIRC the trick is to use fully qualified symbols

Lone Ranger16:10:58


(defn my-pred=+1 [a b]
  (= a (inc b))

(d/q '[:find ?e 
       [?e :a ?a]
       [?e :b ?b]
       [(#'my-pred ?a ?b) ?c]]

👍 3

How does that even work under advanced compilation


That’s interesting. What we’ve been doing is passing the predicates in as inputs to the query.

👍 3
David Pham17:10:26

I think it is even in the documentation.