MySQL.getConnection()

Get an active connection to a MySQL database from the pool.

Usage

Hover over inputs/exits for more info.

var MySQL = require('machinepack-mysql');


// Get an active connection to a MySQL database from the pool.

MySQL.getConnection({

manager: '===',

meta: '===',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// Could not acquire a connection to the database using the specified manager.

failed: function (result) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

manager required

The connection manager instance to acquire the connection from.

'==='
meta

Additional stuff to pass to the driver.

'==='

Exits

error

An unexpected error occurred.

failed

Could not acquire a connection to the database using the specified manager.

{ error: '===', meta: '===' }
success

OK.

{ connection: '===', meta: '===' }