treat bigint as string in msnodesqlv8 driver#1387
Conversation
1fb3a94 to
9f21a3e
Compare
|
Well, interestingly, the tedious driver does not allow strings to be used for bigints and instead they must be set to varchars... |
|
Would there be an argument for using JS's BitInt type instead of a string? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt
|
|
Yep, definitely, but it's more about the underlying drivers than about this library. If they support either strings and/or |
|
Ah that makes sense |
a7527cd to
5c27016
Compare
5c27016 to
e5b3f60
Compare
e5b3f60 to
bd791d4
Compare
So this is the problem we have getting this merged, the tedious driver is the blocker |
bd791d4 to
a8723fb
Compare
|
So tedious introduced using native bigints for the bigint type in v18.2.0, which will be added in the next major release of this lib (imminent) |
02f6c66 to
6808162
Compare
BigInt types will lose precision if they are above the MAX_SAFE_INTEGER value. A work around for this is to use strings to represent the numbers instead.
6808162 to
9541bb8
Compare
|
🎉 This PR is included in version 12.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What this does:
BigInts should be treated as strings to ensure no precision loss
Related issues:
Attempt to fix #1385
Pre/Post merge checklist: