This HTML5 document contains 30 embedded RDF statements represented using HTML+Microdata notation.

The embedded RDF content will be recognized by any processor of HTML5 Microdata.

PrefixNamespace IRI
n16http://docs.openlinksw.com/virtuoso/sparqlextensions.html#
dctermshttp://purl.org/dc/terms/
atomhttp://atomowl.org/ontologies/atomrdf#
foafhttp://xmlns.com/foaf/0.1/
n8http://vos.openlinksw.com/dataspace/services/wiki/
oplhttp://www.openlinksw.com/schema/attribution#
n4http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/
n14http://vos.openlinksw.com/dataspace/owiki/wiki/VOS/VirtTipsAndTricksDeleteGraphProc/sioc.
dchttp://purl.org/dc/elements/1.1/
n2http://vos.openlinksw.com/dataspace/dav#
rdfshttp://www.w3.org/2000/01/rdf-schema#
n9http://rdfs.org/sioc/services#
n18http://vos.openlinksw.com/dataspace/person/dav#
siocthttp://rdfs.org/sioc/types#
n7http://vos.openlinksw.com/dataspace/owiki/wiki/
rdfhttp://www.w3.org/1999/02/22-rdf-syntax-ns#
n10http://vos.openlinksw.com/dataspace/owiki#
xsdhhttp://www.w3.org/2001/XMLSchema#
n6http://vos.openlinksw.com/dataspace/person/owiki#
siochttp://rdfs.org/sioc/ns#
Subject Item
n18:this
foaf:made
n4:VirtTipsAndTricksDeleteGraphProc
Subject Item
n2:this
sioc:creator_of
n4:VirtTipsAndTricksDeleteGraphProc
Subject Item
n8:item
n9:services_of
n4:VirtTipsAndTricksDeleteGraphProc
Subject Item
n10:this
sioc:creator_of
n4:VirtTipsAndTricksDeleteGraphProc
Subject Item
n7:VOS
sioc:container_of
n4:VirtTipsAndTricksDeleteGraphProc
atom:entry
n4:VirtTipsAndTricksDeleteGraphProc
atom:contains
n4:VirtTipsAndTricksDeleteGraphProc
Subject Item
n4:VirtTipsAndTricksDeleteGraphProc
rdf:type
sioct:Comment atom:Entry
dcterms:created
2017-06-13T05:48:32.773919
dcterms:modified
2017-06-13T05:48:32.773919
rdfs:label
VirtTipsAndTricksDeleteGraphProc
foaf:maker
n6:this n18:this
dc:title
VirtTipsAndTricksDeleteGraphProc
opl:isDescribedUsing
n14:rdf
sioc:has_creator
n2:this n10:this
sioc:content
%META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+How can I delete graphs using stored procedure? The following script demonstrates the use of custom stored procedures for deleting graph(s). It first creates a table <code><nowiki>GRAPHS_TO_DELETE</nowiki></code>, into which the names of the graphs to be deleted should be inserted, as follows: <verbatim> use MYUSR; create procedure GRAPHS_TO_DELETE_SP (in gd_iris any) { declare gd_iri iri_id; declare dp, row any; result_names (gd_iri); dp := dpipe (0, '__I2IDN'); foreach (varchar iri in GD_IRIS) do { dpipe_input (dp, iri); } while (0 <> (row := dpipe_next (dp, 0))) { result (row[0]); } } ; drop view GRAPHS_TO_DELETE_VIEW; create procedure view GRAPHS_TO_DELETE_VIEW as MYUSR.DBA.GRAPHS_TO_DELETE_SP (gd_iris) (gd_iri any); create procedure DELETE_GRAPHS (in g_iris any) { declare g_iids any; if (not isvector (g_iris) and g_iris is not null) signal ('22023', '.....', 'The input argument must be an array of strings or null'); if (not length (g_iris)) return 0; delete from DB.DBA.RDF_QUAD where G in (select * from GRAPHS_TO_DELETE_VIEW where gd_iris = g_iris) option (loop exists); return row_count (); } ; </verbatim> Finally call the procedure <code>DELETE_GRAPHS</code> to perform the deletion of the specified graphs. Note it does not return a result set and can be called as follows: <verbatim> SQL> select MYUSR.DBA.DELETE_GRAPHS (vector ('g1', 'g2', 'g3')); </verbatim> This will return the number of triples removed from the specified graphs. <b>Note</b>: the procedure only applies to the cluster so to get IRI IDs via partitioned pipe (DAQ). It is not usable on single. ---+++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/sparqlextensions.html#rdfsparulexamples14][How can I delete triples from a graph?]]
sioc:id
09190f0d706b2ea107278c77aac8a874
sioc:link
n4:VirtTipsAndTricksDeleteGraphProc
sioc:has_container
n7:VOS
n9:has_services
n8:item
atom:title
VirtTipsAndTricksDeleteGraphProc
sioc:links_to
n16:rdfsparulexamples14
atom:source
n7:VOS
atom:author
n18:this
atom:published
2017-06-13T05:48:32Z
atom:updated
2017-06-13T05:48:32Z
sioc:topic
n7:VOS