vjsrinath / sails-orientdb

An waterline adapter for orient db
Other
10 stars 5 forks source link

destroy issue #17

Open martingg88 opened 9 years ago

martingg88 commented 9 years ago

Can you look at following code. it should be where(options.where) ? can you change it?

dbHelper.prototype.destroy = function (collection, options, cb) {

    this.db.delete()
        .from(collection)
        .where(options)
        .transform(transformers)
        .scalar()
        .then(function (total) {
            cb(null, total);
        })
        .error(function (err) {
            cb(err);
        });

};