This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-17
Channels
- # admin-announcements (4)
- # boot (93)
- # cider (4)
- # cljsrn (61)
- # clojure (137)
- # clojure-austin (2)
- # clojure-brasil (2)
- # clojure-dev (11)
- # clojure-dusseldorf (10)
- # clojure-greece (245)
- # clojure-russia (37)
- # clojure-spec (60)
- # clojure-taiwan (1)
- # clojure-uk (24)
- # clojurescript (36)
- # cursive (18)
- # datomic (20)
- # emacs (20)
- # funcool (1)
- # hoplon (29)
- # jobs (1)
- # keechma (1)
- # lein-figwheel (1)
- # leiningen (1)
- # off-topic (3)
- # om (10)
- # om-next (1)
- # onyx (60)
- # other-languages (14)
- # planck (26)
- # random (3)
- # re-frame (21)
- # ring (2)
- # spacemacs (8)
- # specter (56)
- # spirituality-ethics (2)
- # uncomplicate (1)
- # untangled (68)
- # yada (3)
@bahulneel: thanks!
A different question: I like the feature that allows me to query a datastructure directly, eg (d/q ‘[:find …] ‘[[:foo :foo/bar 42] [:bar :foo/bar 43]])
Is it possible to query a nested datastructure in any way? Eg, converting the nested structure to a list of datoms somehow?
will need to provide :db/ids
for both maps, however, if you can make :foo
a component and datomic will delete the children when you remove foo
@grav here's a blog post explaining http://blog.datomic.com/2013/06/component-entities.html
If you're passing in a data-structure rather than a db then you would need to do something like flatten it to datoms.
@bahulneel: yes, exactly, I need to convert it to datoms somehow. I cannot find an api for it.
@grav so, the shape you need is a triple of [E A V] this would mean flattening out the data structure so that each map becomes an entity and then you assign ids to those.
depending on the complexity of the data structure and how much you know about it in advance you may want to consider using datascript as any implementation will eventually become some implementation of this
or you can use the in memory datomic but you'll have to specify all the schema rather than just the references
@grav: Haven't tried, but you can just create an empty dummy db in your app, then use (d/with )
on it to get back a proper db (it always keeps the database empty). Needs a schema though.
@grav: looks like @conaw has some code to help you, the transactions he produces should be directly queriable by d/q
Hi - I am sending a lot of transactions to my database, and many of them are timing out because of the load. I assume that even if there is a timeout, the transaction will still go through as long as the queue on the transactor is not full. Is there a way to detect if the transactor actually starts rejecting transactions? Not sure what to look for in the logs
@noziar: you may want to look at the docs on imports http://docs.datomic.com/capacity.html#data-imports