You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Datomic doesn't support requiring an entity to have attributes, but I think this could be a useful feature to help ensure data consistency. Probably the way this would work is to have a db:entityType attribute, and then provide a way to define entity types and declare the set of required attributes.
There might be other type-level assertions that could be useful to add as well. I think it's a good idea not to disallow attributes, however -- that would make the schema too inflexible and difficult to grow. I think there's an analogy here to how clojure.spec works, allowing you to specify required map keys but not disallow additional keys.
The text was updated successfully, but these errors were encountered:
Datomic doesn't support requiring an entity to have attributes, but I think this could be a useful feature to help ensure data consistency. Probably the way this would work is to have a
db:entityType
attribute, and then provide a way to define entity types and declare the set of required attributes.There might be other type-level assertions that could be useful to add as well. I think it's a good idea not to disallow attributes, however -- that would make the schema too inflexible and difficult to grow. I think there's an analogy here to how clojure.spec works, allowing you to specify required map keys but not disallow additional keys.
The text was updated successfully, but these errors were encountered: