Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:forest-foreign-master-get-database-id

admin:forest-foreign-master-get-database-id(
   $foreign-master as element(as:foreign-master)
) as xs:unsignedLong

Summary

This function returns the id for the database from the foreign master forest configuration element.

Parameters
foreign-master The element returned by the admin:forest-foreign-master or admin:forest-get-foreign-master function that specifies the configuration for the master forest. More than one forest master configuration elements may be specified in a one-to-many replication scheme.

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 $fmforest := admin:forest-get-foreign-master($cfg, xdmp:forest("Documents"))

  return admin:forest-foreign-master-get-database-id($fmforest)

  (: Returns the id for the foreign master database. :)
    

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.