You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/connection-options.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,14 +61,18 @@ Integers in JavaScript use IEEE-754 representation. This means that Node.js can
61
61
62
62
This means that when the value set on a column is not in the [safe](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isSafeInteger) range, the default implementation receives an inexact representation of the number.
63
63
64
-
The Connector provides two options to address this issue.
64
+
The Connector provides 3 options to address this issue.
65
65
66
66
|option|description|type|default|
67
67
|---:|---|:---:|:---:|
68
68
|**bigNumberStrings**| When an integer is not in the safe range, the Connector interprets the value as a string. |*boolean*|false|
69
69
|**supportBigNumbers**| When an integer is not in the safe range, the Connector interprets the value as a [Long](https://www.npmjs.com/package/long) object. |*boolean*|false|
70
+
|**supportBigInt**| Whether resultset should return javascript ES2020 [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) for [BIGINT](https://mariadb.com/kb/en/bigint/) data type. This ensures having expected value even for value > 2^53 (see [safe](#big-integer-support) range). |*boolean*| false |
70
71
71
72
73
+
Native `supportBigInt` implementation is recommended over `supportBigNumbers` (remains for compability with older version). `supportBigInt` is not enabled by default for compatibilty to avoid major regression.
74
+
It will be in a future 3.x version.
75
+
72
76
## SSL
73
77
74
78
The Connector can encrypt data during transfer using the Transport Layer Security (TLS) protocol. TLS/SSL allows for transfer encryption, and can optionally use identity validation for the server and client.
@@ -361,7 +365,7 @@ mariadb.createConnection({
361
365
|**rsaPublicKey**| Indicate path/content to MySQL server RSA public key. use requires Node.js v11.6+ |*string*||
362
366
|**cachingRsaPublicKey**| Indicate path/content to MySQL server caching RSA public key. use requires Node.js v11.6+ |*string*||
363
367
|**allowPublicKeyRetrieval**| Indicate that if `rsaPublicKey` or `cachingRsaPublicKey` public key are not provided, if client can ask server to send public key. |*boolean*| false |
364
-
|**supportBigInt**| Whether resultset should return javascript ES2020 [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) for [BIGINT](https://mariadb.com/kb/en/bigint/) data type. This ensures having expected value even for value > 2^53 (see [safe](documentation/connection-options.md#support-for-big-integer) range). |*boolean*| false |
368
+
|**supportBigInt**| Whether resultset should return javascript ES2020 [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt) for [BIGINT](https://mariadb.com/kb/en/bigint/) data type. This ensures having expected value even for value > 2^53 (see [safe](#big-integer-support) range). |*boolean*| false |
@@ -596,7 +604,8 @@ Whether you want the Connector to retrieve date values as strings, rather than `
596
604
597
605
*boolean, default: false*
598
606
599
-
Whether the query should return integers as [`Long`](https://www.npmjs.com/package/long) objects when they are not in the [safe](documentation/connection-options.md#support-for-big-integer) range.
607
+
Whether the query should return integers as [`Long`](https://www.npmjs.com/package/long) objects when they are not in
608
+
the [safe](/documentation/connection-options.md#big-integer-support) range.
600
609
601
610
602
611
#### `supportBigInt`
@@ -605,7 +614,7 @@ Whether the query should return integers as [`Long`](https://www.npmjs.com/packa
605
614
606
615
Whether the query should return javascript ES2020 [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt)
607
616
for [BIGINT](https://mariadb.com/kb/en/bigint/) data type.
608
-
This ensures having expected value even for value > 2^53 (> 9007199254740991) (see [safe](documentation/connection-options.md#support-for-big-integer) range).
617
+
This ensures having expected value even for value > 2^53 (see [safe](/documentation/connection-options.md#big-integer-support) range).
609
618
This option can be set to query level, supplanting connection option `supportBigInt` value.
Whether the query should return integers as strings when they are not in the [safe](documentation/connection-options.md#support-for-big-integer) range.
634
+
Whether the query should return integers as strings when they are not in the [safe](documentation/connection-options.md#big-integer-support) range.
0 commit comments