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

Aliases deletion #9933

Merged
merged 6 commits into from Sep 19, 2018
Merged

Aliases deletion #9933

merged 6 commits into from Sep 19, 2018

Conversation

madmoizo
Copy link
Contributor

@madmoizo madmoizo commented Sep 18, 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?
  • 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

Remove some aliases
#9372

List of aliases

Remove Keep
insertOrUpdate upsert ✔️
find findOne ✔️
findAndCount findAndCountAll ✔️
findOrInitialize findOrBuild ✔️
beforeConnection beforeConnect ✔️
[after,before]BulkDelete [after,before]BulkDestroy ✔️
[after,before]Delete [after,before]Destroy ✔️
hook addHook ✔️
updateAttributes update ✔️
asIs literal ✔️
Sequelize.condition Sequelize.where ✔️
Sequelize.prototype.Utils Sequelize.Utils ✔️
Sequelize.prototype.Promise Sequelize.Promise ✔️
Sequelize.prototype.TableHints Sequelize.TableHints ✔️
Sequelize.prototype.Op Sequelize.Op ✔️
Sequelize.prototype.Transaction Sequelize.Transaction ✔️
Sequelize.prototype.Model Sequelize.Model ✔️
Sequelize.prototype.Deferrable Sequelize.Deferrable ✔️
Sequelize.prototype.Error Sequelize.Error ✔️
Sequelize.prototype[error] Sequelize[error] ✔️

Particular case

Remove New
findById, findByPrimary findByPk ✔️

DataTypes

I tried to make DOUBLE PRECISION change but this caused tests failure and I was unable to fix them. So I left DOUBLE PRECISION & NUMERIC aliases unchanged.

Remove Keep
NONE VIRTUAL ✔️
DOUBLE PRECISION DOUBLE
NUMERIC DECIMAL

@madmoizo
Copy link
Contributor Author

Tests fixed. Don't know why codecov failed.

Copy link
Contributor

@sushantdhiman sushantdhiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small change otherwise LGTM

@@ -1,7 +1,7 @@
'use strict';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only case for SequelizeErrors is changed, remove changes from this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was for consistancy, it's the only file where sequelizeErrors is used with an upper first letter. I'm reverting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave it

@sushantdhiman
Copy link
Contributor

Code coverage can be ignored for this PR

@codecov
Copy link

codecov bot commented Sep 19, 2018

Codecov Report

Merging #9933 into master will decrease coverage by <.01%.
The diff coverage is 82.75%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9933      +/-   ##
==========================================
- Coverage   96.04%   96.04%   -0.01%     
==========================================
  Files          63       63              
  Lines        9431     9420      -11     
==========================================
- Hits         9058     9047      -11     
  Misses        373      373
Impacted Files Coverage Δ
lib/dialects/postgres/query-generator.js 93.46% <ø> (ø) ⬆️
lib/errors/index.js 100% <ø> (ø) ⬆️
lib/associations/mixin.js 100% <ø> (ø) ⬆️
lib/dialects/postgres/query-interface.js 100% <ø> (ø) ⬆️
lib/data-types.js 95.75% <ø> (ø) ⬆️
lib/utils.js 98.29% <ø> (ø) ⬆️
lib/dialects/mysql/query-generator.js 97.77% <ø> (ø) ⬆️
lib/associations/belongs-to.js 100% <100%> (ø) ⬆️
lib/sequelize.js 96.57% <100%> (ø) ⬆️
lib/dialects/abstract/query-generator.js 97.64% <100%> (ø) ⬆️
... and 4 more

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 aa92764...6a659c0. Read the comment docs.

@sushantdhiman sushantdhiman merged commit b37985d into sequelize:master Sep 19, 2018
@sushantdhiman
Copy link
Contributor

Thanks @frlinw

@SimonSchick
Copy link
Contributor

TY, this should make future development much less confusing!

@SimonSchick
Copy link
Contributor

@sushantdhiman @frlinw you missed hasHooks vs. hasHook 🙂

@madmoizo
Copy link
Contributor Author

madmoizo commented Oct 7, 2018

@SimonSchick it was a request from sushantdhiman #9372 (comment)

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

Successfully merging this pull request may close these issues.

None yet

3 participants