File tree Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Expand file tree Collapse file tree 4 files changed +26
-6
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ node-oracledb Release Notes
7
7
8
8
For deprecated and desupported features, see :ref: `Deprecations and desupported features <deprecations >`.
9
9
10
+ node-oracledb `v6.5.1 <https://github.com/oracle/node-oracledb/compare/v6.5.0...v6.5.1 >`__ (TBD)
11
+ -------------------------------------------------------------------------------------------------------
12
+
13
+ Thin Mode Changes
14
+ +++++++++++++++++
15
+
16
+ #) Fixed exponent check condition for out-of-bounds number.
17
+ See `Issue #1659 <https://github.com/oracle/node-oracledb/issues/1659 >`__.
18
+
10
19
node-oracledb `v6.5.0 <https://github.com/oracle/node-oracledb/compare/v6.4.0...v6.5.0 >`__ (2 May 2024)
11
20
-------------------------------------------------------------------------------------------------------
12
21
Original file line number Diff line number Diff line change @@ -843,8 +843,8 @@ class BaseBuffer {
843
843
}
844
844
845
845
// throw exception if number cannot be represented as an Oracle Number
846
- if ( value . length > constants . NUMBER_MAX_DIGITS || exponent > 126 ||
847
- exponent < - 129 ) {
846
+ if ( value . length > constants . NUMBER_MAX_DIGITS || exponent >= 126 ||
847
+ exponent <= - 131 ) {
848
848
errors . throwErr ( errors . ERR_ORACLE_NUMBER_NO_REPR ) ;
849
849
}
850
850
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const testsUtil = require('./testsUtil.js');
38
38
39
39
describe ( '299. invalidNumber.js' , function ( ) {
40
40
let conn ;
41
- let tableName = 'nodb_num' ;
41
+ const tableName = 'nodb_num' ;
42
42
43
43
before ( async function ( ) {
44
44
conn = await oracledb . getConnection ( dbConfig ) ;
@@ -51,8 +51,8 @@ describe('299. invalidNumber.js', function() {
51
51
await conn . close ( ) ;
52
52
} ) ;
53
53
54
- it ( '299.1 throws error for invalid numbers' , async ( ) => {
55
- const idv = 1e+131 ;
54
+ it ( '299.1 throws error for invalid numbers(largest exponent + 1) ' , async ( ) => {
55
+ const idv = 1e+126 ;
56
56
const sql = 'INSERT INTO nodb_num VALUES(:cid)' ;
57
57
const binds = { cid : { val : idv , type : oracledb . NUMBER } } ;
58
58
await assert . rejects (
@@ -61,4 +61,14 @@ describe('299. invalidNumber.js', function() {
61
61
) ;
62
62
} ) ; // 299.1
63
63
64
+ it ( '299.2 throws error for invalid numbers(smallest exponent - 1)' , async ( ) => {
65
+ const idv = 1e-131 ;
66
+ const sql = 'INSERT INTO nodb_num VALUES(:cid)' ;
67
+ const binds = { cid : { val : idv , type : oracledb . NUMBER } } ;
68
+ await assert . rejects (
69
+ async ( ) => await conn . execute ( sql , binds ) ,
70
+ / N J S - 1 1 5 : /
71
+ ) ;
72
+ } ) ; // 299.2
73
+
64
74
} ) ;
Original file line number Diff line number Diff line change @@ -5832,7 +5832,8 @@ oracledb.OUT_FORMAT_OBJECT and resultSet = true
5832
5832
298.10 no parallel delete operation on vector columns
5833
5833
5834
5834
299. invalidNumber.js
5835
- 299.1 throws error for invalid numbers
5835
+ 299.1 throws error for invalid numbers(largest exponent + 1)
5836
+ 299.2 throws error for invalid numbers(smallest exponent - 1)
5836
5837
5837
5838
300. bigInt.js
5838
5839
300.1 can bind bigInts
You can’t perform that action at this time.
0 commit comments