This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-24
Channels
- # aleph (4)
- # beginners (93)
- # cider (7)
- # cljs-dev (16)
- # cljsrn (5)
- # clojure (192)
- # clojure-dusseldorf (3)
- # clojure-italy (14)
- # clojure-russia (16)
- # clojure-serbia (1)
- # clojure-spec (85)
- # clojure-taiwan (1)
- # clojure-uk (79)
- # clojurescript (188)
- # code-reviews (9)
- # core-async (2)
- # crypto (1)
- # cursive (26)
- # datomic (21)
- # heroku (1)
- # hoplon (3)
- # jobs (7)
- # jobs-discuss (20)
- # jobs-rus (13)
- # off-topic (77)
- # om (15)
- # onyx (23)
- # pedestal (94)
- # planck (11)
- # proton (10)
- # protorepl (1)
- # re-frame (16)
- # ring (22)
- # ring-swagger (9)
- # rum (2)
- # specter (18)
- # testing (2)
- # untangled (14)
- # vim (12)
- # yada (58)
hi, just started learning datomic. Is the following picture correct representation of a-usage ?
@wistb That is broadly correct, yes. In addition, both the Transactor and the Peer will communicate with Storage. There isn't really any "transactor" for the in-memory database, it's just the Peer library providing a local version of the d/transact
API.
Is there an easy way to see what version of datomic a transactor I'm connecting to is?
(Like, get it out of the connection object, ideally)
@jeremy Yes, transaction entity IDs increase monotonically over time. The same is true of any entity ID within its partition.
@uwo Call class
on a dbid, then defmethod print-method
yes. I think maybe what I’m looking to do is more along the line of (. clojure.pprint/simple-dispatch addMethod datomic.db.DbId pprint-myrecord)
… I may have been mistaken about print-method..?
basically aiming to pretty print some data that has tempids, but I want to keep the tempids in the format that prn
would produce
this was my solution
(defn pprint-myrecord [b] (.write *out* (str b)))
(def my-print (. clojure.pprint/simple-dispatch addMethod datomic.db.DbId pprint-myrecord))
(clojure.pprint/with-pprint-dispatch my-print
(clojure.pprint/pprint
etc..
@jeremy note that the t
s don't necessarily increase by one from one transaction to the next.