Skip to content

Support required attributes #35

Description

@loganmhb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions