This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-19
Channels
- # announcements (15)
- # babashka (4)
- # beginners (55)
- # calva (92)
- # cider (70)
- # circleci (1)
- # clj-kondo (136)
- # cljdoc (2)
- # clojars (11)
- # clojure (48)
- # clojure-australia (1)
- # clojure-europe (30)
- # clojure-nl (3)
- # clojure-sweden (2)
- # clojure-uk (7)
- # clojurescript (40)
- # conjure (5)
- # core-async (11)
- # cursive (55)
- # data-science (1)
- # datomic (10)
- # degree9 (2)
- # development-containers (15)
- # events (1)
- # fulcro (14)
- # gratitude (13)
- # helix (5)
- # lsp (35)
- # malli (10)
- # meander (18)
- # off-topic (24)
- # pathom (13)
- # polylith (12)
- # practicalli (6)
- # re-frame (13)
- # reagent (33)
- # reitit (4)
- # remote-jobs (1)
- # shadow-cljs (13)
- # spacemacs (31)
- # specter (1)
- # stepwise (2)
- # tools-deps (19)
- # vim (1)
- # xtdb (7)
What is a good way to refer to a past state of the DB that would survive backup+restore or something like https://github.com/fulcrologic/datomic-cloud-backup ? I suppose transaction ID changes, when replaying the transactions in a new DB but perhaps (:t (d/db conn))
remains the same, if the transactions are replayed in the same order and none is missed?
> perhaps `(:t (d/db conn))` remains the same, if the transactions are replayed in the same order and none is missed?
no, because the T value is used for all minted entities. If each transaction is exactly the same and issued in the same order, and you don’t hit edge cases like schema upgrades and such, maybe they will be the same, but I wouldn’t count on it
thank you!
How do :db.type/ref
work? I guess there are no built-in checks and I can set it to something that looks like an entity ID, even if no such entity exists (or it existed but has been retracted). Correct?
There is I think a trivial check that the T value of the entity-id does not exceed the T value of the database and the partition bits of the entity-id correspond to a partition that actually exists. However there’s no solid notion of an entity “existing” or not--it’s just a number.
I think the easiest way to enforce “the value of this ref-attr attribute is an entity obeying some expectation/interface/contract” is :db/ensure and entity specs.
I thought so. Thank you for confirmation!