<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/sem.databaseNodes.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>sem.databaseNodes</api:function-name><api:suggest>sem.databasenodes</api:suggest><api:suggest>sem</api:suggest><api:suggest>databasenodes</api:suggest><api:function-link mode="xquery" fullname="sem:database-nodes">/apidoc/8.0/sem:database-nodes.xml</api:function-link><api:function mode="javascript" name="databaseNodes" lib="sem" category="Semantics" hidden="false" bucket="MarkLogic Built-In Functions" prefix="sem" namespace="http://marklogic.com/semantics" fullname="sem.databaseNodes"><api:summary>
	  This function returns database nodes backing given triples. 
	  Any given cts:triple may be backed by zero, one, or multiple 
	  database nodes.
</api:summary><api:params><api:param name="triples" type="sem:triple*"><api:param-description>
		  The triples to locate.
	  </api:param-description><api:param-name>triples</api:param-name><api:param-type>sem.triple[]</api:param-type></api:param><api:param name="options" type="xs:string*" optional="true"><api:param-description>
		  Matching options. Valid options include:
        <blockquote xmlns="http://www.w3.org/1999/xhtml">
        <dl>
          <dt>
             <pre>=</pre>
          </dt>
	  <dd>Specify equality matching (following the rules of the 
		  $operator argument to cts:triples).</dd>
          <dt>
             <pre>sameTerm</pre>
          </dt>
	  <dd>Specify sameTerm matching (following the rules of the 
		  $operator argument to cts:triples) (if neither '=' nor 
		  'sameTerm' are specified, this option gets used by default).
	  </dd>
          <dt>
             <pre>all</pre>
          </dt>
	  <dd>Specify to return all triple-backing nodes, no matter where 
		  or in what format they occur in MarkLogic 7, only 
		  <code>sem:triple</code> elements are recognized as triples). 
		  If this option is not specified, only 
		  <code>sem:triple</code> elements found in documents that 
		  have the root element of sem:triples will be returned.</dd>
          <dt>
             <pre>quads</pre>
          </dt>
	  <dd>Specify to examine the graph component in the passed 
		  in <code>sem:triples</code> and use it to match.</dd>
        </dl>
    </blockquote>  
	</api:param-description><api:param-name>options</api:param-name><api:param-type>String[]</api:param-type></api:param><api:param name="query" type="cts:query?" optional="true"><api:param-description>
		A cts:query to limit the scope of nodes returned.
	</api:param-description><api:param-name>query</api:param-name><api:param-type>cts.query?</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
var sem = require("/MarkLogic/semantics.xqy");
 
// this program deletes data--use with care 

var triples = sem.sparql('&lt;sparql query that selects triples to delete&gt;');
for (var x in sem.databaseNodes(triples)) {
   xdmp.nodeDelete(x); };
</pre></api:example></api:function></api:function-page>