This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-07
Channels
- # adventofcode (3)
- # announcements (6)
- # babashka (20)
- # beginners (53)
- # calva (11)
- # clj-kondo (11)
- # clojure (50)
- # clojure-argentina (4)
- # clojure-dev (1)
- # clojure-europe (14)
- # clojure-houston (1)
- # clojure-italy (2)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-seattle (3)
- # clojure-uk (13)
- # clojurescript (2)
- # cloverage (1)
- # code-reviews (4)
- # conjure (2)
- # cursive (5)
- # datalevin (4)
- # datascript (33)
- # datomic (16)
- # events (1)
- # graphql (10)
- # gratitude (1)
- # honeysql (6)
- # introduce-yourself (2)
- # jobs (1)
- # lsp (88)
- # malli (8)
- # off-topic (3)
- # other-languages (4)
- # polylith (3)
- # re-frame (16)
- # reagent (17)
- # reitit (3)
- # releases (2)
- # remote-jobs (1)
- # rewrite-clj (3)
- # shadow-cljs (3)
- # slack-help (2)
- # sql (36)
- # testing (31)
- # tools-deps (41)
- # xtdb (23)
given a entity - attribute pair, is there a way to retrieve the tx that added the attribute without doing a query on history db?
I’m assuming by “added the attribute” you mean added any datom looks like [?e ?attr _ ?tx true]
and you want the ?tx
, not that you want the tx that added the attribute (schema) itself.
If you know the datom is “current” (i.e. is asserted on your “now” db) you don’t need the history db.
otherwise you need the history db, and you need to decide what it means if the attr is asserted+retracted multiple times
@U09R86PA4 thanks, you're right i wasn't precise with 'added'. My intention is more like: except from a datalog query, is there any other way to retrieve the last transaction on a given entity?
My point is that i'm storing in an attribute some value which changes over time, and i'd like to see the "when was it last updated" (the txInstant). I know how to do it easily with a datalog query
(d/q
'[:find ?tx ?attr ?val ?added
:in $ ?e
:where
[?e ?attr ?val ?tx ?added]]
(d/history my-db)
my-eid)
I am trying to connect to datomic and getting activemq-version.properties is not available
as an error. The stacktrace goes through the connector and the artemis client. Any ideas?
So I'd recommend running the latest datomic-pro (http://my.datomic.com/downloads) and ensure you are using an LTS version of java (8,11,17). Then let me know if you still see the error.