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

feat(query-generator): add startsWith, endsWith and substring (#9935) #9999

merged 2 commits into from Oct 9, 2018


Copy link

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 follow the commit message conventions explained in

Description of change

Implements startsWith, endsWith and substring query operatos like in django ORM like described in the issue.

Closes #9935

Copy link
Contributor Author

I think this test is instable. I run many times on a docker and get different results on executions.


Copy link

codecov bot commented Oct 9, 2018

Codecov Report

Merging #9999 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9999      +/-   ##
+ Coverage   96.39%   96.39%   +<.01%     
  Files          63       63              
  Lines        9400     9406       +6     
+ Hits         9061     9067       +6     
  Misses        339      339
Impacted Files Coverage Δ
lib/operators.js 100% <ø> (ø) ⬆️
lib/dialects/abstract/query-generator/operators.js 90.9% <ø> (ø) ⬆️
lib/dialects/abstract/query-generator.js 97.65% <100%> (+0.01%) ⬆️

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 9f58b82...bb8751c. Read the comment docs.

Copy link

I think this test is instable. I run many times on a docker and get different results on executions.

I'll look into this

@sushantdhiman sushantdhiman merged commit 8a8366b into sequelize:master Oct 9, 2018
Copy link

Thanks @ferfabricio

Copy link

abettke commented Oct 9, 2018

Legend. Thanks for the PR @ferfabricio

Copy link

It seems like startsWith and endsWith are reversed from what they should be, or am I missing something?

See #10743

Copy link

And based on javascript String, includes would have been more relevant than substring

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

Successfully merging this pull request may close these issues.

Feature Request: startsWith, endsWith, substring operators
5 participants