This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; find all historic :gateway/last-seen attribute for an entity | |
(d/q '[:find ?v | |
:in $ ?e | |
:where [?e :gateway/last-seen ?v]] | |
(d/history (d/db conn)) | |
17592186045459) | |
#{[#inst "2015-08-12T09:52:53.716-00:00"]} | |
;; note that the attribute has noHistory set to true | |
(d/pull (d/db conn) '[*] :gateway/last-seen) | |
{:db/id 73 | |
:db/ident :gateway/last-seen | |
:db/valueType {:db/id 25} | |
:db/cardinality {:db/id 35} ;; :db.cardinality/one | |
:db/noHistory true} | |
;; make a new request, resulting in an updated :last-seen attr | |
(d/q '[:find ?v | |
:in $ ?e | |
:where [?e :gateway/last-seen ?v]] | |
(d/history (d/db conn)) | |
17592186045459) | |
#{[#inst "2015-08-12T09:54:08.737-00:00"] [#inst "2015-08-12T09:52:53.716-00:00"]} | |
;; now there are two entries in history | |
;; why? how? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment