Loading TOC...

flexrep.delete

flexrep.delete(
   delete as element(flexrep.delete)
) as null

Summary

This function applies a delete element to the current database.

Parameters
delete The delete element to apply to the database.

Example

const flexrep = require('/MarkLogic/flexrep');

  declareUpdate();
  const del = fn.head(xdmp.unquote('<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>')).root;

   flexrep.delete(del);
  
   // 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.