Add like/nlike support
This commit is contained in:
parent
33b86b51b2
commit
a41c7f5c7a
|
@ -450,6 +450,12 @@ MySQL.prototype._buildWhere = function (model, conds) {
|
||||||
case 'neq':
|
case 'neq':
|
||||||
sqlCond += ' != ';
|
sqlCond += ' != ';
|
||||||
break;
|
break;
|
||||||
|
case 'like':
|
||||||
|
sqlCond += ' LIKE ';
|
||||||
|
break;
|
||||||
|
case 'nlike':
|
||||||
|
sqlCond += ' NOT LIKE ';
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
sqlCond += (condType === 'inq' || condType === 'nin') ? '(' + val + ')' : val;
|
sqlCond += (condType === 'inq' || condType === 'nin') ? '(' + val + ')' : val;
|
||||||
cs.push(sqlCond);
|
cs.push(sqlCond);
|
||||||
|
|
Loading…
Reference in New Issue