datahike

https://datahike.io/, Join the conversation at https://discord.com/invite/kEBzMvb, history for this channel is available at https://clojurians.zulipchat.com/#narrow/stream/180378-slack-archive/topic/datahike
kkuehne 2019-12-11T09:51:03.205Z

Thanks, it was a typo. I'll fix it. The datahike project can be found at https://github.com/replikativ/datahike

2019-12-11T12:02:05.206600Z

Has anybody thought about a deeper integration of schema validation inside of datahike? Attaching clojure.spec to ref-types and having the transacter enforce that?

kkuehne 2019-12-11T12:19:21.206900Z

I'm refactoring the validation mechanism and I thought about that. It sounds similar to components but with validation.

2019-12-11T12:30:19.207100Z

I think it would help many people coming from the SQL world. They are so confused if you just have a 'ref', rather then a foreign key to a specific table. The cool thing is that you can make this checking ad-hoc or enforce it on the transaction. Both seem to have some value.

2019-12-11T12:33:16.207300Z

What does this actually validate at the moment? > The data validation happens on transaction level using `clojure.spec`.

2019-12-11T12:46:09.209Z

For the Java API, are you aiming for something like what Datomic presented (but not released as far as I know) a JOOQ-like syntax?

cjsauer 2019-12-11T16:01:35.216400Z

@nickik datomic supports something similar to what you’re describing with attribute predicates and entity specs: https://docs.datomic.com/cloud/schema/schema-reference.html#attribute-predicates https://docs.datomic.com/cloud/schema/schema-reference.html#entity-specs You can use it for the common cases of required attributes, derived attributes, etc. But I have also used them for more sophisticated validation. For example, ensuring that cycles never form over a particular relation (ie enforcing a DAG structure). Perhaps datahike could mimic this API.

2019-12-11T16:03:25.217100Z

@cjsauer Nice. I didn't know this was part of Datomic. I will defiantly look into this. Thanks.