MarkLogic 12 EA 1 Product Documentation
admin:database-foreign-replica-get-database-id

admin:database-foreign-replica-get-database-id(
   $foreign-replica as element(db:foreign-replica)
) as xs:unsignedLong

Summary

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

Parameters
foreign-replica The foreign replica configuration element.

Example


  xquery version "1.0-ml";

  import module namespace admin = "http://marklogic.com/xdmp/admin"
      at "/MarkLogic/admin.xqy";

  let $cfg := admin:get-configuration()
  let $freplica := admin:database-get-foreign-replicas($cfg, xdmp:database("Documents"))

  return admin:database-foreign-replica-get-database-id($freplica)

  (: Returns the id of the replica database from the foreign replica database
     configuration element. :)
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy