Loading TOC...

MarkLogic Server 11.0 Product Documentation
admin:database-sub-databases

admin:database-sub-databases(
   $config as element(configuration),
   $database-id as xs:unsignedLong
) as element(db:database-reference)*

Summary

This function returns a database-reference element representing the sub-databases of the specified super-database.

Parameters
config A configuration specification, typically as returned from one of the Admin module functions.
database-id The ID of the super-database.

Example



xquery version "1.0-ml";

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

let $config := admin:get-configuration()
let $databaseid := xdmp:database("Documents")
return
admin:database-sub-databases($config, $databaseid)
(: returns the db:database-references element, if there are any configured :)
    

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