Fork me on GitHub
#datomic
<
2021-12-30
>
Benjamin10:12:20

I'd like to have an attribute that is a boolean "flag" like "active" is there an idiomatic way? I was thinking to retract and assert the fact but it doesn't really fit I think because I want to show "inactive" in the ui. Do I use an attribute with "bool" value?

Ben Sless11:12:11

db.type/boolean

Ben Sless11:12:26

But you can also perform historical queries

Ben Sless11:12:30

Adding the "active" property will also complicate all other business logic because you have to add another clause for it. On the other hand if you save history then the active property doesn't add data

kenny15:12:00

I advise against using history for any domain information. Only use it for audit purposes.

🙂 1
2
kenny15:12:02

It is not designed for that use case. Large perf penalties, constraints on what you can do. Valentin has a good post on this topic: https://vvvvalvalval.github.io/posts/2017-07-08-Datomic-this-is-not-the-history-youre-looking-for.html

Ben Sless10:12:04

This reads like bitemporality