oracledb 6.9.0 → 6.10.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 (57) hide show
  1. package/README.md +2 -2
  2. package/build/Release/oracledb-6.10.0-darwin-arm64.node +0 -0
  3. package/build/Release/oracledb-6.10.0-darwin-arm64.node-buildinfo.txt +1 -0
  4. package/build/Release/oracledb-6.10.0-darwin-x64.node +0 -0
  5. package/build/Release/oracledb-6.10.0-darwin-x64.node-buildinfo.txt +1 -0
  6. package/build/Release/oracledb-6.10.0-js-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-6.10.0-linux-arm64.node +0 -0
  8. package/build/Release/oracledb-6.10.0-linux-arm64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-6.10.0-linux-x64.node +0 -0
  10. package/build/Release/oracledb-6.10.0-linux-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-6.10.0-win32-x64.node +0 -0
  12. package/build/Release/oracledb-6.10.0-win32-x64.node-buildinfo.txt +1 -0
  13. package/lib/aqDeqOptions.js +18 -1
  14. package/lib/aqQueue.js +10 -6
  15. package/lib/connection.js +6 -2
  16. package/lib/dbObject.js +25 -4
  17. package/lib/errors.js +14 -4
  18. package/lib/impl/aqDeqOptions.js +10 -1
  19. package/lib/impl/datahandlers/buffer.js +49 -0
  20. package/lib/impl/datahandlers/oson.js +7 -2
  21. package/lib/impl/sodaDocument.js +5 -14
  22. package/lib/oracledb.js +23 -14
  23. package/lib/pool.js +187 -146
  24. package/lib/poolStatistics.js +1 -1
  25. package/lib/sodaCollection.js +12 -8
  26. package/lib/sodaDatabase.js +35 -8
  27. package/lib/sodaDocument.js +24 -6
  28. package/lib/sodaOperation.js +7 -6
  29. package/lib/thin/aq.js +475 -0
  30. package/lib/thin/connection.js +54 -4
  31. package/lib/thin/protocol/capabilities.js +3 -1
  32. package/lib/thin/protocol/constants.js +61 -0
  33. package/lib/thin/protocol/encryptDecrypt.js +2 -2
  34. package/lib/thin/protocol/messages/aqArray.js +238 -0
  35. package/lib/thin/protocol/messages/aqBase.js +305 -0
  36. package/lib/thin/protocol/messages/aqDeq.js +164 -0
  37. package/lib/thin/protocol/messages/aqEnq.js +135 -0
  38. package/lib/thin/protocol/messages/auth.js +12 -27
  39. package/lib/thin/protocol/messages/withData.js +3 -3
  40. package/lib/thin/protocol/packet.js +6 -5
  41. package/lib/thin/sqlnet/networkSession.js +1 -1
  42. package/lib/types.js +6 -6
  43. package/lib/util.js +0 -13
  44. package/lib/version.js +1 -1
  45. package/package.json +1 -1
  46. package/plugins/configProviders/azure/index.js +3 -0
  47. package/build/Release/oracledb-6.9.0-darwin-arm64.node +0 -0
  48. package/build/Release/oracledb-6.9.0-darwin-arm64.node-buildinfo.txt +0 -1
  49. package/build/Release/oracledb-6.9.0-darwin-x64.node +0 -0
  50. package/build/Release/oracledb-6.9.0-darwin-x64.node-buildinfo.txt +0 -1
  51. package/build/Release/oracledb-6.9.0-js-buildinfo.txt +0 -1
  52. package/build/Release/oracledb-6.9.0-linux-arm64.node +0 -0
  53. package/build/Release/oracledb-6.9.0-linux-arm64.node-buildinfo.txt +0 -1
  54. package/build/Release/oracledb-6.9.0-linux-x64.node +0 -0
  55. package/build/Release/oracledb-6.9.0-linux-x64.node-buildinfo.txt +0 -1
  56. package/build/Release/oracledb-6.9.0-win32-x64.node +0 -0
  57. package/build/Release/oracledb-6.9.0-win32-x64.node-buildinfo.txt +0 -1
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # node-oracledb version 6.9.0 <img src="https://img.shields.io/npm/v/oracledb.svg" alt="oracledb"/> <img src="https://img.shields.io/npm/dm/oracledb.svg" alt="oracledb"/>
1
+ # node-oracledb version 6.10.0 <img src="https://img.shields.io/npm/v/oracledb.svg" alt="oracledb"/> <img src="https://img.shields.io/npm/dm/oracledb.svg" alt="oracledb"/>
2
2
 
3
3
  The node-oracledb add-on for Node.js powers high performance Oracle Database
4
4
  applications. Applications can be written in TypeScript, or directly in
5
5
  JavaScript.
6
6
 
7
- Use node-oracledb 6.9.0 to connect Node.js 14.17, or later, to Oracle
7
+ Use node-oracledb 6.10.0 to connect Node.js 14.17, or later, to Oracle
8
8
  Database. Older versions of node-oracledb may work with older versions of
9
9
  Node.js.
10
10
 
@@ -0,0 +1 @@
1
+ oracledb-6.10.0-darwin-arm64.node v22.17.1 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d 8b14d5980d7d6116abb8865c7baed9e458698dbf Thu, 09 Oct 2025 15:26:22 GMT
@@ -0,0 +1 @@
1
+ oracledb-6.10.0-darwin-x64.node v20.11.1 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d 8b14d5980d7d6116abb8865c7baed9e458698dbf Thu, 09 Oct 2025 15:33:20 GMT
@@ -0,0 +1 @@
1
+ 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d
@@ -0,0 +1 @@
1
+ oracledb-6.10.0-linux-arm64.node v20.19.2 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d 8b14d5980d7d6116abb8865c7baed9e458698dbf Thu, 09 Oct 2025 13:43:20 GMT
@@ -0,0 +1 @@
1
+ oracledb-6.10.0-linux-x64.node v22.16.0 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d 8b14d5980d7d6116abb8865c7baed9e458698dbf Thu, 09 Oct 2025 13:31:19 GMT
@@ -0,0 +1 @@
1
+ oracledb-6.10.0-win32-x64.node v22.17.1 71ba4e79b3fb8ffe6191e84eb0422c9bdfbb6c9d 8b14d5980d7d6116abb8865c7baed9e458698dbf Thu, 09 Oct 2025 13:31:10 GMT
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2019, 2023, Oracle and/or its affiliates.
1
+ // Copyright (c) 2019, 2025, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -74,6 +74,23 @@ class AqDeqOptions {
74
74
  this._impl.setCorrelation(value);
75
75
  }
76
76
 
77
+ //---------------------------------------------------------------------------
78
+ // deliveryMode
79
+ //
80
+ // Property for the delivery mode to use for dequeuing messages.
81
+ //---------------------------------------------------------------------------
82
+ get deliveryMode() {
83
+ return null;
84
+ }
85
+
86
+ set deliveryMode(value) {
87
+ errors.assertPropValue(value === constants.AQ_MSG_DELIV_MODE_PERSISTENT ||
88
+ value === constants.AQ_MSG_DELIV_MODE_BUFFERED ||
89
+ value === constants.AQ_MSG_DELIV_MODE_PERSISTENT_OR_BUFFERED,
90
+ "deliveryMode");
91
+ this._impl.setDeliveryMode(value);
92
+ }
93
+
77
94
  //---------------------------------------------------------------------------
78
95
  // mode
79
96
  //
package/lib/aqQueue.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2019, 2024, Oracle and/or its affiliates.
1
+ // Copyright (c) 2019, 2025, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -87,17 +87,21 @@ class AqQueue {
87
87
  }
88
88
  }
89
89
 
90
- // validate payload
90
+ // validate payload/queue type compatibility
91
91
  if (this._isJson) {
92
92
  message.payload = transformer.transformJsonValue(payload);
93
- } else if (typeof payload === 'string') {
93
+ } else if (typeof payload === 'string' || Buffer.isBuffer(payload)) {
94
94
  message.payload = Buffer.from(payload);
95
- } else if (Buffer.isBuffer(payload)) {
96
- message.payload = payload;
97
- } else {
95
+ } else if (this._payloadType == types.DB_TYPE_OBJECT) {
96
+ if (!(payload instanceof BaseDbObject) ||
97
+ (this._payloadTypeName !== payload._impl._objType.name))
98
+ errors.throwErr(errors.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);
98
99
  message.payload = payload._impl;
100
+ } else {
101
+ errors.throwErr(errors.ERR_PAYLOAD_CANNOT_BE_ENQUEUED);
99
102
  }
100
103
 
104
+
101
105
  // validate options, if applicable
102
106
  if (message.correlation !== undefined) {
103
107
  errors.assertParamPropValue(typeof message.correlation === 'string', 1,
package/lib/connection.js CHANGED
@@ -827,7 +827,12 @@ class Connection extends EventEmitter {
827
827
 
828
828
  this._closing = true;
829
829
  try {
830
- await this._impl.close(options);
830
+ // If connection is part of a pool, notify the pool of its availability
831
+ if (this._pool) {
832
+ await this._pool._release(this._impl, options);
833
+ } else {
834
+ await this._impl.close(options);
835
+ }
831
836
  } finally {
832
837
  this._closing = false;
833
838
  }
@@ -839,7 +844,6 @@ class Connection extends EventEmitter {
839
844
  }
840
845
  }
841
846
  this._dbObjectClasses.clear();
842
- this.emit('_afterConnClose');
843
847
  }
844
848
 
845
849
  //---------------------------------------------------------------------------
package/lib/dbObject.js CHANGED
@@ -79,6 +79,18 @@ function validatePropertyValue(objType, metaData, value, index) {
79
79
  // instantiated; a cache of these classes are maintained on each connection
80
80
  class BaseDbObject {
81
81
 
82
+ //---------------------------------------------------------------------------
83
+ // _ensureCollection()
84
+ //
85
+ // Ensures that the object is a collection.
86
+ //---------------------------------------------------------------------------
87
+ _ensureCollection() {
88
+ if (!this.isCollection) {
89
+ errors.throwErr(errors.ERR_OBJECT_IS_NOT_A_COLLECTION,
90
+ this.name);
91
+ }
92
+ }
93
+
82
94
  //---------------------------------------------------------------------------
83
95
  // _getAttrValue()
84
96
  //
@@ -165,6 +177,7 @@ class BaseDbObject {
165
177
  //---------------------------------------------------------------------------
166
178
  append(value) {
167
179
  errors.assertArgCount(arguments, 1, 1);
180
+ this._ensureCollection();
168
181
  const info = {
169
182
  fqn: this._objType.fqn,
170
183
  type: this._objType.elementType,
@@ -238,6 +251,7 @@ class BaseDbObject {
238
251
  //---------------------------------------------------------------------------
239
252
  deleteElement(index) {
240
253
  errors.assertArgCount(arguments, 1, 1);
254
+ this._ensureCollection();
241
255
  errors.assertParamValue(Number.isInteger(index), 1);
242
256
  return this._impl.deleteElement(index);
243
257
  }
@@ -300,6 +314,7 @@ class BaseDbObject {
300
314
  //---------------------------------------------------------------------------
301
315
  getElement(index) {
302
316
  errors.assertArgCount(arguments, 1, 1);
317
+ this._ensureCollection();
303
318
  errors.assertParamValue(Number.isInteger(index), 1);
304
319
  const value = this._impl.getElement(index);
305
320
  return this._transformValueOut(value, this.elementTypeClass, this._objType.elementTypeInfo);
@@ -312,6 +327,7 @@ class BaseDbObject {
312
327
  //---------------------------------------------------------------------------
313
328
  getKeys() {
314
329
  errors.assertArgCount(arguments, 0, 0);
330
+ this._ensureCollection();
315
331
  return this._impl.getKeys();
316
332
  }
317
333
 
@@ -322,6 +338,7 @@ class BaseDbObject {
322
338
  //---------------------------------------------------------------------------
323
339
  getFirstIndex() {
324
340
  errors.assertArgCount(arguments, 0, 0);
341
+ this._ensureCollection();
325
342
  return this._impl.getFirstIndex();
326
343
  }
327
344
 
@@ -332,6 +349,7 @@ class BaseDbObject {
332
349
  //---------------------------------------------------------------------------
333
350
  getLastIndex() {
334
351
  errors.assertArgCount(arguments, 0, 0);
352
+ this._ensureCollection();
335
353
  return this._impl.getLastIndex();
336
354
  }
337
355
 
@@ -342,6 +360,7 @@ class BaseDbObject {
342
360
  //---------------------------------------------------------------------------
343
361
  getNextIndex(index) {
344
362
  errors.assertArgCount(arguments, 1, 1);
363
+ this._ensureCollection();
345
364
  errors.assertParamValue(Number.isInteger(index), 1);
346
365
  return this._impl.getNextIndex(index);
347
366
  }
@@ -353,6 +372,7 @@ class BaseDbObject {
353
372
  //---------------------------------------------------------------------------
354
373
  getPrevIndex(index) {
355
374
  errors.assertArgCount(arguments, 1, 1);
375
+ this._ensureCollection();
356
376
  errors.assertParamValue(Number.isInteger(index), 1);
357
377
  return this._impl.getPrevIndex(index);
358
378
  }
@@ -364,6 +384,7 @@ class BaseDbObject {
364
384
  //---------------------------------------------------------------------------
365
385
  getValues() {
366
386
  errors.assertArgCount(arguments, 0, 0);
387
+ this._ensureCollection();
367
388
  const values = this._impl.getValues();
368
389
  for (let i = 0; i < values.length; i++) {
369
390
  values[i] = this._transformValueOut(values[i], this.elementTypeClass, this._objType.elementTypeInfo);
@@ -378,6 +399,7 @@ class BaseDbObject {
378
399
  //---------------------------------------------------------------------------
379
400
  hasElement(index) {
380
401
  errors.assertArgCount(arguments, 1, 1);
402
+ this._ensureCollection();
381
403
  errors.assertParamValue(Number.isInteger(index), 1);
382
404
  return this._impl.hasElement(index);
383
405
  }
@@ -426,6 +448,7 @@ class BaseDbObject {
426
448
  //---------------------------------------------------------------------------
427
449
  setElement(index, value) {
428
450
  errors.assertArgCount(arguments, 2, 2);
451
+ this._ensureCollection();
429
452
  errors.assertParamValue(Number.isInteger(index), 1);
430
453
  const info = {
431
454
  fqn: this._objType.fqn,
@@ -445,6 +468,7 @@ class BaseDbObject {
445
468
  //---------------------------------------------------------------------------
446
469
  trim(numToTrim) {
447
470
  errors.assertArgCount(arguments, 1, 1);
471
+ this._ensureCollection();
448
472
  errors.assertParamValue(Number.isInteger(numToTrim) && numToTrim >= 0, 1);
449
473
  this._impl.trim(numToTrim);
450
474
  }
@@ -487,10 +511,7 @@ class BaseDbObject {
487
511
  //---------------------------------------------------------------------------
488
512
  toMap() {
489
513
  errors.assertArgCount(arguments, 0, 0);
490
- if (!this.isCollection) {
491
- errors.throwErr(errors.ERR_OBJECT_IS_NOT_A_COLLECTION,
492
- this.name);
493
- }
514
+ this._ensureCollection();
494
515
  const result = new Map();
495
516
  this.getKeys().forEach(element => {
496
517
  result.set(element, this.getElement(element));
package/lib/errors.js CHANGED
@@ -178,6 +178,8 @@ const ERR_CALLOUT_FN = 169;
178
178
  const ERR_SESSIONLESS_DIFFERING_METHODS = 170;
179
179
  const ERR_SESSIONLESS_ALREADY_ACTIVE = 171;
180
180
  const ERR_SESSIONLESS_INACTIVE = 172;
181
+ const ERR_INVALID_SERVER_RESPONSE = 173;
182
+ const ERR_PAYLOAD_CANNOT_BE_ENQUEUED = 174;
181
183
 
182
184
  // Oracle Net layer errors start from 500
183
185
  const ERR_CONNECTION_CLOSED = 500;
@@ -260,6 +262,7 @@ adjustErrorXref.set("ORA-24344", WRN_COMPILATION_CREATE);
260
262
  adjustErrorXref.set("ORA-26202", ERR_SESSIONLESS_INACTIVE);
261
263
  adjustErrorXref.set("ORA-26211", ERR_SESSIONLESS_DIFFERING_METHODS);
262
264
  adjustErrorXref.set("ORA-26216", ERR_SESSIONLESS_ALREADY_ACTIVE);
265
+ adjustErrorXref.set("DPI-1071", ERR_PAYLOAD_CANNOT_BE_ENQUEUED);
263
266
 
264
267
  // define mapping for error messages
265
268
  const messages = new Map();
@@ -398,9 +401,9 @@ messages.set(ERR_EXEC_MODE_ONLY_FOR_DML, // NJS-095
398
401
  messages.set(ERR_INVALID_BIND_NAME, // NJS-097
399
402
  'no bind placeholder named ":%s" was found in the statement text');
400
403
  messages.set(ERR_WRONG_NUMBER_OF_BINDS, // NJS-098
401
- '%s bind placeholders were used in the SQL statement but %s bind values were provided');
404
+ '%d bind placeholders were used in the SQL statement but %d bind values were provided');
402
405
  messages.set(ERR_BUFFER_LENGTH_INSUFFICIENT, // NJS-099
403
- 'internal error: buffer of length %s insufficient to hold %s bytes');
406
+ 'internal error: buffer of length %d insufficient to hold %d bytes');
404
407
  messages.set(ERR_NCHAR_CS_NOT_SUPPORTED, // NJS-100
405
408
  'national character set id %d is not supported by node-oracledb in Thin mode');
406
409
  messages.set(ERR_MISSING_CREDENTIALS, // NJS-101
@@ -539,6 +542,11 @@ messages.set(ERR_SESSIONLESS_ALREADY_ACTIVE, //NJS-171
539
542
  'Suspend, commit or rollback the currently active sessionless transaction before beginning or resuming another one.');
540
543
  messages.set(ERR_SESSIONLESS_INACTIVE, //NJS-172
541
544
  'No sessionless transaction is active');
545
+ messages.set(ERR_INVALID_SERVER_RESPONSE, //NJS-173
546
+ 'Invalid server response to connection request');
547
+ messages.set(ERR_PAYLOAD_CANNOT_BE_ENQUEUED, // NJS-174
548
+ "Payload cannot be enqueued since it does not match the payload type supported by the queue");
549
+
542
550
 
543
551
  // Oracle Net layer errors
544
552
 
@@ -670,8 +678,8 @@ function assertParamPropInt(obj, parameterNum, propName) {
670
678
  //-----------------------------------------------------------------------------
671
679
  // assertParamPropUnsignedInt()
672
680
  //
673
- // Asserts that the property value of a parameter is a positive integer value
674
- // (or undefined).
681
+ // Asserts that the property value of a parameter is a non-negative integer
682
+ // value (or undefined).
675
683
  //-----------------------------------------------------------------------------
676
684
  function assertParamPropUnsignedInt(obj, parameterNum, propName) {
677
685
  if (obj[propName] !== undefined) {
@@ -999,6 +1007,8 @@ module.exports = {
999
1007
  ERR_SESSIONLESS_DIFFERING_METHODS,
1000
1008
  ERR_SESSIONLESS_ALREADY_ACTIVE,
1001
1009
  ERR_SESSIONLESS_INACTIVE,
1010
+ ERR_INVALID_SERVER_RESPONSE,
1011
+ ERR_PAYLOAD_CANNOT_BE_ENQUEUED,
1002
1012
  ERR_CONNECTION_CLOSED_CODE: `${ERR_PREFIX}-${ERR_CONNECTION_CLOSED}`,
1003
1013
  ERR_OPERATION_NOT_SUPPORTED_ON_BFILE,
1004
1014
  ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE,
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2022, Oracle and/or its affiliates.
1
+ // Copyright (c) 2022, 2025, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -138,6 +138,15 @@ class AqDeqOptionsImpl {
138
138
  errors.throwNotImplemented("setting correlation (dequeue options)");
139
139
  }
140
140
 
141
+ //---------------------------------------------------------------------------
142
+ // setDeliveryMode()
143
+ //
144
+ // Sets the delivery mode to use for dequeuing messages.
145
+ //---------------------------------------------------------------------------
146
+ setDeliveryMode() {
147
+ errors.throwNotImplemented("setting deliveryMode (dequeue options)");
148
+ }
149
+
141
150
  //---------------------------------------------------------------------------
142
151
  // setMode()
143
152
  //
@@ -397,6 +397,18 @@ class BaseBuffer {
397
397
  return buf;
398
398
  }
399
399
 
400
+ //---------------------------------------------------------------------------
401
+ // readBytesAndLength()
402
+ //
403
+ // Reads the UB4 length from the buffer and then returns a Buffer containing
404
+ // the specified number of bytes.
405
+ //---------------------------------------------------------------------------
406
+ readBytesAndLength() {
407
+ const numBytes = this.readUB4();
408
+ if (numBytes > 0)
409
+ return this.readBytesWithLength();
410
+ }
411
+
400
412
  //---------------------------------------------------------------------------
401
413
  // readBytesWithLength()
402
414
  //
@@ -548,6 +560,17 @@ class BaseBuffer {
548
560
  return Buffer.from(buf).swap16().toString('utf16le');
549
561
  }
550
562
 
563
+ //---------------------------------------------------------------------------
564
+ // readStrAndLength()
565
+ //
566
+ // Reads a length from the buffer and then, if the length is non-zero, reads
567
+ // string from the buffer and returns it.
568
+ //---------------------------------------------------------------------------
569
+ readStrAndLength() {
570
+ const buf = this.readBytesAndLength();
571
+ return buf ? buf.toString() : null;
572
+ }
573
+
551
574
  //---------------------------------------------------------------------------
552
575
  // readUB2()
553
576
  //
@@ -997,6 +1020,32 @@ class BaseBuffer {
997
1020
  this.buf.writeInt32BE(n, pos);
998
1021
  }
999
1022
 
1023
+ //---------------------------------------------------------------------------
1024
+ // writeSB4()
1025
+ //
1026
+ // Writes a signed integer (up to 4 bytes in length) in variable length
1027
+ // format to the buffer.
1028
+ //---------------------------------------------------------------------------
1029
+ writeSB4(value) {
1030
+ let sign = 0;
1031
+ if (value < 0) {
1032
+ value = -value;
1033
+ sign = 0x80;
1034
+ }
1035
+ if (value === 0) {
1036
+ this.writeUInt8(0);
1037
+ } else if (value <= 0xff) {
1038
+ this.writeUInt8(1 | sign);
1039
+ this.writeUInt8(value);
1040
+ } else if (value <= 0xffff) {
1041
+ this.writeUInt8(2 | sign);
1042
+ this.writeUInt16BE(value);
1043
+ } else {
1044
+ this.writeUInt8(4 | sign);
1045
+ this.writeUInt32BE(value);
1046
+ }
1047
+ }
1048
+
1000
1049
  //---------------------------------------------------------------------------
1001
1050
  // writeUB4()
1002
1051
  //
@@ -549,8 +549,13 @@ class OsonTreeSegment extends GrowableBuffer {
549
549
 
550
550
  // handle numbers
551
551
  } else if (typeof value === 'number') {
552
- this.writeUInt8(constants.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8);
553
- this.writeOracleNumber(value.toString());
552
+ if (Number.isNaN(value)) {
553
+ this.writeUInt8(constants.TNS_JSON_TYPE_BINARY_DOUBLE);
554
+ this.writeBinaryDouble(value);
555
+ } else {
556
+ this.writeUInt8(constants.TNS_JSON_TYPE_NUMBER_LENGTH_UINT8);
557
+ this.writeOracleNumber(value.toString());
558
+ }
554
559
 
555
560
  // handle strings
556
561
  } else if (typeof value === 'string') {
@@ -1,4 +1,4 @@
1
- // Copyright (c) 2022, 2023, Oracle and/or its affiliates.
1
+ // Copyright (c) 2022, 2025, Oracle and/or its affiliates.
2
2
 
3
3
  //-----------------------------------------------------------------------------
4
4
  //
@@ -31,21 +31,12 @@ const errors = require('../errors.js');
31
31
  class SodaDocumentImpl {
32
32
 
33
33
  //---------------------------------------------------------------------------
34
- // getContentAsBuffer()
34
+ // getContent()
35
35
  //
36
- // Returns the document content as a Buffer object.
36
+ // Returns the document content.
37
37
  //---------------------------------------------------------------------------
38
- getContentAsBuffer() {
39
- errors.throwNotImplemented("getting doc content as a buffer");
40
- }
41
-
42
- //---------------------------------------------------------------------------
43
- // getContentAsString()
44
- //
45
- // Returns the document content as a string.
46
- //---------------------------------------------------------------------------
47
- getContentAsString() {
48
- errors.throwNotImplemented("getting doc content as a string");
38
+ getContent() {
39
+ errors.throwNotImplemented("getting doc content");
49
40
  }
50
41
 
51
42
  //---------------------------------------------------------------------------
package/lib/oracledb.js CHANGED
@@ -585,7 +585,10 @@ async function _verifyOptions(options, inCreatePool) {
585
585
  errors.throwErr(errors.ERR_WRONG_CRED_FOR_EXTAUTH);
586
586
  }
587
587
  if (outOptions.user) {
588
- if (inCreatePool) {
588
+
589
+ if (inCreatePool && !settings.thin) {
590
+ // Thick mode currently does not allow proxy users to specified
591
+ // during pool creation.
589
592
  errors.throwErr(errors.ERR_WRONG_CRED_FOR_EXTAUTH);
590
593
  } else if (outOptions.user[0] !== '[' || outOptions.user.slice(-1) !== ']') {
591
594
  // username is not enclosed in [].
@@ -914,6 +917,7 @@ async function _setConfigParameters(obj, credential, configProvider) {
914
917
  configObject[key] = val;
915
918
  }
916
919
  configObject.connectString = obj.connect_descriptor;
920
+ configObject.configTTL = obj.config_time_to_live;
917
921
  if (!configObject.connectString)
918
922
  errors.throwErr(errors.ERR_CONFIG_PROVIDER_FAILED_TO_RETRIEVE_CONFIG, 'connect_descriptor must be set');
919
923
 
@@ -986,32 +990,37 @@ async function _retrieveParamValueFromVault(paramObj, credential, configProvider
986
990
  //-----------------------------------------------------------------------------
987
991
  // _checkConfigProvider()
988
992
  //
989
- // Look for the config provider in the connection string and retreives
993
+ // Look for the config provider in the connection string and retrieves
990
994
  // object stored in the config Provider.
991
995
  // Returns object based on precedence between input object and the one retrieved
992
996
  // from Config Provider.
993
997
  //-----------------------------------------------------------------------------
994
998
  async function _checkConfigProvider(options) {
995
999
  // Time for Cache entries to be deleted in milliseconds
996
- const cacheEntriesDuration = settings.configProviderCacheTimeout * 1000;
997
- let secondOpts;
1000
+ let cacheEntriesDuration = settings.configProviderCacheTimeout * 1000;
1001
+ let secondOpts, cachedConfigEntry;
998
1002
  const url = options.connectString || options.connectionString;
999
1003
  if (!url)
1000
1004
  return options;
1001
1005
 
1002
- if (configProviderCache && configProviderCache.has(url) && ((Date.now() - configProviderCache.get(url).timeAdded) < cacheEntriesDuration)) {
1003
- const cacheOpts1 = configProviderCache.get(url).cacheOpts;
1004
- secondOpts = { ...cacheOpts1};
1006
+ if (configProviderCache && (cachedConfigEntry = configProviderCache.get(url))) {
1007
+ const config = cachedConfigEntry.cacheOpts;
1008
+ if (config.configTTL)
1009
+ cacheEntriesDuration = config.configTTL * 1000;
1005
1010
 
1006
- //deobfuscate password
1007
- if (secondOpts.password)
1008
- secondOpts.password = protocolUtil.getDeobfuscatedValue(secondOpts.password.value, secondOpts.password.obfuscatedValue);
1011
+ if ((Date.now() - cachedConfigEntry.timeAdded) < cacheEntriesDuration) {
1012
+ secondOpts = { ...config};
1009
1013
 
1010
- //deobfuscate walletContent
1011
- if (secondOpts.walletContent)
1012
- secondOpts.walletContent = protocolUtil.getDeobfuscatedValue(secondOpts.walletContent.value, secondOpts.walletContent.obfuscatedValue);
1014
+ //deobfuscate password
1015
+ if (secondOpts.password)
1016
+ secondOpts.password = protocolUtil.getDeobfuscatedValue(secondOpts.password.value, secondOpts.password.obfuscatedValue);
1013
1017
 
1014
- } else {
1018
+ //deobfuscate walletContent
1019
+ if (secondOpts.walletContent)
1020
+ secondOpts.walletContent = protocolUtil.getDeobfuscatedValue(secondOpts.walletContent.value, secondOpts.walletContent.obfuscatedValue);
1021
+ }
1022
+ }
1023
+ if (!secondOpts) {
1015
1024
  let parsedUrl = url;
1016
1025
  let urlExtendedPart;
1017
1026
  const baseRegex = new RegExp("^config-(?<provider>[A-Za-z0-9]+)(://)(?<provider_arg>[^?]+)");