
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');
const config = admin.getConfiguration()
const databaseid = xdmp.database("Documents")
admin.databaseSubDatabases(config, databaseid)
//returns the db.databaseReferences element, if there are any configured
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.