This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-19
Channels
- # aleph (9)
- # announcements (1)
- # asami (21)
- # aws (1)
- # babashka (4)
- # babashka-sci-dev (95)
- # beginners (35)
- # calva (27)
- # cider (17)
- # cljsrn (1)
- # clojure-europe (8)
- # clojure-norway (1)
- # clojuredesign-podcast (4)
- # clojurescript (18)
- # code-reviews (28)
- # core-logic (1)
- # cursive (3)
- # datalevin (2)
- # holy-lambda (3)
- # honeysql (1)
- # introduce-yourself (11)
- # kaocha (12)
- # lsp (11)
- # malli (9)
- # off-topic (46)
- # polylith (16)
- # re-frame (3)
- # reitit (2)
- # releases (2)
- # tools-deps (9)
- # web-security (1)
- # xtdb (2)
I was checking how to do some auditing based on the transaction time, using the space adventure as a basis.
At first I tried changing the entity-history
params so that it would show an older version of the contents:
(xt/entity-history
(xt/db node {::xt/valid-time #inst "2200-01-01"})
:kaarlang/clients
:desc
{:with-docs true
:end-tx-time #inst "2022-01-01"})
but neither the end-tx-time nor the end-tx-id seem to do anything.
Then I checked the https://docs.xtdb.com/concepts/bitemporality/#crime, but using `
(xt/db node {::xt/tx #inst "2019-01-03"})
also just gave the full history. Then I found out from https://docs.xtdb.com/clients/clojure/#_db that the right key is actually ::xt/tx-time.
So I got it working, but I have no idea if the entity-history is supposed to filter transactions, and there seems to be a bug in the crime scene docs?Hey @U8ZQ1J1RR thanks for mentioning this! > I have no idea if the entity-history is supposed to filter transactions Yep, it definitely should be filtering correctly - the indexes are very much designed to allow you to scan partial sections of history. I'll try to get the docs fixed soon (before the next release is cut!) 🙏