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

Query BIGINT lose precision #2420

Closed
aguegu opened this issue Oct 14, 2014 · 2 comments
Closed

Query BIGINT lose precision #2420

aguegu opened this issue Oct 14, 2014 · 2 comments

Comments

@aguegu
Copy link

aguegu commented Oct 14, 2014

parseInt is applied to parse BIGINT in the code:

https://github.com/sequelize/sequelize/blob/master/lib/dialects/mariadb/query.js#L57

parseInt would not keep the precision of bigint

parseInt('1481101092915232636')
1481101092915232500

It needs additional package like bignum, https://www.npmjs.org/package/bignum , to work

returning a wrong result is even worse than returning the raw string.

@BridgeAR
Copy link
Contributor

This should be fixed since the data types got refactored, right? @mickhansen @janmeier

@mickhansen
Copy link
Contributor

@BridgeAR I doubt it, but it's a driver issue rather than a sequelize issue.

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

No branches or pull requests

3 participants