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: add support for bigints (backport of #14485) #15413
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can add the test of select-query.test.ts in https://github.com/sequelize/sequelize/blob/v6/test/unit/sql/select.test.js ?
02e4f6a
to
d935880
Compare
Hello @ephys, I've revised CI the failures and implemented the suggestions by @WikiRik. I tried to fix oracle specific issues, since in v7 is not present, from what I could see from stable v6 the data was cast to string before arriving in the run executor, so I applied the same logic from sqlite (stringify bigints). One side note: the ported test from typescript has different values since the sql generated in v6 is slightly different, I've left the original SQL statements to let you decide if they are good values or not. |
I believe the problem comes from this: sequelize/src/dialects/oracle/data-types.js Lines 302 to 304 in 75b473a
It looks like oracle set up their own way of passing bind parameter types around (due to this not being available yet). It's called here: https://github.com/sequelize/sequelize/blob/v6/src/dialects/oracle/query-generator.js#L716 I've pinged them on slack to see if they have an opinion on how to solve this
I saw :) That's perfectly fine, we simply made further changes in v7 that aren't part of v6 |
I think a good way to fix that would be to update sequelize/src/dialects/oracle/query.js Lines 80 to 90 in 75b473a
|
Hi @marra85, Can you try iterating over the out parameter list/map and convert the type from DB_TYPE_NUMBER to DB_TYPE_VARCHAR2 when we pass an int > MAX_SAFE_INTEGER. Let me know if it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, also want to say to @nilabja-bhattacharya for the review help :)
@ephys I'm glad you approved the PR! could you share an ETA for the release containing this fix? PS: about the CI / Postgres 10 (Node 10) (minified aliases) (pull_request) lane I saw that the failure seems to be related to a schema not existing, but I'm not able to reproduce the issue locally, moreover all other PG CI lanes are passing. |
Pretty much as soon as the CI gives the greenlight, the release will be published automatically The CI issue is something we fixed in v7, but fails every now and then in v6. It's just a badly written test, I've just re-run that job :) |
🎉 This PR is included in version 6.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Pull Request Checklist
Description Of Change
this PR backports #14485 to v6 branch with some exceptions regarding original PR changes
paramType
object changedthe other changes have been applied.