You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sql=sql.concat(' WHERE ',this.formatWhere(obj.$where));
1318
+
if(obj.$where==null){
1319
+
thrownewError('Update expression must have a where clause.');
1320
+
}
1321
+
1322
+
varwhereClause=this.formatWhere(obj.$where);
1323
+
Args.check(whereClause!=null,newError('Update expression must have a valid "where" clause.'));
1324
+
Args.check(typeofwhereClause==='string'&&whereClause.trim().length>0,newError('"Where" clause cannot be empty at the context of an update expression.'));
sql=sql.concat('DELETE FROM ',this.escapeName(entity));
1337
-
if(_.isObject(obj.$where))
1338
-
sql=sql.concat(' WHERE ',this.formatWhere(obj.$where));
1344
+
if(obj.$where==null){
1345
+
thrownewError('Delete expression must have a where clause.');
1346
+
}
1347
+
varwhereClause=this.formatWhere(obj.$where);
1348
+
Args.check(whereClause!=null,newError('Delete expression must have a valid "where" clause.'));
1349
+
Args.check(typeofwhereClause==='string'&&whereClause.trim().length>0,newError('"Where" clause cannot be empty at the context of a delete expression.'));
Copy file name to clipboardExpand all lines: package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@themost/query",
3
-
"version": "2.6.74",
3
+
"version": "2.6.75",
4
4
"description": "@themost/query is a query builder for SQL. It includes a wide variety of helper functions for building complex SQL queries under node.js.",
0 commit comments