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

Added a 'random()' method for dealing with differences between dialects for random #8847

Merged
merged 13 commits into from Jan 10, 2018

Conversation

2 participants
@mccabemj
Contributor

mccabemj commented Jan 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

Added a 'random()' method for dealing with differences between dialects for random. Sqlite and postresql use RANDOM, where MSSQL and MYSQL use RAND. As per issue #8841

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Jan 5, 2018

Codecov Report

Merging #8847 into master will increase coverage by 0.02%.
The diff coverage is 100%.

codecov bot commented Jan 5, 2018

Codecov Report

Merging #8847 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@sushantdhiman

A useful abstraction so approved. A test like

suite('fn', () => {
should be added as well

@mccabemj

This comment has been minimized.

Show comment
Hide comment
@mccabemj

mccabemj Jan 10, 2018

Contributor

I have added a test, but put it in the order.test as it is related to ordering. Simply checking the outputted SQL based on the different dialects

Contributor

mccabemj commented Jan 10, 2018

I have added a test, but put it in the order.test as it is related to ordering. Simply checking the outputted SQL based on the different dialects

@sushantdhiman sushantdhiman merged commit 6f32643 into sequelize:master Jan 10, 2018

4 checks passed

codecov/patch 100% of diff hit (target 95.84%)
Details
codecov/project 95.86% (+0.02%) compared to 11ff776
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment