generalize escape on IN and NOT IN values

This commit is contained in:
Sébastien Drouyer 2012-10-27 20:48:21 +02:00
parent d5b0003350
commit fc46de162f
1 changed files with 1 additions and 3 deletions

View File

@ -158,9 +158,7 @@ MySQL.prototype.toDatabase = function (prop, val) {
} else if (operator == 'inq' || operator == 'nin') {
if (!(val.propertyIsEnumerable('length')) && typeof val === 'object' && typeof val.length === 'number') { //if value is array
for (var i = 0; i < val.length; i++) {
if (typeof val[i] === 'string') {
val[i] = this.client.escape(val[i]);
}
val[i] = this.client.escape(val[i]);
}
return val.join(',');
} else {