Skip to content

[api-v3-db] documentation of getDataSources states it returns list but is object in fact #123

@shturec

Description

@shturec

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

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions