toSparqlUpdate

Renders this patch as a SPARQL 1.1 Update document (application/sparql-update).

The Solid Protocol requires servers to support N3 Patch, but not every deployment does in practice: some storage endpoints advertise only Accept-Patch: application/sparql-update and return 415 Unsupported Media Type for text/n3 bodies. Because the major servers also accept SPARQL Update, it is the more portable PATCH format across servers.

Output shape:

  • data-only (no where clause) → DELETE DATA { ... } ; INSERT DATA { ... }

  • with whereDELETE { ... } INSERT { ... } WHERE { ... }

  • either clause may be absent if this patch has no corresponding triples