Loading TOC...

admin.databaseSubDatabases

admin.databaseSubDatabases(
   $config as element(configuration),
   $database-id as (Number|String)
) as Sequence

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

const admin = require('/MarkLogic/admin.xqy');
var config = admin.getConfiguration()
var databaseid = xdmp.database("Documents")
admin.databaseSubDatabases(config, databaseid)

 //returns the db.databaseReferences 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.