This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-03-23
Channels
- # announcements (2)
- # babashka (25)
- # beginners (33)
- # biff (13)
- # calva (13)
- # clerk (82)
- # clj-commons (3)
- # clj-kondo (8)
- # clj-on-windows (23)
- # cljdoc (6)
- # clojure (16)
- # clojure-belgium (1)
- # clojure-dev (58)
- # clojure-europe (53)
- # clojure-nl (1)
- # clojure-norway (15)
- # clojure-uk (2)
- # clojurescript (17)
- # core-async (5)
- # cursive (6)
- # datahike (1)
- # datomic (8)
- # emacs (25)
- # etaoin (21)
- # events (4)
- # graalvm (33)
- # honeysql (7)
- # hyperfiddle (1)
- # lsp (49)
- # luminus (4)
- # malli (18)
- # off-topic (63)
- # reagent (11)
- # releases (1)
- # shadow-cljs (200)
- # timbre (1)
- # tools-build (17)
Hi, is there a way to use a pull expression when using a query map, eg:
(d/q {:query '{:find [(pull ?r ?pattern)]
:in [$ ?name ?category ?pattern]
:where ...
:args [db "home" "shopping" '[*]']})
I have tried in different ways and I get an error every time.
All the examples I have found so far use the form:
(d/q '[:find (pull ?r ?pattern)
:in $ ?name ?category ?pattern
:where ...]
db "home" "shopping" '[*])
I’m on cloudYou’re close https://docs.datomic.com/cloud/query/query-data-reference.html#separation-of-concerns
(d/q {:query '{:find [(pull ?r pattern)]
:in [$ ?name ?category pattern]
:where ...
:args [db "home" "shopping" '[*]]})
yup, it was a typo
and yes, that was the problem, is pattern
without the question mark :face_palm:
silly mistake, I’m not sure why I put it that way
thank you! 🙇