This commit is contained in:
parent
5815e79395
commit
a62e06d367
|
@ -639,7 +639,7 @@ SQLConnector.prototype.buildExpression = function(columnName, operator, columnVa
|
|||
function buildClause(columnValue, separator, grouping) {
|
||||
var values = [];
|
||||
for (var i = 0, n = columnValue.length; i < n; i++) {
|
||||
if (columnValue instanceof ParameterizedSQL) {
|
||||
if (columnValue[i] instanceof ParameterizedSQL) {
|
||||
values.push(columnValue[i]);
|
||||
} else {
|
||||
values.push(new ParameterizedSQL(PLACEHOLDER, [columnValue[i]]));
|
||||
|
@ -749,8 +749,7 @@ SQLConnector.prototype._buildWhere = function(model, where) {
|
|||
var sqlExp;
|
||||
if (expression === null || expression === undefined) {
|
||||
stmt.merge(columnName + ' IS NULL');
|
||||
} else if (expression &&
|
||||
(typeof expression === 'object' && !Array.isArray(expression))) {
|
||||
} else if (expression && expression.constructor === Object) {
|
||||
var operator = Object.keys(expression)[0];
|
||||
// Get the expression without the operator
|
||||
expression = expression[operator];
|
||||
|
|
Loading…
Reference in New Issue