This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-23
Channels
- # aws-lambda (1)
- # bangalore-clj (13)
- # beginners (12)
- # boot (3)
- # cider (1)
- # cljs-dev (20)
- # clojure (208)
- # clojure-finland (1)
- # clojure-france (1)
- # clojure-russia (30)
- # clojure-serbia (12)
- # clojure-spec (7)
- # clojure-uk (14)
- # clojurescript (16)
- # cursive (6)
- # datomic (10)
- # emacs (1)
- # hoplon (4)
- # keechma (14)
- # leiningen (2)
- # off-topic (6)
- # om (43)
- # onyx (32)
- # pedestal (8)
- # perun (2)
- # re-frame (7)
- # reagent (33)
- # specter (5)
- # vim (4)
- # yada (9)
Thanks a lot @ddeaguiar – it works 🙂
What, exactly, does Vase return when I call the pull
API?
I have a query containing
`
:query [:find [(pull ?e [*]) ...]
:where [?e :user/name]]
`
It sometimes returns a vector of my tuples, and other times returns a seq whose first is the vector of tuples.
Clarification: I'm not yet sure what I mean by "sometimes". I'm seeing these different results in different machines and environments (Ubuntu vs Docker on Ubuntu vs Mac; all built from the same repo, but...) so I assume I've changed some moving part that affects this behavior.Hmm, just realized that I might have been faked out by browser caching. (I had returned from vacation, back to a machine that had last run before I made some server changes). But, I'm still curious exactly what that pull syntax is supposed to return.
It's #datomic stuff but pull
returns a map. In this case, you r using a query that calls pull
.
http://docs.datomic.com/query.html#sec-5-7
:find [?s ...]
will always return a coll of ?s
. In this case, ?s
was a pull and pull's returns map's, so a coll of map
@souenzzo , thanks. But, why does a bare :find (pull ?e [*])
return a *more* nested structure? (IIRC, it had two more levels of vector wrapped around the vector).