admin.databaseSubDatabases( config as element(configuration), database-id as (Number|String) ) as Sequence
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. |
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