Fork me on GitHub
#datomic
<
2017-12-14
>
megakorre10:12:51

anyone knows what the problem is when :db.error/not-an-attribute gets thrown?

megakorre11:12:28

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}

favila14:12:41

No, except maybe using default with nil

nblumoe15:12:05

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?

Ben Kamphaus16:12:46

Matt Bossenbroek at Netflix gave a talk re: use of Datomic: https://www.youtube.com/watch?v=V2E1PdboYLk

nblumoe18:12:33

Oh wow. 2015. Thanks

eraserhd20:12:51

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.

eraserhd20:12:00

I realize that someone might have already done this. Yes?

val_waeselynck10:12:16

@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.

val_waeselynck10:12:51

@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

eraserhd16:12:57

AFAICT, I can't do this on the peer without the possibility of race conditions allowing invalid data.

eraserhd16:12:59

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?

val_waeselynck17:12:36

No, consider a transaction as unordered and atomic

eraserhd16:12:59

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?