admin.databaseForeignMasterGetDatabaseId( foreign-master as element(db.foreignMaster) ) as (Number|String)
This function returns the id of the foreign master database. This function must be executed on the replica cluster.
Parameters | |
---|---|
foreign-master | The foreign master configuration. |
xquery version "1.0-ml"; import module namespace admin = "http://marklogic.com/xdmp/admin" at "/MarkLogic/admin.xqy"; let $cfg := admin:get-configuration() let $fmaster := admin:database-get-foreign-master($cfg, xdmp:database("Documents")) return admin:database-foreign-master-get-database-id($fmaster) (: Returns the id of the master database from the foreign master configuration element. :)
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.