Fork me on GitHub
#xtdb
<
2022-02-23
>
jarohen17:02:58

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
xt 4
šŸš€ 4
šŸ™Œ 3
šŸ‘ 2
tatut08:02:43

took it for a spin in local dev environment, at least our test suite has no regressions

šŸ™ 1
ā¤ļø 1
tatut08:02:03

and xtdb-inspector works as well, no problems so far

refset11:02:54

that's great to hear, thank you šŸ™‚

bortexz19:02:47

Is there any way to use :order-by with pull syntax in :find? Or should I get ids and pull-many?

bortexz19:02:08

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})

refset20:02:40

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})

bortexz20:02:46

that worked, thanks!

šŸ™ 1