This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-23
Channels
- # announcements (16)
- # asami (4)
- # babashka (49)
- # beginners (70)
- # calva (25)
- # clojars (3)
- # clojure (40)
- # clojure-europe (82)
- # clojure-france (15)
- # clojure-gamedev (16)
- # clojure-nl (2)
- # clojured (7)
- # clojurescript (13)
- # conjure (11)
- # cursive (4)
- # data-science (12)
- # datalevin (2)
- # figwheel-main (5)
- # gratitude (5)
- # honeysql (5)
- # hyperfiddle (4)
- # jobs (4)
- # joyride (3)
- # lsp (10)
- # malli (2)
- # missionary (14)
- # nbb (2)
- # off-topic (3)
- # pathom (16)
- # rdf (5)
- # releases (4)
- # sci (35)
- # shadow-cljs (16)
- # tools-deps (22)
- # xtdb (7)
So I'm curious, is this considered a bug?
(let [eg-db-uri "asami:"
conn (asami/connect eg-db-uri)
_ @(asami/transact conn {:tx-data [{:coord [0 0]}]})
db (asami/db conn)]
(asami/q
'[:find [?e ...]
:where
[?e :coord [0 0]]]
db))
#_=> ()
I'm aware you can do this:
(let [eg-db-uri "asami:"
conn (asami/connect eg-db-uri)
db (asami/db conn)
new-node (zuko.node/new-node (asami/graph db))
_ @(asami/transact conn {:tx-triples [[new-node :coord [0 0]]]})
db (asami/db conn)]
(asami/q
'[:find [?e ...]
:where
[?e :coord [0 0]]]
db))
#_=> (:a/node-65763)
I know it decomposes it, which is why it doesn't match and perhaps it's done for performance? However, this seems to fail the test of, I transact something in, I should be able to query it out.
If there's some better way to query this that I'm missing, please tell me 😃...No, it's not considered a bug.
The first case is (currently) explicitly supposed to decompose the array into triples, and therefore the query is guaranteed to return nothing. The only time an array is not decomposed is if the property is :db/ident
or :id