Fork me on GitHub
#pedestal
<
2017-04-23
>
skylar15:04:04

Thanks a lot @ddeaguiar – it works 🙂

deg16:04:40

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.

deg16:04:16

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.

souenzzo17:04:14

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

souenzzo17:04:03

: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

deg18:04:14

@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).

souenzzo18:04:50

Datomic query by default return's "a set of tuples of result" (`#{[<result1>][<result2>]}`). I also have no idea why, and very curious to know.

souenzzo18:04:24

I already researched a little about this and found nothing ... If you find some explanation, please share 🙂 @deg