Skip to content

Commit

Permalink
Addional fixes based on master branch
Browse files Browse the repository at this point in the history
Reference for change is based on #12260

- use rowCount intead of data.length when not returning data
  • Loading branch information
ShaharHD committed Jun 23, 2020
1 parent ff154f8 commit ccdea80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/dialects/mssql/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,11 @@ class Query extends AbstractQuery {
return data[0];
}
if (this.isBulkUpdateQuery()) {
if (this.options.returning)
if (this.options.returning) {
return this.handleSelectQuery(data);
}

return data.length;
return rowCount;
}
if (this.isBulkDeleteQuery()) {
return data[0] && data[0].AFFECTEDROWS;
Expand Down

0 comments on commit ccdea80

Please sign in to comment.