oracledb 6.9.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/LICENSE.txt +1 -1
  2. package/NOTICE.txt +1 -1
  3. package/README.md +9 -9
  4. package/build/Release/oracledb-7.0.0-darwin-arm64.node +0 -0
  5. package/build/Release/oracledb-7.0.0-darwin-arm64.node-buildinfo.txt +1 -0
  6. package/build/Release/oracledb-7.0.0-js-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-7.0.0-linux-arm64.node +0 -0
  8. package/build/Release/oracledb-7.0.0-linux-arm64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-7.0.0-linux-x64.node +0 -0
  10. package/build/Release/oracledb-7.0.0-linux-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-7.0.0-win32-x64.node +0 -0
  12. package/build/Release/oracledb-7.0.0-win32-x64.node-buildinfo.txt +1 -0
  13. package/eslint.config.js +39 -0
  14. package/lib/aqDeqOptions.js +18 -1
  15. package/lib/aqQueue.js +10 -6
  16. package/lib/connection.js +418 -39
  17. package/lib/dbObject.js +25 -4
  18. package/lib/endUserSecurityContext.js +176 -0
  19. package/lib/errors.js +99 -8
  20. package/lib/impl/aqDeqOptions.js +10 -1
  21. package/lib/impl/connection.js +76 -2
  22. package/lib/impl/datahandlers/buffer.js +68 -5
  23. package/lib/impl/datahandlers/oson.js +7 -2
  24. package/lib/impl/datahandlers/vector.js +25 -5
  25. package/lib/impl/lob.js +9 -0
  26. package/lib/impl/parserHelpers.js +443 -0
  27. package/lib/impl/resultset.js +1 -1
  28. package/lib/impl/sodaDocument.js +5 -14
  29. package/lib/lob.js +27 -14
  30. package/lib/obfuscation.js +97 -0
  31. package/lib/oracledb.js +163 -49
  32. package/lib/parser.js +204 -0
  33. package/lib/pipeline.js +113 -0
  34. package/lib/pool.js +203 -147
  35. package/lib/poolStatistics.js +1 -1
  36. package/lib/resultset.js +42 -21
  37. package/lib/settings.js +1 -0
  38. package/lib/sodaCollection.js +12 -8
  39. package/lib/sodaDatabase.js +35 -8
  40. package/lib/sodaDocument.js +24 -6
  41. package/lib/sodaOperation.js +7 -6
  42. package/lib/thin/aq.js +475 -0
  43. package/lib/thin/connection.js +518 -54
  44. package/lib/thin/dbObject.js +7 -1
  45. package/lib/thin/lob.js +20 -1
  46. package/lib/thin/pool.js +42 -62
  47. package/lib/thin/protocol/capabilities.js +21 -4
  48. package/lib/thin/protocol/constants.js +143 -2
  49. package/lib/thin/protocol/encryptDecrypt.js +45 -10
  50. package/lib/thin/protocol/messages/aqArray.js +238 -0
  51. package/lib/thin/protocol/messages/aqBase.js +305 -0
  52. package/lib/thin/protocol/messages/aqDeq.js +164 -0
  53. package/lib/thin/protocol/messages/aqEnq.js +135 -0
  54. package/lib/thin/protocol/messages/auth.js +18 -28
  55. package/lib/thin/protocol/messages/base.js +245 -4
  56. package/lib/thin/protocol/messages/dataType.js +8 -3
  57. package/lib/thin/protocol/messages/directPathLoadStream.js +377 -0
  58. package/lib/thin/protocol/messages/directPathOp.js +65 -0
  59. package/lib/thin/protocol/messages/directPathPrepare.js +158 -0
  60. package/lib/thin/protocol/messages/endPipeline.js +56 -0
  61. package/lib/thin/protocol/messages/execute.js +9 -7
  62. package/lib/thin/protocol/messages/index.js +9 -1
  63. package/lib/thin/protocol/messages/protocol.js +2 -2
  64. package/lib/thin/protocol/messages/withData.js +10 -142
  65. package/lib/thin/protocol/packet.js +120 -28
  66. package/lib/thin/protocol/protocol.js +110 -25
  67. package/lib/thin/protocol/utils.js +1 -26
  68. package/lib/thin/resultSet.js +13 -19
  69. package/lib/thin/sqlnet/ezConnectResolver.js +2 -2
  70. package/lib/thin/sqlnet/networkSession.js +63 -41
  71. package/lib/thin/sqlnet/ntTcp.js +24 -0
  72. package/lib/thin/sqlnet/nvStrToNvPair.js +50 -25
  73. package/lib/thin/sqlnet/packet.js +25 -4
  74. package/lib/thin/sqlnet/paramParser.js +10 -7
  75. package/lib/thin/statementCache.js +2 -4
  76. package/lib/traceHandler.js +59 -2
  77. package/lib/transformer.js +8 -3
  78. package/lib/types.js +36 -22
  79. package/lib/util.js +6 -19
  80. package/lib/version.js +3 -3
  81. package/package/install.js +5 -5
  82. package/package/prunebinaries.js +1 -1
  83. package/package.json +1 -1
  84. package/plugins/configProviders/awsCommon.js +125 -0
  85. package/plugins/configProviders/awss3/index.js +138 -0
  86. package/plugins/configProviders/awssecretsmanager/index.js +147 -0
  87. package/plugins/configProviders/azure/index.js +7 -5
  88. package/plugins/token/extensionAzure/index.js +0 -1
  89. package/plugins/token/extensionOci/index.js +0 -1
  90. package/build/Release/oracledb-6.9.0-darwin-arm64.node +0 -0
  91. package/build/Release/oracledb-6.9.0-darwin-arm64.node-buildinfo.txt +0 -1
  92. package/build/Release/oracledb-6.9.0-darwin-x64.node +0 -0
  93. package/build/Release/oracledb-6.9.0-darwin-x64.node-buildinfo.txt +0 -1
  94. package/build/Release/oracledb-6.9.0-js-buildinfo.txt +0 -1
  95. package/build/Release/oracledb-6.9.0-linux-arm64.node +0 -0
  96. package/build/Release/oracledb-6.9.0-linux-arm64.node-buildinfo.txt +0 -1
  97. package/build/Release/oracledb-6.9.0-linux-x64.node +0 -0
  98. package/build/Release/oracledb-6.9.0-linux-x64.node-buildinfo.txt +0 -1
  99. package/build/Release/oracledb-6.9.0-win32-x64.node +0 -0
  100. package/build/Release/oracledb-6.9.0-win32-x64.node-buildinfo.txt +0 -1
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2022, 2025, Oracle and/or its affiliates.
1
+ // Copyright (c) 2022, 2026, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -353,6 +353,7 @@ function MarkerPacket(isLargeSDU) {
353
353
  */
354
354
  this.fromPacket = function(packet, nsi) {
355
355
  this.type = packet.buf.readUInt8(constants.NSPMKTYP);
356
+ let expectedFlag = constants.NIQRMARK;
356
357
 
357
358
  switch (this.type) {
358
359
  case constants.NSPMKTD0:
@@ -361,9 +362,11 @@ function MarkerPacket(isLargeSDU) {
361
362
  case constants.NSPMKTD1:
362
363
  this.data = packet.buf.readUInt8(constants.NSPMKDAT);
363
364
  nsi.isBreak = true;
364
- if (this.data == constants.NIQRMARK) {
365
+ if (nsi.pipelineEnabled) {
366
+ expectedFlag = constants.NIQBMARK;
367
+ }
368
+ if (this.data == expectedFlag) {
365
369
  nsi.isReset = true;
366
- nsi.isBreak = true;
367
370
  }
368
371
  break;
369
372
  default:
@@ -398,10 +401,16 @@ function ControlPacket() {
398
401
  let emfi;
399
402
  let err1;
400
403
  let err2;
404
+ if (packet.buf.length < constants.NSPCTLCMD + 2) {
405
+ errors.throwErr(errors.ERR_INVALID_PACKET);
406
+ }
401
407
 
402
408
  this.cmd = packet.buf.readUInt16BE(constants.NSPCTLCMD);
403
409
  switch (this.cmd) {
404
410
  case constants.NSPCTL_SERR:
411
+ if (packet.buf.length < constants.NSPCTLDAT + 12) {
412
+ errors.throwErr(errors.ERR_INVALID_PACKET);
413
+ }
405
414
  emfi = packet.buf.readUInt32BE(constants.NSPCTLDAT);
406
415
  err1 = packet.buf.readUInt32BE(constants.NSPCTLDAT + 4);
407
416
  err2 = packet.buf.readUInt32BE(constants.NSPCTLDAT + 8);
@@ -411,8 +420,20 @@ function ControlPacket() {
411
420
  } else if (err1 == NSESENDMESG) {
412
421
  this.errno = err1;
413
422
  this.notifLen = err2;
423
+ const copyStart = constants.NSPCTLDAT + 12;
424
+ const payloadAvailable = packet.buf.length - copyStart;
425
+ const maxNotifBytes = this.sAtts && this.sAtts.largeSDU
426
+ ? constants.NSPABSSDULN
427
+ : constants.NSPMXSDULN;
428
+ // Ensure notification length fits in the packet body and negotiated SDU to avoid over-allocation.
429
+ if (err2 < 0 || err2 > payloadAvailable || err2 > maxNotifBytes) {
430
+ errors.throwErr(
431
+ errors.ERR_INVALID_PACKET,
432
+ `Invalid notification length ${err2}`
433
+ );
434
+ }
414
435
  this.notif = Buffer.allocUnsafe(err2 + 1).fill(0);
415
- this.buf.copy(this.notif, 0, constants.NSPCTLDAT + 12, constants.NSPCTLDAT + 12 + err2);
436
+ packet.buf.copy(this.notif, 0, copyStart, copyStart + err2);
416
437
  } else {
417
438
  this.errno = err1;
418
439
  if (emfi == ORA_ERROR_EMFI_NUMBER) {
@@ -99,8 +99,16 @@ class NLParamParser {
99
99
  return tnsFileStruct.aliasht;
100
100
  }
101
101
  tnsFileStruct.readInProgress = true;
102
- await this.start(file_path, 0, tnsFileStruct); //start with 0 depth (tnsnames.ora)
103
- this.tnsnamesHT.set(file_path, tnsFileStruct);
102
+ try {
103
+ await this.start(file_path, 0, tnsFileStruct); // start with 0 depth (tnsnames.ora)
104
+ this.tnsnamesHT.set(file_path, tnsFileStruct);
105
+ } finally {
106
+ tnsFileStruct.readInProgress = false;
107
+ let waiter;
108
+ while ((waiter = tnsFileStruct.waiters.pop())) {
109
+ waiter();
110
+ }
111
+ }
104
112
  return tnsFileStruct.aliasht;
105
113
  }
106
114
 
@@ -156,11 +164,6 @@ class NLParamParser {
156
164
  await this.addNLPListElement(nvElem, depth, tnsFileStruct);
157
165
  nvElem = ""; // clear nvElem buffer after added
158
166
  }
159
- tnsFileStruct.readInProgress = false;
160
- let waiter;
161
- while ((waiter = tnsFileStruct.waiters.pop())) {
162
- waiter();
163
- }
164
167
  }
165
168
  /**
166
169
  * Given a string, this method looks if the '#' character is present.
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2024, Oracle and/or its affiliates.
1
+ // Copyright (c) 2024, 2026, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -105,7 +105,7 @@ class StatementCache {
105
105
  }
106
106
 
107
107
  //---------------------------------------------------------------------------
108
- // get_statement()
108
+ // getStatement()
109
109
  // Get a statement from the statement cache, or prepare a new statement
110
110
  // for use. If a statement is already in use or the statement is not
111
111
  // supposed to be cached, a copy will be made (and not returned to the
@@ -126,14 +126,12 @@ class StatementCache {
126
126
  this._cachedStatements.set(sql, stmt);
127
127
  this._adjustCache();
128
128
  }
129
- this._openCursors.add(stmt);
130
129
  } else if (forceNew || stmt.inUse) {
131
130
  if (!cacheStatement) {
132
131
  this._addCursorToClose(stmt);
133
132
  this._cachedStatements.delete(sql);
134
133
  }
135
134
  stmt = stmt._copy();
136
- this._openCursors.add(stmt);
137
135
  } else if (!cacheStatement) {
138
136
  this._cachedStatements.delete(sql);
139
137
  stmt.returnToCache = false;
@@ -27,17 +27,20 @@
27
27
  'use strict';
28
28
 
29
29
  /**
30
- * TraceHandler interface defination which application needs to implement
30
+ * TraceHandler interface definition which application needs to implement
31
31
  * the hooks defined. The hooks will be called by the driver with traceContext
32
32
  * data.
33
33
  *
34
34
  * TraceContext Data details.
35
35
  * connectLevelConfig - Connection Config details.
36
- * protcol - tcp/tcps protocol.
36
+ * protocol - tcp/tcps protocol.
37
37
  * user - user/schema associated.
38
+ * dbName - Database Name.
38
39
  * instanceName - instance Name.
39
40
  * pdbName - PDB name.
41
+ * domainName - Domain name.
40
42
  * serviceName - service name.
43
+ * dbUniqueName - Database unique name.
41
44
  * connectString - connect string passed.
42
45
  * hostName - host name.
43
46
  * port - port number.
@@ -100,6 +103,60 @@ class TraceHandlerBase {
100
103
  onEndRoundTrip(/*traceContext*/) {
101
104
  }
102
105
 
106
+ /**
107
+ * Called when the pool expands by creating new connections.
108
+ * Useful for tracking pool growth or initialization activity.
109
+ */
110
+ onPoolExpand(/*pool*/) {}
111
+
112
+ /**
113
+ * Called when the pool shrinks and a connection is removed,
114
+ * such as during timeouts or pool resizing. Useful for
115
+ * monitoring resource cleanup or shrink events.
116
+ */
117
+ onPoolShrink(/*pool*/) {}
118
+
119
+ /**
120
+ * Called when a connection is successfully acquired from the pool.
121
+ * Useful for tracking active usage or checkout activity.
122
+ */
123
+ onPoolAcquire(/*pool*/) {}
124
+
125
+ /**
126
+ * Called when a connection is released back to the pool.
127
+ * Useful for monitoring returned or idle connections.
128
+ */
129
+ onPoolRelease(/*pool*/) {}
130
+
131
+ /**
132
+ * Called when a connection request is queued because the pool
133
+ * cannot grow further. Useful for monitoring queued requests.
134
+ */
135
+ onPoolWait(/*pool*/) {}
136
+
137
+ /**
138
+ * Called when a queued connection request times out before it
139
+ * can be served. Useful for tracking request timeouts or failures.
140
+ */
141
+ onPoolRequestTimeout(/*pool*/) {}
142
+
143
+ /**
144
+ * Called when a requested connection is obtained from the pool's
145
+ * free list (cache hit). Useful for analyzing connection reuse.
146
+ */
147
+ onPoolConnectionHit(/*pool*/) {}
148
+
149
+ /**
150
+ * Called when a connection request requires creating a new
151
+ * connection (cache miss). Useful for monitoring connection creation.
152
+ */
153
+ onPoolConnectionMiss(/*pool*/) {}
154
+
155
+ /**
156
+ * Called when the pool is closed. Useful for tracking shutdown
157
+ * events or resetting counters.
158
+ */
159
+ onPoolClose(/*pool*/) {}
103
160
  }
104
161
 
105
162
  // singleton object pointing to traceHandler instance.
@@ -158,9 +158,13 @@ function transformValueIn(info, value, options) {
158
158
  types.DB_TYPE_CHAR,
159
159
  types.DB_TYPE_NCHAR,
160
160
  types.DB_TYPE_CLOB,
161
- types.DB_TYPE_NCLOB);
161
+ types.DB_TYPE_NCLOB,
162
+ types.DB_TYPE_LONG,
163
+ types.DB_TYPE_LONG_NVARCHAR);
162
164
  if (info.type !== types.DB_TYPE_CLOB &&
163
- info.type !== types.DB_TYPE_NCLOB) {
165
+ info.type !== types.DB_TYPE_NCLOB &&
166
+ info.type !== types.DB_TYPE_LONG &&
167
+ info.type !== types.DB_TYPE_LONG_NVARCHAR) {
164
168
  const valueLen = Buffer.byteLength(value);
165
169
  if (info.maxSize === undefined || valueLen > info.maxSize) {
166
170
  if (info.checkSize) {
@@ -212,7 +216,8 @@ function transformValueIn(info, value, options) {
212
216
  } else if (Buffer.isBuffer(value)) {
213
217
  checkType(info, options,
214
218
  types.DB_TYPE_RAW,
215
- types.DB_TYPE_BLOB);
219
+ types.DB_TYPE_BLOB,
220
+ types.DB_TYPE_LONG_RAW);
216
221
  if (info.type === types.DB_TYPE_RAW &&
217
222
  (info.maxSize === undefined || value.length > info.maxSize)) {
218
223
  if (info.checkSize) {
package/lib/types.js CHANGED
@@ -45,9 +45,15 @@ class DbType {
45
45
  this._bufferSizeFactor = options.bufferSizeFactor || 0;
46
46
  this._oraTypeNum = options.oraTypeNum || 0;
47
47
  this._csfrm = options.csfrm || 0;
48
+ this._is_fast = options.is_fast || true;
48
49
  dbTypeByNum.set(num, this);
49
- const key = (options.csfrm || 0) * 256 + options.oraTypeNum;
50
+ const key = this._csfrm * 256 + this._oraTypeNum;
50
51
  dbTypeByOraTypeNum.set(key, this);
52
+ // add a second key for LONG metadata which doesn't always contain the
53
+ // character set form value in metadata received by the database
54
+ if (this._oraTypeNum === 8 && this._csfrm === constants.CSFRM_IMPLICIT) {
55
+ dbTypeByOraTypeNum.set(this._oraTypeNum, this);
56
+ }
51
57
  dbTypeByColumnTypeName.set(columnTypeName, this);
52
58
  }
53
59
 
@@ -113,7 +119,7 @@ function getTypeByOraTypeNum(oraTypeNum, csfrm) {
113
119
 
114
120
  const DB_TYPE_BFILE = new DbType(2020,
115
121
  "DB_TYPE_BFILE", "BFILE",
116
- { oraTypeNum: 114, bufferSizeFactor: 4000 });
122
+ { oraTypeNum: 114, bufferSizeFactor: 4000, is_fast: false });
117
123
  const DB_TYPE_BINARY_DOUBLE = new DbType(2008,
118
124
  "DB_TYPE_BINARY_DOUBLE", "BINARY_DOUBLE",
119
125
  { oraTypeNum: 101, bufferSizeFactor: 8 });
@@ -125,7 +131,7 @@ const DB_TYPE_BINARY_INTEGER = new DbType(2009,
125
131
  { oraTypeNum: 3, bufferSizeFactor: 22 });
126
132
  const DB_TYPE_BLOB = new DbType(2019,
127
133
  "DB_TYPE_BLOB", "BLOB",
128
- { oraTypeNum: 113, bufferSizeFactor: 112 });
134
+ { oraTypeNum: 113, bufferSizeFactor: 112, is_fast: false });
129
135
  const DB_TYPE_BOOLEAN = new DbType(2022,
130
136
  "DB_TYPE_BOOLEAN", "BOOLEAN",
131
137
  { oraTypeNum: 252, bufferSizeFactor: 4 });
@@ -134,10 +140,11 @@ const DB_TYPE_CHAR = new DbType(2003,
134
140
  { oraTypeNum: 96, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 4 });
135
141
  const DB_TYPE_CLOB = new DbType(2017,
136
142
  "DB_TYPE_CLOB", "CLOB",
137
- { oraTypeNum: 112, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 112 });
143
+ { oraTypeNum: 112, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 112,
144
+ is_fast: false });
138
145
  const DB_TYPE_CURSOR = new DbType(2021,
139
146
  "DB_TYPE_CURSOR", "CURSOR",
140
- { oraTypeNum: 102, bufferSizeFactor: 4 });
147
+ { oraTypeNum: 102, bufferSizeFactor: 4, is_fast: false });
141
148
  const DB_TYPE_DATE = new DbType(2011,
142
149
  "DB_TYPE_DATE", "DATE",
143
150
  { oraTypeNum: 12, bufferSizeFactor: 7 });
@@ -149,24 +156,25 @@ const DB_TYPE_INTERVAL_YM = new DbType(2016,
149
156
  { oraTypeNum: 182, bufferSizeFactor: 5 });
150
157
  const DB_TYPE_JSON = new DbType(2027,
151
158
  "DB_TYPE_JSON", "JSON",
152
- { oraTypeNum: 119 });
159
+ { oraTypeNum: 119, is_fast: false });
153
160
  const DB_TYPE_LONG = new DbType(2024,
154
161
  "DB_TYPE_LONG", "LONG",
155
162
  { oraTypeNum: 8, csfrm: constants.CSFRM_IMPLICIT,
156
- bufferSizeFactor: 2 ** 31 - 1 });
163
+ bufferSizeFactor: 2 ** 31 - 1, is_fast: false });
157
164
  const DB_TYPE_LONG_NVARCHAR = new DbType(2031,
158
165
  "DB_TYPE_LONG_NVARCHAR", "LONG",
159
166
  { oraTypeNum: 8, csfrm: constants.CSFRM_NCHAR,
160
- bufferSizeFactor: 2 ** 31 - 1 });
167
+ bufferSizeFactor: 2 ** 31 - 1, is_fast: false });
161
168
  const DB_TYPE_LONG_RAW = new DbType(2025,
162
169
  "DB_TYPE_LONG_RAW", "LONG RAW",
163
- { oraTypeNum: 24, bufferSizeFactor: 2 ** 31 - 1 });
170
+ { oraTypeNum: 24, bufferSizeFactor: 2 ** 31 - 1, is_fast: false });
164
171
  const DB_TYPE_NCHAR = new DbType(2004,
165
172
  "DB_TYPE_NCHAR", "NCHAR",
166
173
  { oraTypeNum: 96, csfrm: constants.CSFRM_NCHAR, bufferSizeFactor: 4 });
167
174
  const DB_TYPE_NCLOB = new DbType(2018,
168
175
  "DB_TYPE_NCLOB", "NCLOB",
169
- { oraTypeNum: 112, csfrm: constants.CSFRM_NCHAR, bufferSizeFactor: 112 });
176
+ { oraTypeNum: 112, csfrm: constants.CSFRM_NCHAR, bufferSizeFactor: 112,
177
+ is_fast: false });
170
178
  const DB_TYPE_NUMBER = new DbType(2010,
171
179
  "DB_TYPE_NUMBER", "NUMBER",
172
180
  { oraTypeNum: 2, bufferSizeFactor: 22 });
@@ -181,7 +189,7 @@ const DB_TYPE_RAW = new DbType(2006,
181
189
  { oraTypeNum: 23, bufferSizeFactor: 1 });
182
190
  const DB_TYPE_ROWID = new DbType(2005,
183
191
  "DB_TYPE_ROWID", "ROWID",
184
- { oraTypeNum: 11, bufferSizeFactor: 18 });
192
+ { oraTypeNum: 11, bufferSizeFactor: 18, is_fast: false });
185
193
  const DB_TYPE_TIMESTAMP = new DbType(2012,
186
194
  "DB_TYPE_TIMESTAMP", "TIMESTAMP",
187
195
  { oraTypeNum: 180, bufferSizeFactor: 11 });
@@ -190,19 +198,20 @@ const DB_TYPE_TIMESTAMP_LTZ = new DbType(2014,
190
198
  { oraTypeNum: 231, bufferSizeFactor: 11 });
191
199
  const DB_TYPE_TIMESTAMP_TZ = new DbType(2013,
192
200
  "DB_TYPE_TIMESTAMP_TZ", "TIMESTAMP WITH TIME ZONE",
193
- { oraTypeNum: 181, bufferSizeFactor: 13 });
201
+ { oraTypeNum: 181, bufferSizeFactor: 13, is_fast: false });
194
202
  const DB_TYPE_UROWID = new DbType(2030,
195
203
  "DB_TYPE_UROWID", "UROWID",
196
- { oraTypeNum: 208 });
204
+ { oraTypeNum: 208, is_fast: false });
197
205
  const DB_TYPE_VARCHAR = new DbType(2001,
198
206
  "DB_TYPE_VARCHAR", "VARCHAR2",
199
207
  { oraTypeNum: 1, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 4 });
200
208
  const DB_TYPE_XMLTYPE = new DbType(2032,
201
209
  "DB_TYPE_XMLTYPE", "XMLTYPE",
202
- { oraTypeNum: 109, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 2147483647 });
210
+ { oraTypeNum: 109, csfrm: constants.CSFRM_IMPLICIT,
211
+ bufferSizeFactor: 2147483647, is_fast: false });
203
212
  const DB_TYPE_VECTOR = new DbType(2033,
204
213
  "DB_TYPE_VECTOR", "VECTOR",
205
- { oraTypeNum: 127 });
214
+ { oraTypeNum: 127, is_fast: false });
206
215
 
207
216
  // database type conversion map: the top level key refers to the database
208
217
  // type being fetched and the value is another map; this map's key is the
@@ -451,7 +460,7 @@ class SparseVector {
451
460
  try {
452
461
  // use simple tokenizer?
453
462
  data = JSON.parse(str);
454
- } catch (e) {
463
+ } catch {
455
464
  errors.throwErr(errors.ERR_VECTOR_SPARSE_INVALID_JSON);
456
465
  }
457
466
 
@@ -525,8 +534,9 @@ class IntervalYM {
525
534
  errors.assertParamPropInt(obj, 1, "years");
526
535
  errors.assertParamPropInt(obj, 1, "months");
527
536
  }
528
- this.years = obj?.years || 0;
529
- this.months = obj?.months || 0;
537
+ // Normalize the months and years
538
+ this.months = (obj?.months || 0) % 12;
539
+ this.years = (obj?.years || 0) + Math.trunc((obj?.months || 0) / 12);
530
540
  }
531
541
  }
532
542
 
@@ -540,11 +550,15 @@ class IntervalDS {
540
550
  errors.assertParamPropInt(obj, 1, "seconds");
541
551
  errors.assertParamPropInt(obj, 1, "fseconds");
542
552
  }
543
- this.days = obj?.days || 0;
544
- this.hours = obj?.hours || 0;
545
- this.minutes = obj?.minutes || 0;
546
- this.seconds = obj?.seconds || 0;
553
+ // Normalize the time units
547
554
  this.fseconds = obj?.fseconds || 0;
555
+ this.seconds = (obj?.seconds || 0) % 60;
556
+ const totalMinutes = (obj?.minutes || 0) +
557
+ Math.trunc((obj?.seconds || 0) / 60);
558
+ this.minutes = totalMinutes % 60;
559
+ const totalHours = (obj?.hours || 0) + Math.trunc(totalMinutes / 60);
560
+ this.hours = totalHours % 24;
561
+ this.days = (obj?.days || 0) + Math.trunc(totalHours / 24);
548
562
  }
549
563
  }
550
564
 
package/lib/util.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2016, 2025, Oracle and/or its affiliates.
1
+ // Copyright (c) 2016, 2026, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -67,7 +67,7 @@ const validNetworkCharacterSet = new Set(['A', 'B', 'C', 'D', 'E', 'F', 'G',
67
67
  let packageJSON;
68
68
  try {
69
69
  packageJSON = require('../package.json');
70
- } catch (err) {
70
+ } catch {
71
71
  errors.throwErr(errors.ERR_MISSING_FILE, 'package.json');
72
72
  }
73
73
  const PACKAGE_JSON_VERSION = packageJSON.version;
@@ -386,7 +386,7 @@ function isPrivilege(value) {
386
386
  }
387
387
 
388
388
  function isShardingKey(value) {
389
- if (!Array.isArray(value))
389
+ if (!Array.isArray(value) || value.length > 255)
390
390
  return false;
391
391
  for (let i = 0; i < value.length; i++) {
392
392
  const element = value[i];
@@ -414,10 +414,6 @@ function isAppContext(value) {
414
414
  return true;
415
415
  }
416
416
 
417
- function isSodaDocument(value) {
418
- return (value != null && value._sodaDocumentMarker);
419
- }
420
-
421
417
  function isXid(value) {
422
418
  return (isObject(value) && Number.isInteger(value.formatId) &&
423
419
  (Buffer.isBuffer(value.globalTransactionId) ||
@@ -477,20 +473,13 @@ function normalizeTransactionId(value) {
477
473
  normalizedTransactionId = crypto.randomUUID();
478
474
  if (typeof normalizedTransactionId === 'string') {
479
475
  normalizedTransactionId = Buffer.from(normalizedTransactionId);
480
- const len = normalizedTransactionId.length;
481
- if ((len === 0) || (len > 64))
482
- errors.throwErr(errors.ERR_INVALID_TRANSACTION_SIZE, len);
483
476
  }
477
+ const len = normalizedTransactionId.length;
478
+ if ((len === 0) || (len > 64))
479
+ errors.throwErr(errors.ERR_INVALID_TRANSACTION_SIZE, len);
484
480
  return normalizedTransactionId;
485
481
  }
486
482
 
487
- function verifySodaDoc(content) {
488
- if (isSodaDocument(content))
489
- return content._impl;
490
- errors.assertParamValue(isObject(content), 1);
491
- return Buffer.from(JSON.stringify(content));
492
- }
493
-
494
483
  function isTokenExpired(token) {
495
484
  errors.assert(typeof token === 'string', errors.ERR_TOKEN_BASED_AUTH);
496
485
  if (token.split('.')[1] === undefined) {
@@ -644,7 +633,6 @@ module.exports = {
644
633
  isPrivilege,
645
634
  isShardingKey,
646
635
  isAppContext,
647
- isSodaDocument,
648
636
  isTokenExpired,
649
637
  isTokenValid,
650
638
  isTransactionId,
@@ -654,7 +642,6 @@ module.exports = {
654
642
  normalizeXid,
655
643
  makeDate,
656
644
  sanitize,
657
- verifySodaDoc,
658
645
  wrapFn,
659
646
  wrapFns,
660
647
  isPemFile
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2023, 2025, Oracle and/or its affiliates.
1
+ // Copyright (c) 2023, 2026, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -29,8 +29,8 @@
29
29
  // Leave the suffix an empty string for production releases.
30
30
 
31
31
  module.exports = {
32
- VERSION_MAJOR: 6,
33
- VERSION_MINOR: 9,
32
+ VERSION_MAJOR: 7,
33
+ VERSION_MINOR: 0,
34
34
  VERSION_PATCH: 0,
35
35
  VERSION_SUFFIX: ''
36
36
  };
@@ -1,4 +1,4 @@
1
- /* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
1
+ /* Copyright (c) 2017, 2025, Oracle and/or its affiliates. */
2
2
 
3
3
  /******************************************************************************
4
4
  *
@@ -48,21 +48,21 @@ let arch;
48
48
  let thickModeErrMsg;
49
49
 
50
50
  // Log standard output with an 'oracledb' prefix
51
- function log(message) { // eslint-disable-line
51
+ function log() {
52
52
  const args = Array.from(arguments);
53
53
  args.unshift('oracledb');
54
54
  console.log.apply(console, args);
55
55
  }
56
56
 
57
57
  // Log errors. It combines 'oracledb' with a stylized 'ERR' prefix
58
- function error(message) { // eslint-disable-line
58
+ function error() {
59
59
  const args = Array.from(arguments);
60
60
  args.unshift('oracledb \x1b[31mERR!\x1b[0m');
61
61
  console.error.apply(console, args);
62
62
  }
63
63
 
64
64
  // Log warnings. It combines 'oracledb' with a stylized 'WARN' prefix
65
- function warn(message) { // eslint-disable-line
65
+ function warn() {
66
66
  const args = Array.from(arguments);
67
67
  args.unshift('oracledb \x1b[31mWARN!\x1b[0m');
68
68
  console.error.apply(console, args);
@@ -85,7 +85,7 @@ function checkVersion() {
85
85
  function checkThickMode() {
86
86
  try {
87
87
  fs.statSync(nodbUtil.RELEASE_DIR + '/' + nodbUtil.BINARY_FILE);
88
- } catch (err) {
88
+ } catch {
89
89
  errors.throwErr(errors.ERR_NO_BINARY_AVAILABLE, process.platform + ' ' + process.arch);
90
90
  }
91
91
  }
@@ -86,7 +86,7 @@ function removeFileorDir(fileOrDirPath) {
86
86
  // Remove the file or the symlink synchronously
87
87
  fs.unlinkSync(fileOrDirPath);
88
88
  }
89
- } catch (err) {
89
+ } catch {
90
90
  throw new Error('Invalid File or Directory: ' + `'${fileOrDirPath}'`);
91
91
  }
92
92
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oracledb",
3
- "version": "6.9.0",
3
+ "version": "7.0.0",
4
4
  "description": "A Node.js module for Oracle Database access from JavaScript and TypeScript",
5
5
  "license": "(Apache-2.0 OR UPL-1.0)",
6
6
  "homepage": "http://oracle.github.io/node-oracledb/",
@@ -0,0 +1,125 @@
1
+ // Copyright (c) 2026, Oracle and/or its affiliates.
2
+ //-----------------------------------------------------------------------------
3
+ //
4
+ // This software is dual-licensed to you under the Universal Permissive License
5
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
6
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
7
+ // either license.
8
+ //
9
+ // If you elect to accept the software under the Apache License, Version 2.0,
10
+ // the following applies:
11
+ //
12
+ // Licensed under the Apache License, Version 2.0 (the "License");
13
+ // you may not use this file except in compliance with the License.
14
+ // You may obtain a copy of the License at
15
+ //
16
+ // https://www.apache.org/licenses/LICENSE-2.0
17
+ //
18
+ // Unless required by applicable law or agreed to in writing, software
19
+ // distributed under the License is distributed on an "AS IS" BASIS,
20
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ // See the License for the specific language governing permissions and
22
+ // limitations under the License.
23
+ //
24
+ //-----------------------------------------------------------------------------
25
+
26
+ "use strict";
27
+
28
+
29
+ let fromNodeProviderChain;
30
+ let loadSharedConfigFiles;
31
+ let NodeHttpHandler;
32
+ let HttpsProxyAgent;
33
+
34
+ function initAwsCommon() {
35
+ if (fromNodeProviderChain) {
36
+ return;
37
+ }
38
+
39
+ ({ fromNodeProviderChain } = require("@aws-sdk/credential-providers"));
40
+ ({ loadSharedConfigFiles } = require("@smithy/shared-ini-file-loader"));
41
+ ({ NodeHttpHandler } = require("@smithy/node-http-handler"));
42
+ ({ HttpsProxyAgent } = require("hpagent"));
43
+ }
44
+
45
+ function resolveProxy(paramMap) {
46
+ const proxyHost = paramMap.get("https_proxy") ||
47
+ process.env.HTTPS_PROXY ||
48
+ process.env.https_proxy;
49
+
50
+ const proxyPort = paramMap.get("https_proxy_port") ||
51
+ process.env.HTTPS_PROXY_PORT ||
52
+ process.env.https_proxy_port;
53
+
54
+ if (!proxyHost) {
55
+ return null;
56
+ }
57
+
58
+ const proxy = /^[a-z][a-z0-9+.-]*:\/\//i.test(proxyHost) ?
59
+ proxyHost :
60
+ `http://${proxyHost}`;
61
+
62
+ if (!proxyPort) {
63
+ return proxy;
64
+ }
65
+
66
+ const proxyUrl = new URL(proxy);
67
+ if (!proxyUrl.port) {
68
+ proxyUrl.port = proxyPort;
69
+ }
70
+
71
+ return proxyUrl.toString().replace(/\/$/, "");
72
+ }
73
+
74
+ function initAwsRequestHandler(paramMap) {
75
+ const proxy = resolveProxy(paramMap);
76
+
77
+ if (proxy) {
78
+ const agent = new HttpsProxyAgent({ proxy });
79
+ return new NodeHttpHandler({
80
+ httpAgent: agent,
81
+ httpsAgent: agent,
82
+ });
83
+ }
84
+
85
+ return new NodeHttpHandler();
86
+ }
87
+
88
+ async function resolveRegion(paramMap) {
89
+ if (paramMap.get("aws_region")) return paramMap.get("aws_region");
90
+ if (process.env.AWS_REGION) return process.env.AWS_REGION;
91
+ let region = null;
92
+ try {
93
+ const { configFile, credentialsFile } = await loadSharedConfigFiles();
94
+ const profile = paramMap.get("aws_profile") || process.env.AWS_PROFILE || "default";
95
+ region = configFile[profile]?.region || credentialsFile[profile]?.region;
96
+
97
+ if (!region) {
98
+ throw new Error(`Region not found in AWS config/credentials for profile: ${profile}`);
99
+ }
100
+
101
+ return region;
102
+ } catch (err) {
103
+ throw new Error(
104
+ `AWS Region Resolution Failed: ${err.message}. Ensure AWS_REGION is set or ~/.aws/config is accessible.`
105
+ );
106
+ }
107
+ }
108
+
109
+ function createAwsCredential(paramMap, requestHandler, region) {
110
+ return fromNodeProviderChain({
111
+ profile: paramMap.get("aws_profile") || process.env.AWS_PROFILE || "default",
112
+ clientConfig: {
113
+ requestHandler,
114
+ region
115
+ }
116
+ });
117
+ }
118
+
119
+ module.exports = {
120
+ createAwsCredential,
121
+ initAwsCommon,
122
+ initAwsRequestHandler,
123
+ resolveProxy,
124
+ resolveRegion,
125
+ };