This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-15
Channels
- # admin-announcements (1)
- # announcements (8)
- # babashka (6)
- # beginners (70)
- # bristol-clojurians (1)
- # chlorine-clover (15)
- # cider (3)
- # cljs-dev (2)
- # cljsrn (27)
- # clojure (249)
- # clojure-europe (19)
- # clojure-italy (2)
- # clojure-nl (12)
- # clojure-spec (11)
- # clojure-uk (42)
- # clojuredesign-podcast (6)
- # clojurescript (39)
- # community-development (1)
- # conjure (43)
- # cursive (37)
- # data-science (1)
- # datomic (3)
- # duct (16)
- # figwheel-main (23)
- # fulcro (3)
- # instaparse (5)
- # java (5)
- # jobs (1)
- # jobs-discuss (1)
- # malli (11)
- # off-topic (27)
- # re-frame (32)
- # reagent (5)
- # reitit (2)
- # rum (15)
- # shadow-cljs (24)
- # spacemacs (7)
- # sql (5)
- # test-check (3)
- # tools-deps (5)
Is there a way to access the entity id of the entity which a pull pattern is operating on? For example I'd like to get back ?e in addition to the value of :entity/attr2
(d/qseq {:query '[:find (pull ?e [:entity/attr2])
:where
[?e :entity/attr1 "Attr1Value"]]
:args [(d/db conn)]})
I need to stream the results set into memory since there are millions of these entities in our database and they may not all fit in memory at once. I would use the datoms API but the query is asking for the entity id and value of all the :entity/attr2 datoms that have the value "Attr1Value" for :entity/attr1. It seems like the datoms API is more geared towards operating on a single attribute. I'm hoping qseq will allow me to express this logic while also streaming the results, I just need access to ?e. Anyone have any thoughts?