This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-28
Channels
- # aleph (4)
- # announcements (5)
- # babashka (28)
- # babashka-sci-dev (13)
- # beginners (63)
- # calva (76)
- # cider (113)
- # clara (7)
- # clj-kondo (42)
- # cljdoc (1)
- # clojure (170)
- # clojure-europe (20)
- # clojure-nl (17)
- # clojure-norway (3)
- # clojure-spec (12)
- # clojure-sweden (1)
- # clojure-uk (6)
- # clojurescript (55)
- # clojureverse-ops (1)
- # consulting (1)
- # core-async (9)
- # cursive (16)
- # data-science (1)
- # datascript (8)
- # datomic (27)
- # emacs (14)
- # events (1)
- # fulcro (10)
- # graphql (9)
- # gratitude (1)
- # jobs (6)
- # jobs-discuss (5)
- # leiningen (10)
- # lsp (35)
- # missionary (4)
- # nextjournal (9)
- # off-topic (46)
- # pathom (15)
- # pedestal (5)
- # polylith (37)
- # portal (15)
- # re-frame (22)
- # reagent (4)
- # reitit (5)
- # reveal (18)
- # shadow-cljs (20)
- # tools-deps (7)
- # xtdb (10)
I’m experiencing unexpected results. I’ve got a small database that returns a map with unrelated attributes from a pull (including :db/id nil
) - when I try to pull with a db.unique/identity selector.
(d/pull @conn '[*] [:endpoint/name "none"])
{:access/endpoint #:db{:id 37},
:access/app+endpoint [36 37],
:access/app #:db{:id 36},
:app/password-hash
"5e063ba6dcff4b7bc0234be7861dac8c4dd7db573f36755e0578b2e77a5cf6bf",
:endpoint/url "
:path/spec "/",
:endpoint/proxy-options {:auth "fred:wilma"},
:access/paths
[#:db{:id 1}
#:db{:id 10}
#:db{:id 11}
#:db{:id 1}
#:db{:id 1}
#:db{:id 1}
#:db{:id 3}
#:db{:id 25}
#:db{:id 1}
#:db{:id 10}
#:db{:id 11}
#:db{:id 1}
#:db{:id 10}
#:db{:id 11}],
:app/name "bubbles",
:endpoint/name "Basic.Auth.Backend",
:db/id nil,
:app/password-salt "5970ad7d7501916274cf114f68d2aed0"}
note that :endpoint/name is defined as :endpoint/name {:db/unique :db.unique/identity}
and there is no entity with endpoint/name “none”
if I do (d/pull @conn '[:endpoint/name :db/id] [:endpoint/name "none"])
I get the expected result: nil
so the difference in the query the [*]
vs a list of attributes in the pull spec
Any hints as to what I’m doing wrong?