Because it is possible to use an optional expression in a where and then to use bindings from the optional in delete, it is therefore possible to have null values arrive into delete bindings, e.g.
In the example above, we want to delete any child entities on a particular property IF THEY EXIST. If none exist, then ?childSubj, ?childPred, and ?childObj are all null, and the delete expression for that object ends up deleting every [s p o] triple in the ledger
We need
To ensure that null values in delete expressions stop acting like a catch-all (and instead, possibly prompt a drop of that entire sub-expression within the delete)
Ensure that we are able to deliver the user story described by the above, whether with optional or not, we need to be able to select for deletion any and all (possible) existing downstream nodes. Note that in the example above, we want to delete all the facts on "@id": "_:f211106232533005" regardless, and we don't want the non-existence of downstream nodes to cause the entire txn to be dropped (hence the thought to use optional
Description
Because it is possible to use an
optional
expression in awhere
and then to use bindings from theoptional
indelete
, it is therefore possible to havenull
values arrive intodelete
bindings, e.g.In the example above, we want to delete any child entities on a particular property IF THEY EXIST. If none exist, then
?childSubj
,?childPred
, and?childObj
are allnull
, and thedelete
expression for that object ends up deleting every[s p o]
triple in the ledgerWe need
null
values indelete
expressions stop acting like a catch-all (and instead, possibly prompt a drop of that entire sub-expression within thedelete
)optional
or not, we need to be able to select for deletion any and all (possible) existing downstream nodes. Note that in the example above, we want to delete all the facts on"@id": "_:f211106232533005"
regardless, and we don't want the non-existence of downstream nodes to cause the entire txn to be dropped (hence the thought to useoptional