Fork me on GitHub

is it normal for SOCKS4 tunnel failed, connection closed to occur when running a query in the REPL during a :deploy?


Q: is there a metric somewhere that shows the hit-rate for cached queries? I’d like to know if I accidentally add queries that are not cached in their parsed state


I have a question about using :db/ident as an enum. In my model, a :session/type is modelled as an enum of :db/idents, which works great when writing queries. However, there are times when I want to return the :session/type to be consumed as a value like :type/online, but I get the datomic id instead. Is there a way to get idents as values or should I just use a keyword instead?

Lennart Buit13:10:41

You can just pull them: [{:session/type [:db/ident]}]

Lennart Buit13:10:06

You can also just join them in your queries, say because you are finding tuples of entities and statuses:

(d/q '[:find ?e ?type-ident
       :in $ ?e
       :where [?e :session/type ?type]
              [?type :db/ident ?type-ident]

👍 3
Lennart Buit13:10:33

Does that help ^^?


Yes, that was exactly was I was wondering about. Thank you!


just one thing to note, that will only return entities that have a :session/type value. i made a similar post about it here:


no response in 11 days, so if you would find an answer to the question useful then perhaps give it a bump or a like 🙂


@love.lagerkvist you can do (d/pull db [(:session/type :xform :db/ident)] id) => {:session/type :type/online} Using #eql libraries you can programmatically add it to all your refs

(defn add-ident-xform
  [ident? query]
  (->> query
       (eql/transduce-children (map (fn [{:keys [dispatch-key] :as node}]
                                      (if (ident? dispatch-key)
                                        (assoc-in node [:params :xform]  :db/ident)
    {:bar [:session/type]}])
;; => [:foo {:bar [(:session/type :xform :db/ident)]}]
But as a #fulcro and #eql developer, I like to return :session/type {:db/ident :type/online} because it allow you to include useful data for frontend like :session/type {:db/ident :type/online :label "OnLine" :icon "green-dot"}


We had the impression that sometimes the ion code we deploy using the datomic CLI command takes awhile (a few minutes) to actually replace the previously running version. We are using unreproducible deployments into a solo topology. The issue is with a web-ion GET request, which is called through an APIGW, using their new HTTP API (instead of RESTful API) and integrating the datomic lambda as a proxy, using the v1.0 payload format. All versions of tools and libs are the latest (as of yesterday). Has anyone experienced anything like this?


The :deploy-status reports SUCCESS for both keys in its response of course.