
admin.databaseSuperDatabases( config as element(configuration), database-id as (Number|String) ) as Sequence
This function returns a database-reference element representing where the specified database serves as a sub-database. It only includes information about where the database serves as a sub-database on the current cluster; if you want to find where it serves as a sub-database on another cluster, you will have to make the call from the other cluster.
| Parameters | |
|---|---|
| config | A configuration specification, typically as returned from one of the Admin module functions. |
| database-id | The ID of the sub-database. |
const admin = require('/MarkLogic/admin.xqy');
var config = admin.getConfiguration()
var databaseid = xdmp.database("Documents")
admin.databaseSuperDatabases(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.