MarkLogic Server 11.0 Product Documentation
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');
const config = admin.getConfiguration()
const databaseid = xdmp.database("Documents")
admin.databaseSubDatabases(config, databaseid)

 //returns the db.databaseReferences element, if there are any configured 
    
Powered by MarkLogic Server | Terms of Use | Privacy Policy