Loading TOC...

flexrep:delete

flexrep:delete(
   $delete as element(flexrep:delete)
) as empty-sequence()

Summary

This function applies a delete element to the current database.

Parameters
delete The delete element to apply to the database.

Example

  xquery version "1.0-ml"; 

  import module namespace flexrep = "http://marklogic.com/xdmp/flexible-replication" 
      at "/MarkLogic/flexrep.xqy";

  let $delete :=
    <flexrep:delete xmlns:flexrep="http://marklogic.com/xdmp/flexible-replication">
        <doc:uri xmlns:doc="xdmp:document-load">/content/foo.xml</doc:uri>
        <flexrep:last-updated>2010-03-04T14:35:12.714-08:00</flexrep:last-updated>
    </flexrep:delete>

   return flexrep:delete($delete)
  
   (: Applies the specified delete element to /content/foo.xml.  This effectively
      deletes the document from both the Master and Replica databases. :) 
     

Required Privileges

http://marklogic.com/xdmp/privileges/flexrep-user

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.