MarkLogic 10 Product Documentation
admin.databaseForeignReplicaGetDatabaseId

admin.databaseForeignReplicaGetDatabaseId(
   foreign-replica as element(db.foreignReplica)
) as (Number|String)

Summary

This function returns the id of the replica database from the replica database configuration.

Parameters
foreign-replica The foreign replica configuration element.

Example


  let admin = require("/MarkLogic/admin.xqy")
  let cfg = admin.getConfiguration()
  let freplica = admin.databaseGetForeignReplicas(cfg, xdmp.database("Documents"))
  admin.databaseForeignReplicaGetDatabaseId(fn.head(freplica))
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy