diff --git a/lib/shared.js b/lib/shared.js index 16ef7d79..919a042a 100644 --- a/lib/shared.js +++ b/lib/shared.js @@ -57,7 +57,6 @@ const getTypeByValue = function (value) { return TYPES.NVarChar case 'number': - case 'bigint': if (value % 1 === 0) { if (value < -2147483648 || value > 2147483647) { return TYPES.BigInt @@ -67,6 +66,13 @@ const getTypeByValue = function (value) { } else { return TYPES.Float } + + case 'bigint': + if (value < -2147483648n || value > 2147483647n) { + return TYPES.BigInt + } else { + return TYPES.Int + } case 'boolean': for (const item of Array.from(map)) {