Fork me on GitHub
#datomic
<
2017-02-28
>
tengstrand08:02:13

I can list all the attributes and their type in the database with this query: (d/q '[:find ?i ?t :where [?e :db/ident ?i] [?e :db/valueType ?t]] (d/db conn)) Is there a entity that I can "join in” to get the types in text instead of a number? I can of course add that as a source with hardcoded values, but if there is an entity for that already, then that’s better.

val_waeselynck10:02:35

@marshall should I expect a memory leak if I hold on to a Log instance and perform repeated calls to .txRange() ?

val_waeselynck10:02:26

in other words: can I rely on the tx ranges being garbage-collected even if I hold on to the Log ?

devth20:02:19

are datomic docs by any chance served from s3? http://docs.datomic.com/ down for me

Lambda/Sierra20:02:19

yes, it's related to S3 issues.

bmaddy23:02:31

I tried finding the answer to this in the docs and by searching, but had no luck. Why would this query

(take 2 (query '[:find (pull ?id [*]) :where [?id :account/name]]))
give me something like this?
([{:db/id …}] [{:db/id …}])
I would expect something like this:
({:db/id …} {:db/id …})

bmaddy23:02:40

(Oh, sorry, query there just does a (d/q % (d/db conn)))

favila23:02:49

@bmaddy [:find ?a ?b] returns [[:a1 :b1] [:a2 :b2] ...]

favila23:02:05

so [:find (pull ...)] is no different

favila23:02:18

(find returns relations by default)

favila23:02:49

you probably want [:find [(pull ?id [*]) ...] :where ,,,]

bmaddy23:02:25

Yeah, ok. That makes sense. Hmm, I’ve never seen that syntax, I’ll check it out. Thanks!

bmaddy23:02:26

Worked like a charm! Thanks a ton @favila!