This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-25
Channels
- # aleph (9)
- # announcements (2)
- # babashka (32)
- # babashka-sci-dev (72)
- # beginners (77)
- # calva (1)
- # cider (3)
- # clj-kondo (19)
- # clojure (61)
- # clojure-brasil (13)
- # clojure-europe (25)
- # clojure-italy (1)
- # clojure-nl (2)
- # clojure-norway (27)
- # clojure-uk (23)
- # clojuredesign-podcast (6)
- # clojurescript (12)
- # conjure (2)
- # core-typed (3)
- # cursive (6)
- # datalevin (2)
- # datomic (13)
- # emacs (9)
- # events (19)
- # fulcro (6)
- # graphql (11)
- # gratitude (2)
- # helix (3)
- # honeysql (16)
- # jobs (1)
- # lsp (89)
- # malli (33)
- # meander (14)
- # off-topic (87)
- # pathom (4)
- # polylith (7)
- # portal (4)
- # practicalli (1)
- # rdf (6)
- # reagent (2)
- # releases (8)
- # remote-jobs (1)
- # shadow-cljs (59)
- # sql (8)
- # tools-deps (14)
- # xtdb (18)
I did find one regression in 1.21.0 (I think), related to query that has to workaround https://github.com/xtdb/xtdb/issues/1533 I had a where clause with clauses [[(get-attr ?c :type) [?type]] [(= ?type :some-value)]]
that cause Clause refers to unknown variable: ?type {:op =, :sym ?type, :val :some-value}
that worked in earlier version, I changed the latter clause to [(identity :some-value) ?type]
and it works now
related note, is there anything users could do to help progress that bug ? fixing it might be too difficult for someone not versed in the internals
but it is quite cumbersome to workaround, needing to split complicated queries to multiple queries... especially when dynamically generating where clauses
hey @U11SJ6Q0K π thanks for the report.
I'm afraid I can't repro this though - I'm doing the following:
tx:
[[::xt/put {:xt/id :foo, :type :some-value}]]
q:
(t/is (= #{[:foo]}
(xt/q (xt/db *api*)
'{:find [?e]
:where [[?e :xt/id]
[(get-attr ?e :type) [?type]]
[(= ?type :some-value)]]})))
that particular example works... I'll double check what is the difference in my actual query
might be related to or
perhaps, here is a failing example
(xt/submit-tx node [[::xt/put {:xt/id :foo, :type :some-value :term "search by this"}]])
(xt/q (xt/db node)
'{:find [?e]
:where [[(get-attr ?e :type) [?type]]
[(= ?type :some-value)]
(or [(text-search :term term) [[?e]]]
[(text-search :term other) [[?e]]])]
:in [term other]}
"search" "this")
simpler example that fails as well
(xt/q (xt/db node)
'{:find [?e]
:where [[(get-attr ?e :type) [?type]]
[(= ?type :some-value)]
(or [?e :type :some-value]
[?e :type :other])]})
yeah, this does seem related to some refactoring that happened as part of 1.21.0. will take a look
Slightly off-topic, but some force in the universe really wants me to attend todays session! :rolling_on_the_floor_laughing:
Thanks for the warm session learnt some really cool things which I can explore!