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: escape dollarsign in sequelize.fn related to issue 11533 #11606

merged 4 commits into from Oct 28, 2019


Copy link

@schopr9 schopr9 commented Oct 24, 2019

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

Description of change


  • changed the abstract query generator handleSequelizeMethod to escape dollar ($) in argument

Copy link

@papb papb commented Oct 24, 2019

Hello! I see you are a first-time contributor, thank you for taking the time to help Sequelize! I hope to see more PRs from you in the future!

Tests are failing though, please take a look :)

Also your branch was outdated, I just brought it up to date for you (don't worry about this):


Let me know if you need help. Thanks!!

@papb papb added status: awaiting response type: bug labels Oct 24, 2019
Copy link

@codecov codecov bot commented Oct 25, 2019

Codecov Report

Merging #11606 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #11606   +/-   ##
  Coverage   96.26%   96.26%           
  Files          94       94           
  Lines        9190     9190           
  Hits         8847     8847           
  Misses        343      343
Impacted Files Coverage Δ
lib/dialects/abstract/query-generator.js 97.01% <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 c77c553...eb719b9. Read the comment docs.

papb approved these changes Oct 25, 2019
Copy link

@papb papb left a comment

Great, I like your tests, and tests are passing, so LGTM!

@papb papb added status: awaiting maintainer and removed status: awaiting response labels Oct 25, 2019
@sushantdhiman sushantdhiman merged commit 43c4f6b into sequelize:master Oct 28, 2019
4 checks passed
@sushantdhiman sushantdhiman removed the status: awaiting maintainer label Jan 29, 2020
Copy link

@kristijanhusak kristijanhusak commented Sep 2, 2020

I'm having this problem:

const theCode = '10$off';
  where: {
    code: sequelize.where(sequelize.fn('lower', sequelize.col('code')), sequelize.fn('lower', theCode))

This never finds it because it does lower("code") = lower('10$$off'). Solution was to do theCode.toLowerCase(), but this is still a bug.

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

Successfully merging this pull request may close these issues.

None yet

4 participants