Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mssql): upsert query with falsey values (#12453) #12459

Merged
merged 1 commit into from
Jul 4, 2020

Conversation

patrickcarnahan
Copy link
Contributor

@patrickcarnahan patrickcarnahan commented Jul 3, 2020

Pull Request check-list

Please make sure to review and check all of these items:

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you update the typescript typings accordingly (if applicable)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

cherry-pick of #12453

properly determines if a value used in a filter clause for upsert is relevant. currently there is a bug where it treats "falsey" values as not being specified, making it impossible to use something like a default value of 0 in a unique key and then filter by that value.

closes #11902
closes #11684

@codecov
Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #12459 into v6 will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##               v6   #12459   +/-   ##
=======================================
  Coverage   96.44%   96.44%           
=======================================
  Files          95       95           
  Lines        9154     9154           
=======================================
  Hits         8829     8829           
  Misses        325      325           
Impacted Files Coverage Δ
lib/dialects/mssql/query-generator.js 95.69% <100.00%> (ø)

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 9a45509...ffc576b. Read the comment docs.

@sushantdhiman sushantdhiman merged commit 4d82907 into sequelize:v6 Jul 4, 2020
@sushantdhiman
Copy link
Contributor

🎉 This PR is included in version 6.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants