-
Notifications
You must be signed in to change notification settings - Fork 147
Closed
Labels
🐛 bugSomething isn't workingSomething isn't working
Description
Description
Data:
@prefix ex: <http://example.org>.
<> ex:somePredicate [ a ex:someType; ex:someOtherPredicate "value" ].N3 Patch query:
@prefix solid: <http://www.w3.org/ns/solid/terms#>.
@prefix ex: <http://example.org>.
_:patch a solid:InsertDeletePatch;
solid:where { <http://localhost/document> ex:somePredicate ?blankNode. };
solid:deletes { ?blankNode ex:someOtherPredicate "value". }.The query will fail with error "The document does not contain all triples the N3 Patch requests to delete, which is required for patching.".
The reason for this is that we first use Comunica to find bindings for the solid:where clause, but the blank node it returns for ?blankNode will have a different label than the one used in the dataset. We then try to remove the triple with this value directly from the N3.js store, which fails since a different label is used.
Possible solutions:
- Rewrite the patching so Comunica handles everything, using an insert/delete query. The problem with this is that there are certain checks that need to happen, such as "If the set of triples resulting from ?deletions is non-empty and the dataset does not contain all of these triples, the server MUST respond with a 409 status code.". I'm not sure if all of these can be guaranteed when doing this. Will have to check.
- Completely remove the Comunica dependency, but that would require us to have an internal querying engine. Only for BGPs for now so perhaps still doable, but if more complex query requirements are ever added, we would have to build our entire internal querying engine which is not something desired.
- Based on the output of Comunica, somehow determine which are the triples that should be matched in the N3.js store. This might be possible and easier than doing the full query.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🐛 bugSomething isn't workingSomething isn't working