Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!




Get the handle for a database other than default (as configured in settings/app.jcon).

Example configuration of a 'sales' database:

    app: {
        // ...

    databases: {

        default: {
            file: app.db

        sales: {
            driver: 'mysql',
            server: 'localhost',
            database: 'sales',
            username: 'dbuser',
            password: 'maknmoney$'

All Db functions can be called directly on this handle.

let dbSales = Db.use('sales');

let query = sql'SELECT SUM(price) as total FROM monthlySales';
let totalMonthlySales = dbSales.selectRow(query);