This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-09-25
Channels
- # admin-announcements (19)
- # alda (73)
- # announcements (1)
- # aws (16)
- # beginners (22)
- # boot (109)
- # cljs-dev (1)
- # clojure (79)
- # clojure-art (3)
- # clojure-czech (2)
- # clojure-russia (233)
- # clojure-sweden (2)
- # clojurescript (161)
- # clojurex (25)
- # core-async (2)
- # cursive (4)
- # datomic (11)
- # editors (17)
- # emacs (3)
- # funcool (4)
- # hoplon (72)
- # ldnclj (29)
- # off-topic (1)
- # om (9)
- # onyx (13)
- # reactive (10)
- # reagent (13)
- # yada (4)
@bkamphaus: i decided to email <mailto:[email protected]|[email protected]> instead
I remember reading something about the maximum practical length of strings in Datomic but I can't find the discussion. What limit should I set for string length?
So when I use a pull in a find spec ie like
(d/q '[:find (pull ?e [* {:order/line-items
[* {:package/size [*]
:line-item/package
[* {:good/_packages [*]}]}]}])
:in $ ?person-id
:where [?e :order/person ?person-id]]
(get-db) person-id)
I get a vector of vectors, of the objects I wanted.... is their something more idiomatic then calling flatten ?I found it
(d/q '[:find [(pull ?e [* {:order/line-items
[* {:package/size [*]
:line-item/package
[* {:good/_packages [*]}]}]}]) ...]
:in $ ?person-id
:where [?e :order/person ?person-id]]
(get-db) person-id)
Not sure what that is called, but wrapping the query in another vector unwraps the results.@shofetim: you’re using the collection find spec http://docs.datomic.com/query.html#find-specifications
@bkamphaus: any ideas how I could make the above query faster? or how to know what parts are expensive? I don't have much data yet and it's taking about 950 msecs (returns 24 results)
is person-id a unique attr?
you might bypass query altogether then and just use a lookup ref as the entity identifier in a call to the pull API directly