Fork me on GitHub
#datomic
<
2019-05-08
>
currentoor04:05:47

is there any harm in asserting an already true fact in a transaction? as in will it cause extra noise/overhead?

Lennart Buit16:05:22

I think its not even asserted? Asserting something that is already asserted as the same value is filtered

Lennart Buit16:05:31

Let me see if I can find a resource to back my claim

Lennart Buit16:05:12

So your history remains “clean”

currentoor16:05:45

awesome thanks @UDF11HLKC

👍 8
eoliphant17:05:54

But you still get a transaction, which can be annoying in some use cases. We’ve been generally fine with this as-is, but recently our UX folks wanted to add an autosave feature to one of our apps. We’re still trying to decide the best way to handle it, especially since we do some ES-lite with datomic and tag our transactions with biz event markers. SO we’re ending up with a ton of ‘:updated-foo’ transactions with no actual updates.

Lennart Buit17:05:26

Correct, I can understand how that is annoying, but it feels consistent. Every time you call d/transact a new transaction entity is asserted. Regardless of whether that transaction contains new domain ‘facts’.

MegaMatt13:05:05

anyone know if progress has been made on console for cloud? looks like stu said to stay tuned over a year ago.

souenzzo13:05:23

I think that #rebl is kind of frontend for cloud I have plans to create a "client frontend", to list my databases, create, delete, see last tx, first tx, datoms count..

Alex Miller (Clojure team)14:05:08

more coming on rebl + datomic for sure

🙏 24
dangercoder15:05:00

Are there any tutorials on how to use an in memory database for integration tests using the Datomic Client (Cloud)? It is a problem I am going to solve after work.

Joe Lane15:05:34

@jarvinenemil Why do you need an in memory database? Why can’t you spin up a blank db when you start your tests and tear it down after?

souenzzo19:05:18

I'm using it.

Daniel Hines20:05:32

How do people usually enforce things like “This particular type of entity must conform to this particular spec” in Datomic? In SQL DB’s, I could say, “Column X is required for Table Y”. In DB’s/CRM’s with ref types, I can also say “Column A refers to a row in Table B”. I get that a transaction function is the right “when”, but I’m wondering what the common idioms are for “how”.

Dustin Getz21:05:05

“entity types” Maybe have a look at how https://github.com/luchiniatwork/hodur-engine does it

Dustin Getz21:05:29

Val has a blog post about modeling with entity types as well i believe

val_waeselynck07:05:39

@U09K620SG @U8QTB156K I don't really have a blog post on that, nor strong opinions. Avoid doing unnecessary work in the Transactor. I'd recommend doing most validation (e.g validating attribute values) upstream of transacting. See also: https://stackoverflow.com/questions/48268887/how-to-prevent-transactions-from-violating-application-invariants-in-datomic/48269377#48269377