Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtTipsAndTricksGuideModifyUsageAsInsert
|
maker
| |
Title
| - VirtTipsAndTricksGuideModifyUsageAsInsert
|
isDescribedUsing
| |
has creator
| |
content
| - %META:TOPICPARENT{name="VirtTipsAndTricksGuide"}%
---+How Can I Use MODIFY to update triples?
The following queries are equivalent:
<verbatim>
MODIFY <http://test.com/>
DELETE {?s ?p ?o}
INSERT {?s_new ?p ?o}
FROM <http://test.com/>
WHERE
{
{
SELECT iri(bif:replace(str(?s),"http://test.com/link","http://test.com/extra/link" ) )
AS ?s_new ?s ?p ?o
WHERE
{
?s ?p ?o FILTER (regex (str(?s), "http://test.com/link"))
}
}
}
</verbatim>
<verbatim>
MODIFY <http://test.com/>
DELETE {?s ?p ?o}
INSERT {`iri(?s_new)` ?p ?o}
FROM <http://test.com/>
WHERE
{
{
SELECT bif:replace(str(?s),"http://test.com/link","http://test.com/extra/link" )
AS ?s_new ?s ?p ?o
WHERE
{
?s ?p ?o FILTER (regex (str(?s), "http://test.com/link"))
}
}
}
</verbatim>
<verbatim>
MODIFY <http://test.com/>
DELETE {?s ?p ?o}
INSERT
{ `iri(bif:replace(str(?s),"http://test.com/link","http://test.com/extra/link" ))` ?p ?o }
FROM <http://test.com/>
WHERE
{
{
?s ?p ?o FILTER (regex (str(?s), "http://test.com/link"))
}
}
}
</verbatim>
---++Related
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][Virtuoso Documentation]]
|
id
| - a265f99754f0202e55e38befd45da741
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtTipsAndTricksGuideModifyUsageAsInsert
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| |
atom:updated
| |
topic
| |
is made
of | |
is container of
of | |
is link
of | |
is http://rdfs.org/si...vices#services_of
of | |
is creator of
of | |
is atom:entry
of | |
is atom:contains
of | |