The documentation for getDataSources(databaseType) states "Returns the list of the available data-sources in this instance for the given databaseType. In case the databaseType is not present, the data-sources of the default database type are listed. Returns list of string"
However, invoking console.info(JSON.stringify(require('db/database').getDataSources())) returns a single object instead:
{
"DefaultDB": {
"originalDataSource": {
"databaseName": "target/dirigible/derby",
"createDatabase": "create",
"attributesAsPassword": false,
"shortDatabaseName": "target/dirigible/derby",
"loginTimeout": 0
}
}
}
Correct the docs and be more precise for the returned type - the term list is associated with array, an object is an object or associative (hash) map depending on the role and if you want to be more precise on the semantics
The documentation for
getDataSources(databaseType)states "Returns the list of the available data-sources in this instance for the given databaseType. In case the databaseType is not present, the data-sources of the default database type are listed. Returns list of string"However, invoking
console.info(JSON.stringify(require('db/database').getDataSources()))returns a single object instead:{ "DefaultDB": { "originalDataSource": { "databaseName": "target/dirigible/derby", "createDatabase": "create", "attributesAsPassword": false, "shortDatabaseName": "target/dirigible/derby", "loginTimeout": 0 } } }Correct the docs and be more precise for the returned type - the term list is associated with array, an object is an object or associative (hash) map depending on the role and if you want to be more precise on the semantics