Skip to content

Commit

Permalink
Parse mysql bigint as js bigint take2
Browse files Browse the repository at this point in the history
  • Loading branch information
Rentacookie committed Oct 16, 2024
1 parent 3d4bc0a commit 7d73ed3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const parseUInt64 = (exports.parseUInt64 = function (parser) {

if (high >>> 21) {
// using bigint here
return bigInt(TWO_TO_POWER_THIRTY_TWO).multiply(high).add(low);
return BigInt(high) * BigInt(TWO_TO_POWER_THIRTY_TWO) + BigInt(low);
}

return high * Math.pow(2, 32) + low;
Expand Down

0 comments on commit 7d73ed3

Please sign in to comment.