Gitlab NPM Twitter
Kado
High Quality JavaScript Libraries

Database

Introduced in 3.0.0

Stability: 2 - Stable

const Database = require('kado/lib/Database')

This library manages Database connections that are stored through instances registered to this library.

Class: Database

Database extends Connect see Connect.md for more engine management and more.

static Database.queryOptions(config, profiler)

static Database.getInstance()

Database.constructor()

Database.queryOptions(config, profiler)

Database.connect(name)

Note: when no name is provided all connections will be executed.

Database.close(name)

Note: when no name is provided all connections will be closed.

Class: DatabaseEngine

DatabaseEngine extends ConnectEngine see ConnectEngine.md for more engine management and more.

DatabaseEngine.connect()

Must be extended and used to connect to underlying database.

DatabaseEngine.close()

By default will try and call engine.close() and then call ConnectEngine.resetEngine(). Which should be sufficient for most underlays.