I'm following the tutorial, http://www.datomic.com/company/resources/tutorial but I think I am missing a simple piece of the puzzle of how to access Datomic's time model.
If I do a series of adds and retracts
;; DO a series of transactions
;; (transact conn [:db/add entity-id attribute value0])
(use 'datomic.api)
(dir datomic.api)
(def conn (connect "datomic:dev://localhost:4334/demo"))
(transact conn '[:db/add 2000 :db/doc "Hello There"])
(q '[:find ?e ?n :where [?e :db/doc ?n] [(= 2000 ?e)]] (db conn))
; => <HashSet [[2000 "Hello There"]]>
(transact conn '[:db/add 2000 :db/doc "Hello There 1"])
(q '[:find ?e ?n :where [?e :db/doc ?n] [(= 2000 ?e)]] (db conn))
; => <HashSet [[2000 "Hello There 1"]]>
(transact conn '[:db/add 2000 :db/doc "Hello There 2"])
(q '[:find ?e ?n :where [?e :db/doc ?n] [(= 2000 ?e)]] (db conn))
; => <HashSet [[2000 "Hello There 2"]]>
(transact conn '[:db/add 2000 :db/doc "Hello There 3"])
(q '[:find ?e ?n :where [?e :db/doc ?n] [(= 2000 ?e)]] (db conn))
; => <HashSet [[2000 "Hello There 3"]]>
How is it possible to get a series of changes of the value on (entity 2000 attribute :db/doc)?
I want to get something in the format of
[ [Transaction Number, Time, Value] .... [Transaction Number, Time, Value]]
For example:
[ [T1, "2012-March-16-9:30:12", "Hello There"]
....
....
....
[T27, "2012-June-14-9:54:38", "Hello There 3"] ]
It can't be that difficult, but there are a lot of :db internal parameters that I'm not familiar with.