fluree / core

Fluree releases and public bug reports
0 stars 0 forks source link

Implement new "default" stage/transact behavior #30

Open aaj3f opened 10 months ago

aaj3f commented 10 months ago

Description

Given the implementation of insertData/deleteData/upsertData and given discussion with Paula and Core about expectations of the behavior for submitting a standalone JSON-LD document as a "commit", the decision was made to continue to allow a "default" transaction behavior (i.e. without specifying keys like insert, insertData, etc.), but to change its behavior.

The desired new behavior would be to assume all triples in the JSON-LD payload are being asserted, regardless of the existence of previous values on existing subject-property pairs UNLESS a SHACL rule exists to limit a property's value to single-cardinality. In this one case, if a value already exists on a subject-property pair, and the JSON-LD provided describes a different single value, then the transaction would succeed with a retract-and-replace (obviously, if the JSON-LD payload described a multi-cardinality set of values on a property and the SHACL rule constrained values to single-cardinality, then the transaction would be rejected)

cap10morgan commented 9 months ago

We tentatively decided not to do this for now, and instead rethink how this all works at a more fundamental level. We're hoping to cut down on the number of different behaviors we have to implement, maintain, test, document, and reason about.