
flexrep.configurationGet( domain-id as (Number|String), [assert as Boolean] ) as element(flexrep.configuration)?
This function gets the replication configuration for a CPF domain.
| Parameters | |
|---|---|
| domain-id | The ID of the replicated domain. |
| assert |
Set to true to throw an exception if the configuration does
not exist. The default value is false.
|
// This query must be executed on the Master database.
const flexrep = require('/MarkLogic/flexrep');
// 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')
});
flexrep.configurationGet(domain, true);
// Returns the replication configuration element for the "Replicated Content"
// domain.
http://marklogic.com/xdmp/privileges/flexrep-admin
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.