Waterline.destroy()

Delete records from this model that match the specified criteria.

Usage

Hover over inputs/exits for more info.

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


// Delete records from this model that match the specified criteria.

Waterline.destroy({

model: 'user',

where: {},

}).exec({

// An unexpected error occurred.

error: function (err) {

 

},

// The provided `where` was invalid.

invalidCriteria: function () {

 

},

// OK.

success: function (result) {

 

},

});

Inputs

model required

'user'
where

{}

Exits

error

An unexpected error occurred.

invalidCriteria

The provided `where` was invalid.

success

OK.

123