SPARQLDeleteInsert[del,ins,pattern]
is an update operator that can be applied to an RDFStore, which deletes and inserts data generated from templates del and ins, based on solutions of matching pattern.
SPARQLDeleteInsert
SPARQLDeleteInsert[del,ins,pattern]
is an update operator that can be applied to an RDFStore, which deletes and inserts data generated from templates del and ins, based on solutions of matching pattern.
更多信息和选项
- SPARQLDeleteInsert can be used in SPARQLExecute to update data in a SPARQL endpoint.
范例
基本范例 (1)
Needs["GraphStore`"]Specify a graph of data about people:
foaf[s_] := URL["http://xmlns.com/foaf/0.1/" <> s];
ex[s_] := URL["http://example.org/" <> s];personGraph = RDFStore[{
RDFTriple[ex["person1"], foaf["givenName"], "Tony"],
RDFTriple[ex["person1"], foaf["familyName"], "Schindler"],
RDFTriple[ex["person2"], foaf["givenName"], "Alex"],
RDFTriple[ex["person2"], foaf["familyName"], "Hartich"]
}];Change all given names from "Tony" to "Toni":
personGraph = personGraph//SPARQLDeleteInsert[
RDFTriple[SPARQLVariable["person"], foaf["givenName"], "Tony"],
RDFTriple[SPARQLVariable["person"], foaf["givenName"], "Toni"],
RDFTriple[SPARQLVariable["person"], foaf["givenName"], "Tony"]
]personGraph//SPARQLSelect[RDFTriple[SPARQLVariable["person"], foaf["givenName"], SPARQLVariable["givenName"]] -> "givenName"]文本
Wolfram Research (2019),SPARQLDeleteInsert,Wolfram 语言函数,https://reference.wolfram.com/language/GraphStore/ref/SPARQLDeleteInsert.html.
CMS
Wolfram 语言. 2019. "SPARQLDeleteInsert." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/GraphStore/ref/SPARQLDeleteInsert.html.
APA
Wolfram 语言. (2019). SPARQLDeleteInsert. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/GraphStore/ref/SPARQLDeleteInsert.html 年
BibTeX
@misc{reference.wolfram_2026_sparqldeleteinsert, author="Wolfram Research", title="{SPARQLDeleteInsert}", year="2019", howpublished="\url{https://reference.wolfram.com/language/GraphStore/ref/SPARQLDeleteInsert.html}", note=[Accessed: 11-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_sparqldeleteinsert, organization={Wolfram Research}, title={SPARQLDeleteInsert}, year={2019}, url={https://reference.wolfram.com/language/GraphStore/ref/SPARQLDeleteInsert.html}, note=[Accessed: 11-August-2026]}