This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-24
Channels
- # beginners (100)
- # calva (11)
- # cider (17)
- # clj-kondo (2)
- # cljdoc (66)
- # cljs-dev (54)
- # clojure (77)
- # clojure-czech (1)
- # clojure-dev (42)
- # clojure-europe (3)
- # clojure-italy (8)
- # clojure-nl (17)
- # clojure-spec (12)
- # clojure-uk (41)
- # clojurescript (68)
- # cursive (8)
- # datomic (15)
- # emacs (9)
- # expound (3)
- # fulcro (14)
- # garden (3)
- # graphql (2)
- # hoplon (2)
- # lein-figwheel (4)
- # leiningen (4)
- # off-topic (22)
- # onyx (8)
- # parinfer (2)
- # planck (1)
- # re-frame (5)
- # reagent (55)
- # reitit (3)
- # remote-jobs (8)
- # shadow-cljs (35)
- # spacemacs (23)
- # sql (3)
- # tools-deps (32)
- # unrepl (8)
- # vim (25)
- # yada (5)
Q: I have a micro-service in another VPC that I want to reach from an Ion. I was assuming that I need to use VPC peering for this but the new video seems to suggest that a VPC link might also work. Does anyone have any advice about this?
Is there a possibility to travel the history from recent to past? If I use the following, I get the oldest datoms first:
(d/datoms (d/history (d/db conn)) :eavt eid :version)
I have a :version attribute on each entity which is incremented on each change.Yes, but a query returns a set or a vector which is unordered. That’s even worse, there I have to sort the result.
Not sure if this is efficient, but how about something like:
(d/q '[:find ?vv ?tx
:in $hist $curr ?ref ?n
:where
[$curr ?e :e/ref ?ref]
[$curr ?e :e/version ?v]
[$hist ?e :e/version ?vv ?tx true]
[(- ?v ?n) ?vmin]
[(> ?vv ?vmin)]]
(d/history db)
db
"my-ref"
10)