balderdashy/waterline-sequel — pull request #12 by mikemorreale (2014-09-23 05:51:11+00:00)
Title: fix for empty NOT IN () in WHERE clause

The following code gives an error for trying to do an empty NOT IN (), which is invalid SQL.

var list = [];
User.find().where({id: {not: list}}).exec(function (err, users) {
});

I added a small fix to use WHERE TRUE instead when this occurs.