You can do arbitrary predicates, but it's not well documented
let me see if I can get an example
You can also do transaction functions
IIRC the trick is to use fully qualified symbols
i.e.,
(defn my-pred=+1 [a b]
(= a (inc b))
(d/q '[:find ?e
:where
[?e :a ?a]
[?e :b ?b]
[(#'my-pred ?a ?b) ?c]]
@conn)
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.
I think it is even in the documentation.