This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-21
Channels
- # announcements (10)
- # aws (38)
- # beginners (220)
- # calva (2)
- # cider (26)
- # clj-kondo (194)
- # cljs-dev (4)
- # clojure (190)
- # clojure-dev (7)
- # clojure-europe (3)
- # clojure-italy (6)
- # clojure-nl (4)
- # clojure-uk (8)
- # clojured (1)
- # clojurescript (29)
- # code-reviews (31)
- # community-development (9)
- # core-async (24)
- # cursive (38)
- # data-science (51)
- # datomic (52)
- # dirac (2)
- # emacs (3)
- # events (1)
- # figwheel-main (4)
- # fulcro (49)
- # graphql (13)
- # heroku (1)
- # hoplon (19)
- # immutant (3)
- # leiningen (1)
- # nrepl (59)
- # off-topic (12)
- # onyx (2)
- # pathom (51)
- # reitit (15)
- # shadow-cljs (88)
- # spacemacs (6)
- # sql (3)
- # tools-deps (107)
- # xtdb (11)
I suppose in a sense you can get both a date-created
and date-updated
by using the history api and taking the tx-time from the last result in the entity's history for date-created
value and the tx-time from the first result in the history for date-updated
Not stored within an entity itself, though, unsure if that could be used to sort within a crux query.
The documentation seems to say that this isn't possible, but i'll do some fishing around
Would you happen to know about a good resource listing all of the supported query functions that can be used, or should I follow the datomic documentation and negate any functions they deem unsupported in the crux documentation?
I think the best resource for this would likely be the crux queries page in the documentation, https://juxt.pro/crux/docs/queries.html
I believe at the moment the best way to do this would to just use sort-by, like this (or something similar, anyway) for sorting by creation time
(sort-by #(:crux.tx/tx-time (last (crux/history node %)) entities)
I've read that over, but there doesn't seem to be an API reference for what can be used within a query. I understand that crux is still early alpha, so I expect these things to be left out until things have settled down into a stable version