ali-rds
ali-rds copied to clipboard
fix: operator.update, columns in where cant be updated
#26
@dead-horse
@sunfuze, thanks for your PR! By analyzing the history of the files in this pull request, we identified @fengmk2, @dead-horse and @csbun to be potential reviewers.
Codecov Report
:exclamation: No coverage uploaded for pull request base (
master@7cb4e75
). Click here to learn what that means. The diff coverage is100%
.
@@ Coverage Diff @@
## master #27 +/- ##
=========================================
Coverage ? 98.92%
=========================================
Files ? 6
Lines ? 278
Branches ? 40
=========================================
Hits ? 275
Misses ? 3
Partials ? 0
Impacted Files | Coverage Δ | |
---|---|---|
lib/operator.js | 100% <100%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 7cb4e75...089fa9b. Read the comment docs.
db.update('table', { field1: 'abc', field2: 'efg' }, {
where: { field1: 'a', id: 1 }
})`
原来上面这种情况,是不会更新 field1
的。
db.update('table', { id: 1, field1: 'abc' })
上面的代码生成的 sql
不应该有 'SET id = 1' 的内容。