Fork me on GitHub
#datascript
<
2018-02-28
>
devn00:02:08

Can I do multiple pulls in a query? It seems to only respect the first (pull ...) in the find clause

souenzzo12:02:59

In datomic, yes, you can do (d/q '[:find (pull ?e) (pull ?a) :where [?e :user/address ?a]]).

devn19:02:08

@souenzzo thanks. i was doing something still. I was calling (map first) on the result of the query and went to bed confused about why the order of the pulls in the :find clause mattered. sleep is good!

devn19:02:49

In these docs, there is an example which uses a schema that specifies a valueType of :db.type/string on an attribute: https://github.com/tonsky/datascript/wiki/API-overview

devn19:02:33

When I specify a valueType of string, it throws an exception: Bad attribute specification ...

souenzzo19:02:54

I think that it's a issue. You can update the docs and make a pR

devn19:02:22

@souenzzo you don't happen to have any idea which issue it is, do you?

souenzzo19:02:59

I think that is something like outdated/inconsistent documentation Some versions back, it was possible to declare these types.

devn20:02:42

Here's a lazy question:

devn20:02:08

Why is conn-from-datoms so much faster that transacting maps?

devn20:02:35

It takes like 40 seconds to do db/with or transact! what takes 2 seconds if I put it all into datom format ahead of time