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
merged 2 commits into from Oct 9, 2018

Conversation

@ferfabricio
Copy link
Contributor

@ferfabricio ferfabricio commented Oct 5, 2018

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 CONTRIBUTING.md?

Description of change

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

Closes #9935

@ferfabricio
Copy link
Contributor Author

@ferfabricio ferfabricio commented Oct 5, 2018

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

image

@codecov
Copy link

@codecov 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.

@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Oct 9, 2018

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
4 checks passed
4 checks passed
codecov/patch 100% of diff hit (target 96.39%)
Details
codecov/project 96.39% (+<.01%) compared to 9f58b82
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sushantdhiman
Copy link
Contributor

@sushantdhiman sushantdhiman commented Oct 9, 2018

Thanks @ferfabricio

@abettke
Copy link

@abettke abettke commented Oct 9, 2018

Legend. Thanks for the PR @ferfabricio

@gabegorelick
Copy link
Contributor

@gabegorelick gabegorelick commented Apr 9, 2019

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

See #10743

@frlinw
Copy link
Contributor

@frlinw frlinw commented Apr 10, 2019

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
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants