Skip to content

Commit

Permalink
Replace deprecated bignumber floor function with integerValue calls
Browse files Browse the repository at this point in the history
  • Loading branch information
mblakley authored Sep 25, 2023
1 parent 6bfb79b commit 11ed812
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection/result/column.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ function convertRawTimestampTz(rawColumnValue, column, context)

// extract everything but the lowest 14 bits to get the fractional seconds
valFracSecsBig =
valFracSecsWithTzBig.dividedBy(16384).floor();
valFracSecsWithTzBig.dividedBy(16384).integerValue(BigNumber.ROUND_FLOOR);

// extract the lowest 14 bits to get the timezone
if (valFracSecsWithTzBig.greaterThanOrEqualTo(0))
Expand Down Expand Up @@ -521,7 +521,7 @@ function convertRawTimestampHelper(
// split the value into epoch seconds + nanoseconds; for example,
// 1365148923.123456789 will be split into 1365148923 (epoch seconds)
// and 123456789 (nano seconds)
var valSecBig = epochFracSecsBig.dividedBy(scaleFactor).floor();
var valSecBig = epochFracSecsBig.dividedBy(scaleFactor).integerValue(BigNumber.ROUND_FLOOR);
var fractionsBig = epochFracSecsBig.minus(valSecBig.times(scaleFactor));
var valSecNanoBig = fractionsBig.times(Math.pow(10, 9 - scale));

Expand Down

0 comments on commit 11ed812

Please sign in to comment.