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

Open
opened 2020-08-06 15:04:50 +00:00 by gburd · 1 comment
gburd commented 2020-08-06 15:04:50 +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.

Original by @grigoryk

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. Original by @grigoryk
gburd commented 2020-08-06 15:04:51 +00:00 (Migrated from github.com)

This is relevant to #796 in spirit, although should require much less changes to implement.

Original by @grigoryk

This is relevant to #796 in spirit, although should require much less changes to implement. Original by @grigoryk
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#16
No description provided.