This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-08
Channels
- # announcements (10)
- # babashka (4)
- # beginners (98)
- # cider (47)
- # clara (6)
- # clj-kondo (16)
- # clojure (54)
- # clojure-australia (3)
- # clojure-berlin (3)
- # clojure-czech (2)
- # clojure-europe (77)
- # clojure-nl (4)
- # clojure-uk (12)
- # clojuredesign-podcast (6)
- # clojurescript (10)
- # conjure (56)
- # cursive (3)
- # data-science (6)
- # datascript (8)
- # datomic (213)
- # depstar (5)
- # events (1)
- # figwheel-main (2)
- # fulcro (23)
- # graalvm (2)
- # jobs (3)
- # london-clojurians (1)
- # malli (30)
- # meander (15)
- # midje (1)
- # mount (5)
- # off-topic (18)
- # re-frame (4)
- # reitit (15)
- # remote-jobs (1)
- # shadow-cljs (23)
- # spacemacs (10)
- # specter (1)
- # tools-deps (88)
- # vim (16)
- # xtdb (1)
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)
👍 3
That’s interesting. What we’ve been doing is passing the predicates in as inputs to the query.
👍 3
I think it is even in the documentation.