This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-02-23
Channels
- # announcements (2)
- # atom-editor (3)
- # babashka (49)
- # beginners (100)
- # biff (9)
- # calva (78)
- # clj-kondo (18)
- # clojure (143)
- # clojure-europe (13)
- # clojure-germany (1)
- # clojure-nl (2)
- # clojure-spec (5)
- # clojure-sweden (2)
- # clojure-uk (4)
- # clojurescript (58)
- # conjure (1)
- # cursive (4)
- # datascript (11)
- # datomic (63)
- # docker (7)
- # emacs (18)
- # events (1)
- # fulcro (18)
- # graalvm (5)
- # helix (4)
- # improve-getting-started (13)
- # jobs (4)
- # jobs-discuss (3)
- # lsp (15)
- # malli (90)
- # membrane (14)
- # off-topic (12)
- # other-languages (5)
- # pedestal (7)
- # polylith (53)
- # re-frame (15)
- # reitit (23)
- # releases (4)
- # remote-jobs (9)
- # ring (11)
- # shadow-cljs (90)
- # specter (2)
- # testing (3)
- # tools-build (63)
- # vim (2)
- # xtdb (8)
Evening folks - we've released 1.21.0-beta1
today - more details here: https://discuss.xtdb.com/t/ann-1-21-0-beta1s-out/77 š
Thanks again to everyone contributing by raising issues and helping with repros!
š 11

š 4
š 3
š 2
took it for a spin in local dev environment, at least our test suite has no regressions
š 1
ā¤ļø 1
Is there any way to use :order-by with pull syntax in :find? Or should I get ids and pull-many?
Iām getting the following error:
; Execution error (IllegalArgumentException) at xtdb.error/illegal-arg (error.clj:12).
; Order by requires an element from :find. unreturned element: [:logic-var ?ts]
Using this:
(xt/q (xt/db mem-node)
'{:find [(pull ?trade [* {:trade/market [*]}])]
:where [[?trade :trade/id _]
[?trade :trade/timestamp ?ts]]
:order-by [[?ts :asc]]
:limit 10})
Hey @U6CN6JQ22 I think you just need to include ?ts
in your :find
so that the order-by kicks in, but ignore it from the tuples when processing the results, i.e.
(xt/q (xt/db mem-node)
'{:find [(pull ?trade [* {:trade/market [*]}]) ?ts]
:where [[?trade :trade/id _]
[?trade :trade/timestamp ?ts]]
:order-by [[?ts :asc]]
:limit 10})