Asserting a schema attribute must require presence of minimal set of attributes #286

Open
opened 2020-08-06 16:57:53 +00:00 by gburd · 0 comments
gburd commented 2020-08-06 16:57:53 +00:00 (Migrated from github.com)

These assertions are legit:

[[:db/add "testProp" :db/ident :testProp]]

and:

[:db/add "testProp" :db/ident :testProp]
[:db/add "testProp :db/valueType :db.type/string]
[:db/add "testProp :add/cardinality :db.cardinality/one]]

However, assertion sets which are missing one of the required attributes, such as:

[:db/add "testProp" :db/ident :testProp]
[:db/add "testProp :db/valueType :db.type/string]]

should be illegal.

Similarly,

[[:db/add "testProp :db/valueType :db.type/string]
[:db/add "testProp :add/cardinality :db.cardinality/one]]

should also be illegal.

These assertions are legit: `[[:db/add "testProp" :db/ident :testProp]]` and: ``` [:db/add "testProp" :db/ident :testProp] [:db/add "testProp :db/valueType :db.type/string] [:db/add "testProp :add/cardinality :db.cardinality/one]] ``` However, assertion sets which are missing one of the required attributes, such as: ``` [:db/add "testProp" :db/ident :testProp] [:db/add "testProp :db/valueType :db.type/string]] ``` should be illegal. Similarly, ``` [[:db/add "testProp :db/valueType :db.type/string] [:db/add "testProp :add/cardinality :db.cardinality/one]] ``` should also be illegal.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: greg/mentat#286
No description provided.