Waterline.connect()

Lease a database connection, perform some logic, then release it back from whence it came.

Usage

Hover over inputs/exits for more info.

var Waterline = require('machinepack-waterline');


// Lease a database connection, perform some logic, then release it back from whence it came.

Waterline.connect({

datastore: 'larrysMySQLCluster',

during: '->',

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

datastore required

The identity of the datastore to use.

'larrysMySQLCluster'
during required

A function with custom logic to run once the connection is established.

'->'

Exits

error

An unexpected error occurred.

success

OK.

'==='