Loading TOC...

admin.databaseForeignReplicaGetClusterId

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

Summary

This function returns the id of the replica cluster 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-cluster-id($freplica)

  (: Returns the id of the replica cluster from the foreign replica database
     configuration element. :)
    

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