Merge pull request #136 from sdrdis/patch-3
Fixed bug for IN on NOT IN - corrected
This commit is contained in:
commit
799fe31b10
|
@ -238,6 +238,10 @@ MySQL.prototype.all = function all(model, filter, callback) {
|
||||||
} else if (conds[key].constructor.name === 'Object') {
|
} else if (conds[key].constructor.name === 'Object') {
|
||||||
var condType = Object.keys(conds[key])[0];
|
var condType = Object.keys(conds[key])[0];
|
||||||
var sqlCond = keyEscaped;
|
var sqlCond = keyEscaped;
|
||||||
|
if ((condType == 'inq' || condType == 'nin') && val.length == 0) {
|
||||||
|
cs.push(condType == 'inq' ? 0 : 1);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
switch (condType) {
|
switch (condType) {
|
||||||
case 'gt':
|
case 'gt':
|
||||||
sqlCond += ' > ';
|
sqlCond += ' > ';
|
||||||
|
|
Loading…
Reference in New Issue