Open spacegangster opened 4 years ago
Strictly speaking, this is not a bug. But even stricter speaking, the CardinalityOne
story is not complete yet. The different cardinality's are actually write semantics to be enforced by 3DF. So CardinalityOne
should be read as "last write wins", CardinalityMany
means "distinct". As part of https://github.com/comnik/declarative-dataflow/commit/a96eb70d116f2901e8a47717aef3a2d1338dcb4f, they were actually renamed to reflect this.
Compare-and-swap is another input semantic, that we intend to support.
However right now, the last write wins implementation is a proof-of-concept. If you know, that your inputs will be well-formed (e.g. because Crux is already enforcing the right semantics), you should just use :db.semantics/raw
.
If a value isn't there, then retraction and its cardinality is one, then if I retract it – Declarative server panics. Not sure if it's a bug though.
reproduction below
Panic
And I think now I don't understand what does cardinality means in this context.