({{, SPARQLDelete[pattern->template] 
is an update operator that can be applied to an (PackageLink[RDFStore, paclet:GraphStore/ref/RDFStore, GraphStore Package Symbol]), which deletes data generated from template, based on solutions of matching pattern.}, {, SPARQLDelete[pattern]
uses pattern as template.}})

OpenersNotesSection(Spacer1)Details

SPARQLDelete can be used in (PackageLink[SPARQLExecute, paclet:GraphStore/ref/SPARQLExecute, GraphStore Package Symbol]) to delete data from a SPARQL endpoint.

In SPARQLDelete[pattern->template], template corresponds to the DELETE clause, and pattern corresponds to the WHERE clause of a SPARQL update request.

In SPARQLDelete[pattern], pattern corresponds to the DELETE WHERE clause of a SPARQL update request.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Needs["GraphStore`"]

Specify a graph with data about fruits:

ex[s_]:=IRI["http://example.org/"<>s];

fruitGraph=RDFStore[{
RDFTriple[ex["banana"],ex["color"],"yellow"],
RDFTriple[ex["strawberry"],ex["color"],"red"],
RDFTriple[ex["cherry"],ex["color"],"red"]
}]

Remove all red fruits:

fruitGraph=fruitGraph//SPARQLDelete[RDFTriple[SPARQLVariable["fruit"],IRI[(URLArgument["http://example.org/color"])],"red"]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(PackageLink[SPARQLDeleteData, paclet:GraphStore/ref/SPARQLDeleteData, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLInsert, paclet:GraphStore/ref/SPARQLInsert, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLDeleteInsert, paclet:GraphStore/ref/SPARQLDeleteInsert, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLInsertData, paclet:GraphStore/ref/SPARQLInsertData, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLUpdate, paclet:GraphStore/ref/SPARQLUpdate, GraphStore Package Symbol])  ▪  (PackageLink[RDFStore, paclet:GraphStore/ref/RDFStore, GraphStore Package Symbol])  ▪  (PackageLink[RDFTriple, paclet:GraphStore/ref/RDFTriple, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLVariable, paclet:GraphStore/ref/SPARQLVariable, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLGraph, paclet:GraphStore/ref/SPARQLGraph, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLLoad, paclet:GraphStore/ref/SPARQLLoad, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLClear, paclet:GraphStore/ref/SPARQLClear, GraphStore Package Symbol])  ▪  (PackageLink[SPARQLSelect, paclet:GraphStore/ref/SPARQLSelect, GraphStore Package Symbol])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Writing To RDF Stores Using SPARQL, paclet:GraphStore/guide/SPARQLUpdate])}, {▪(RefLinkPlain[Graph Store Overview, paclet:GraphStore/guide/GraphStoreOverview])}})}})