This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-30
Channels
- # announcements (9)
- # babashka (22)
- # beginners (25)
- # calva (2)
- # cider (9)
- # clj-on-windows (15)
- # clj-otel (29)
- # clojure (73)
- # clojure-conj (4)
- # clojure-europe (69)
- # clojure-gamedev (4)
- # clojure-nl (1)
- # clojure-norway (19)
- # clojure-sweden (12)
- # clojure-uk (4)
- # clojuredesign-podcast (6)
- # clojurescript (5)
- # clr (52)
- # community-development (2)
- # cursive (5)
- # datahike (3)
- # datalevin (5)
- # datascript (4)
- # datomic (14)
- # dev-tooling (13)
- # events (4)
- # gratitude (12)
- # honeysql (1)
- # hyperfiddle (15)
- # jobs (1)
- # lsp (19)
- # malli (8)
- # meander (2)
- # missionary (10)
- # off-topic (12)
- # polylith (3)
- # reagent (8)
- # reitit (2)
- # remote-jobs (1)
- # shadow-cljs (31)
- # timbre (4)
Hi, I am studying a bit how AsOfDB
and SinceDB
are implemented in https://github.com/replikativ/datahike/blob/78fbfb2395869c07810e586a289afea7c5bc89a6/src/datahike/db.cljc . Both of them call dbs/temporal-search
to get the history including both additions and retraction over time. In the case of AsOfDB
, it calls the function filter-as-of-datoms
which in turn calls get-current-values
to combine the additions and retractions for every entity and attribute. In the case of SinceDB
, it calls filter-since
, but that functions simply throws away the retractions using the line https://github.com/replikativ/datahike/blob/78fbfb2395869c07810e586a289afea7c5bc89a6/src/datahike/db.cljc#L477 instead.
Does anyone know why we would not use the get-current-values
function also from the filter-since
function just like we did for the filter-as-of-datoms
?
@UB95JRKM3 implemented this functionality originally. I can take a look as well if you are busy @UB95JRKM3.
Thanks! The reason why I am asking is because I am currently restructuring the code to enable compositions such as (history (as-of (since db ...) ..))
which currently isn't possible. And while doing that restructuring, I am touching this part of the code.