flexrep.pullDelete

flexrep.pullDelete(
   domain-id as (Number|String),
   [target-id as (Number|String)]
) as null

Summary

This function deletes the pull configuration from the Replica database.

Parameters
domain-id The ID of the domain containing the replicated content. This value is obtained from the Trigger database used by the Master database.
target-id The optional ID of the target. When used, you can specify a specific domain/target combination from which to delete the pull configuration.

Example

// Execute against a Replica database.
const flexrep = require('/MarkLogic/flexrep');

  declareUpdate();
  // Obtain the domain ID from the database used by the Master to enable CPF.
  const domain = xdmp.eval(
    'const dom = require("/MarkLogic/cpf/domains");' +
      'fn.data(dom.get("Default Master").xpath("//dom:domain-id"));',
       null,
         {
          'database' : xdmp.database('Triggers')
         });

  const cfg = flexrep.configurationGet(domain, true);
  const domainId = flexrep.configurationGetId(cfg);

  flexrep.pullDelete(domainId);

  // Removes the Pull Replication configuration element from the Replica database.
   

Required Privileges

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

Powered by MarkLogic Server | Terms of Use | Privacy Policy