This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-14
Channels
- # adventofcode (62)
- # beginners (78)
- # boot (26)
- # boot-dev (9)
- # cider (73)
- # cljs-dev (33)
- # cljsrn (36)
- # clojure (159)
- # clojure-android (1)
- # clojure-austin (1)
- # clojure-greece (79)
- # clojure-italy (10)
- # clojure-nl (3)
- # clojure-russia (11)
- # clojure-spec (33)
- # clojure-uk (26)
- # clojurescript (107)
- # core-async (22)
- # core-logic (12)
- # cursive (16)
- # datomic (13)
- # devcards (5)
- # duct (36)
- # emacs (4)
- # figwheel (3)
- # fulcro (107)
- # graphql (171)
- # hoplon (27)
- # instaparse (24)
- # jobs-discuss (34)
- # juxt (3)
- # lein-figwheel (1)
- # leiningen (8)
- # lumo (11)
- # off-topic (9)
- # onyx (79)
- # parinfer (1)
- # pedestal (75)
- # re-frame (27)
- # rum (1)
- # shadow-cljs (11)
- # spacemacs (20)
- # specter (17)
- # unrepl (96)
Is there any expected situation in datomic where pulled values have a nil value?
ex: (d/pull db '[*] entity-id) => {:user/sample-field nil :db/id 17592186048930}
Nice to see large facebook and netflix logos on the Datomic home page: http://www.datomic.com/ Does anyone have more information how they are using it, e.g. related blog posts?
Matt Bossenbroek at Netflix gave a talk re: use of Datomic: https://www.youtube.com/watch?v=V2E1PdboYLk
So I need to add integrity checking, which I can do with a transaction function. The constraints I wish to enforce I have in data - in fact, they are really just a list of datomic queries that should return no data, along with error message strings that have substitution markers in them.
@U0ECYL0ET I don't know of any library that does that, but writing such a transaction function is probably straightforward, and speculatively checking data invariants (using db.with()
) is a common way of preventing illegal writes. However, be aware that Datalog has some overhead, so you want to be careful about running such queries in the Transactor for frequent writes; you can also consider running them on the Peer.
@U0ECYL0ET that's definitely something that could be added to Datofu (https://github.com/vvvvalvalval/datofu) btw, I just haven't used this approach frequently enough to consider it for the lib
AFAICT, I can't do this on the peer without the possibility of race conditions allowing invalid data.
The d/with thing brings up a question that I don't think was directly addressed in the docs, though... does the db passed to a transaction function have all data available from previous :db/add
and so forth from this transaction set?
No, consider a transaction as unordered and atomic
The d/with thing brings up a question that I don't think was directly addressed in the docs, though... does the db passed to a transaction function have all data available from previous :db/add
and so forth from this transaction set?