This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-06-19
Channels
- # beginners (50)
- # boot (82)
- # cider (42)
- # clojure (206)
- # clojure-india (1)
- # clojure-nl (2)
- # clojure-poland (2)
- # clojure-russia (1)
- # clojure-uk (6)
- # clojurescript (223)
- # code-reviews (17)
- # core-typed (3)
- # datomic (7)
- # dunaj (3)
- # editors (2)
- # instaparse (3)
- # jobs (1)
- # ldnclj (37)
- # overtone (3)
- # reactive (1)
- # reading-clojure (1)
- # reagent (24)
- # remote-jobs (1)
What would be the idiomatic way of getting the time of creation of the db? Sort of like the opposite of basis-t
(d/q '[:find [(min ?inst)] :where [?tx :db/txInstant ?inst]] db)
doesn't work because there's always a transaction set at the epoch
frankie: I don't think the "time of creation of the DB" is stored anywhere. The best you could do is "time the first user-space entity was created."
@stuartsierra: What would the query look like?
@frankie Or just get the txInstant from the first transaction returned by (d/tx-range (d/log conn) nil nil)
Just discovered that min
actually takes an optional n
parameter, so I could jus drop the first returned from (d/q '[:find [(min 2 ?inst)] :where [?tx :db/txInstant ?inst]] db)
@stuartsierra: can't use d/log, I have db as a value passed down from other fns. That was another good idea tho