This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-03
Channels
- # announcements (5)
- # babashka (7)
- # beginners (119)
- # biff (4)
- # cider (7)
- # clj-kondo (26)
- # cljfx (3)
- # cljs-dev (2)
- # clojure (28)
- # clojure-austin (18)
- # clojure-europe (9)
- # clojure-france (6)
- # clojure-norway (4)
- # clojure-uk (3)
- # clojurescript (6)
- # community-development (1)
- # core-async (4)
- # cursive (9)
- # data-science (12)
- # datomic (13)
- # duct (18)
- # emacs (15)
- # etaoin (5)
- # events (13)
- # honeysql (46)
- # hyperfiddle (9)
- # jackdaw (5)
- # jobs (13)
- # keechma (4)
- # lsp (37)
- # malli (32)
- # nbb (14)
- # off-topic (10)
- # other-languages (2)
- # polylith (4)
- # programming-beginners (3)
- # reagent (27)
- # reitit (1)
- # shadow-cljs (32)
- # sql (11)
- # tools-build (5)
- # tools-deps (3)
- # vim (14)
- # xtdb (11)
Is there a way to achieve "show me all transactions submitted in this date range"? after-tx-id
of open-tx-log
would be useful, but I wouldn't know how to find an appropriate tx-id given a date (e.g. "get id of the first tx made on this date").
I'd like to support queries such as "find all docs for which this field acquired this value at this date range", without manually tracking time of field changes. Example:
t0: {:xt/id 1 :text "todo1" :status :todo}
t5: {:xt/id 1 :text "todo1" :status :done}
As far as I can tell there are two strategies:
1. Go through tx-log for e.g. t4-t7, filter :done
todos, determine whether they were :todo
at t3.
2. Find all :done
todos, go through entity history for each to determine when they were last :todo
, etc.
Other ideas? Thoughts?go thru tx-log with-ops? true, gather all doc ids from put operations that have the desired value… then do 1 query in a historical db before the 1st tx and query the same attribute and compare
but couldn’t you also just run the same query before the 1st tx and after the date range? depends on the exact use case
> but couldn’t you also just run the same query before the 1st tx and after the date range? depends on the exact use case Oh, that's much simpler conceptually and might work 🙂