oracledb 6.10.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.
- package/LICENSE.txt +1 -1
- package/NOTICE.txt +1 -1
- package/README.md +9 -9
- package/build/Release/oracledb-7.0.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-7.0.0-darwin-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-7.0.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.0-linux-x64.node +0 -0
- package/build/Release/oracledb-7.0.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-7.0.0-win32-x64.node +0 -0
- package/build/Release/oracledb-7.0.0-win32-x64.node-buildinfo.txt +1 -0
- package/eslint.config.js +39 -0
- package/lib/connection.js +412 -37
- package/lib/endUserSecurityContext.js +176 -0
- package/lib/errors.js +86 -5
- package/lib/impl/connection.js +76 -2
- package/lib/impl/datahandlers/buffer.js +19 -5
- package/lib/impl/datahandlers/vector.js +25 -5
- package/lib/impl/lob.js +9 -0
- package/lib/impl/parserHelpers.js +443 -0
- package/lib/impl/resultset.js +1 -1
- package/lib/lob.js +27 -14
- package/lib/obfuscation.js +97 -0
- package/lib/oracledb.js +148 -43
- package/lib/parser.js +204 -0
- package/lib/pipeline.js +113 -0
- package/lib/pool.js +16 -1
- package/lib/resultset.js +42 -21
- package/lib/settings.js +1 -0
- package/lib/thin/connection.js +467 -53
- package/lib/thin/dbObject.js +7 -1
- package/lib/thin/lob.js +20 -1
- package/lib/thin/pool.js +42 -62
- package/lib/thin/protocol/capabilities.js +18 -3
- package/lib/thin/protocol/constants.js +82 -2
- package/lib/thin/protocol/encryptDecrypt.js +43 -8
- package/lib/thin/protocol/messages/auth.js +6 -1
- package/lib/thin/protocol/messages/base.js +245 -4
- package/lib/thin/protocol/messages/dataType.js +8 -3
- package/lib/thin/protocol/messages/directPathLoadStream.js +377 -0
- package/lib/thin/protocol/messages/directPathOp.js +65 -0
- package/lib/thin/protocol/messages/directPathPrepare.js +158 -0
- package/lib/thin/protocol/messages/endPipeline.js +56 -0
- package/lib/thin/protocol/messages/execute.js +9 -7
- package/lib/thin/protocol/messages/index.js +9 -1
- package/lib/thin/protocol/messages/protocol.js +2 -2
- package/lib/thin/protocol/messages/withData.js +8 -140
- package/lib/thin/protocol/packet.js +115 -24
- package/lib/thin/protocol/protocol.js +110 -25
- package/lib/thin/protocol/utils.js +1 -26
- package/lib/thin/resultSet.js +13 -19
- package/lib/thin/sqlnet/ezConnectResolver.js +2 -2
- package/lib/thin/sqlnet/networkSession.js +62 -40
- package/lib/thin/sqlnet/ntTcp.js +24 -0
- package/lib/thin/sqlnet/nvStrToNvPair.js +50 -25
- package/lib/thin/sqlnet/packet.js +25 -4
- package/lib/thin/sqlnet/paramParser.js +10 -7
- package/lib/thin/statementCache.js +2 -4
- package/lib/traceHandler.js +59 -2
- package/lib/transformer.js +8 -3
- package/lib/types.js +35 -21
- package/lib/util.js +6 -6
- package/lib/version.js +3 -3
- package/package/install.js +5 -5
- package/package/prunebinaries.js +1 -1
- package/package.json +1 -1
- package/plugins/configProviders/awsCommon.js +125 -0
- package/plugins/configProviders/awss3/index.js +138 -0
- package/plugins/configProviders/awssecretsmanager/index.js +147 -0
- package/plugins/configProviders/azure/index.js +4 -5
- package/plugins/token/extensionAzure/index.js +0 -1
- package/plugins/token/extensionOci/index.js +0 -1
- package/build/Release/oracledb-6.10.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-6.10.0-darwin-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.10.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.10.0-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.10.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.10.0-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.10.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.10.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-win32-x64.node-buildinfo.txt +0 -1
package/lib/pool.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2016,
|
|
1
|
+
// Copyright (c) 2016, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -34,6 +34,7 @@ const settings = require('./settings.js');
|
|
|
34
34
|
const nodbUtil = require('./util.js');
|
|
35
35
|
const impl = require('./impl');
|
|
36
36
|
const PoolStatistics = require('./poolStatistics.js');
|
|
37
|
+
const traceHandler = require('./traceHandler.js');
|
|
37
38
|
|
|
38
39
|
class Pool extends EventEmitter {
|
|
39
40
|
|
|
@@ -289,6 +290,7 @@ class Pool extends EventEmitter {
|
|
|
289
290
|
this._bgRequestWaiter();
|
|
290
291
|
|
|
291
292
|
this.emit('_afterPoolClose');
|
|
293
|
+
traceHandler.getTraceInstance()?.onPoolClose(this);
|
|
292
294
|
|
|
293
295
|
}
|
|
294
296
|
|
|
@@ -428,6 +430,7 @@ class Pool extends EventEmitter {
|
|
|
428
430
|
// Queueing our request
|
|
429
431
|
request.wasQueued = true;
|
|
430
432
|
this._pendingRequestQueue.add(request);
|
|
433
|
+
traceHandler.getTraceInstance()?.onPoolWait(this);
|
|
431
434
|
|
|
432
435
|
if (this._enableStatistics) {
|
|
433
436
|
this._totalRequestsEnqueued += 1;
|
|
@@ -445,6 +448,7 @@ class Pool extends EventEmitter {
|
|
|
445
448
|
this._pendingRequestQueue.delete(request);
|
|
446
449
|
if (this.enableStatistics)
|
|
447
450
|
this._totalRequestTimeouts += 1;
|
|
451
|
+
traceHandler.getTraceInstance()?.onPoolRequestTimeout(this);
|
|
448
452
|
reject(errors.getErr(errors.ERR_CONN_REQUEST_TIMEOUT,
|
|
449
453
|
this._queueTimeout));
|
|
450
454
|
}, this._queueTimeout);
|
|
@@ -466,6 +470,8 @@ class Pool extends EventEmitter {
|
|
|
466
470
|
if (request.error)
|
|
467
471
|
throw request.error;
|
|
468
472
|
|
|
473
|
+
traceHandler.getTraceInstance()?.onPoolAcquire(this);
|
|
474
|
+
|
|
469
475
|
return request.conn;
|
|
470
476
|
}
|
|
471
477
|
|
|
@@ -858,6 +864,15 @@ class Pool extends EventEmitter {
|
|
|
858
864
|
get connectTraceConfig() {
|
|
859
865
|
return this._impl && this._impl._getConnectTraceConfig();
|
|
860
866
|
}
|
|
867
|
+
|
|
868
|
+
//---------------------------------------------------------------------------
|
|
869
|
+
// Symbol.asyncDispose
|
|
870
|
+
//
|
|
871
|
+
// Implement explicit resource management.
|
|
872
|
+
//---------------------------------------------------------------------------
|
|
873
|
+
async [Symbol.asyncDispose]() {
|
|
874
|
+
await this.close();
|
|
875
|
+
}
|
|
861
876
|
}
|
|
862
877
|
|
|
863
878
|
nodbUtil.wrapFns(Pool.prototype, false,
|
package/lib/resultset.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2016,
|
|
1
|
+
// Copyright (c) 2016, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -59,7 +59,7 @@ class ResultSet {
|
|
|
59
59
|
|
|
60
60
|
// fetch all rows
|
|
61
61
|
let rowsFetched = [];
|
|
62
|
-
while (true) {
|
|
62
|
+
while (true) {
|
|
63
63
|
if (maxRows > 0 && fetchArraySize >= maxRows) {
|
|
64
64
|
fetchArraySize = maxRows;
|
|
65
65
|
}
|
|
@@ -206,12 +206,7 @@ class ResultSet {
|
|
|
206
206
|
this._impl = resultSetImpl;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
|
|
210
|
-
// close()
|
|
211
|
-
//
|
|
212
|
-
// Close the result set and make it unusable for further operations.
|
|
213
|
-
//---------------------------------------------------------------------------
|
|
214
|
-
async close() {
|
|
209
|
+
async _close() {
|
|
215
210
|
errors.assertArgCount(arguments, 0, 0);
|
|
216
211
|
errors.assert(this._impl && this._connection._impl, errors.ERR_INVALID_RS);
|
|
217
212
|
|
|
@@ -226,13 +221,15 @@ class ResultSet {
|
|
|
226
221
|
}
|
|
227
222
|
|
|
228
223
|
//---------------------------------------------------------------------------
|
|
229
|
-
//
|
|
224
|
+
// close()
|
|
230
225
|
//
|
|
231
|
-
//
|
|
232
|
-
// available. Rows are buffered in a JavaScript array in order to avoid trips
|
|
233
|
-
// through the thread pool that would be required if implemented in C.
|
|
226
|
+
// Close the result set and make it unusable for further operations.
|
|
234
227
|
//---------------------------------------------------------------------------
|
|
235
|
-
async
|
|
228
|
+
async close() {
|
|
229
|
+
await this._close.apply(this, arguments);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
async _getRow() {
|
|
236
233
|
errors.assertArgCount(arguments, 0, 0);
|
|
237
234
|
errors.assert(this._impl && this._connection._impl, errors.ERR_INVALID_RS);
|
|
238
235
|
|
|
@@ -252,15 +249,17 @@ class ResultSet {
|
|
|
252
249
|
}
|
|
253
250
|
|
|
254
251
|
//---------------------------------------------------------------------------
|
|
255
|
-
//
|
|
252
|
+
// getRow()
|
|
256
253
|
//
|
|
257
|
-
//
|
|
258
|
-
//
|
|
259
|
-
//
|
|
260
|
-
// rows are pulled from the buffer and potentially concatenated with rows
|
|
261
|
-
// from calls to the implementation's getRows().
|
|
254
|
+
// Returns a single row to the caller from the result set, if one is
|
|
255
|
+
// available. Rows are buffered in a JavaScript array in order to avoid trips
|
|
256
|
+
// through the thread pool that would be required if implemented in C.
|
|
262
257
|
//---------------------------------------------------------------------------
|
|
263
|
-
async
|
|
258
|
+
async getRow() {
|
|
259
|
+
return await this._getRow.apply(this, arguments);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
async _doGetRows(numRows) {
|
|
264
263
|
let rowsNeeded;
|
|
265
264
|
|
|
266
265
|
errors.assertArgCount(arguments, 0, 1);
|
|
@@ -282,7 +281,7 @@ class ResultSet {
|
|
|
282
281
|
if (numRows == 0) {
|
|
283
282
|
requestedRows = this._rowCache;
|
|
284
283
|
const fetchArraySize = this._impl.fetchArraySize;
|
|
285
|
-
while (true) {
|
|
284
|
+
while (true) {
|
|
286
285
|
const rows = await this._getRows(fetchArraySize);
|
|
287
286
|
if (rows) {
|
|
288
287
|
await this._processRows(rows, false);
|
|
@@ -312,6 +311,19 @@ class ResultSet {
|
|
|
312
311
|
return requestedRows;
|
|
313
312
|
}
|
|
314
313
|
|
|
314
|
+
//---------------------------------------------------------------------------
|
|
315
|
+
// getRows()
|
|
316
|
+
//
|
|
317
|
+
// Check to see if any rows are in the JS buffer (which could result from
|
|
318
|
+
// interspersed calls to getRow() and getRows()). If no rows are in the
|
|
319
|
+
// buffer, the call is just proxied to the implementation layer. Otherwise,
|
|
320
|
+
// rows are pulled from the buffer and potentially concatenated with rows
|
|
321
|
+
// from calls to the implementation's getRows().
|
|
322
|
+
//---------------------------------------------------------------------------
|
|
323
|
+
async getRows() {
|
|
324
|
+
return await this._doGetRows.apply(this, arguments);
|
|
325
|
+
}
|
|
326
|
+
|
|
315
327
|
//---------------------------------------------------------------------------
|
|
316
328
|
// metaData()
|
|
317
329
|
//
|
|
@@ -358,6 +370,15 @@ class ResultSet {
|
|
|
358
370
|
};
|
|
359
371
|
}
|
|
360
372
|
|
|
373
|
+
//---------------------------------------------------------------------------
|
|
374
|
+
// Symbol.asyncDispose
|
|
375
|
+
//
|
|
376
|
+
// Implement explicit resource management.
|
|
377
|
+
//---------------------------------------------------------------------------
|
|
378
|
+
async [Symbol.asyncDispose]() {
|
|
379
|
+
await this.close();
|
|
380
|
+
}
|
|
381
|
+
|
|
361
382
|
}
|
|
362
383
|
|
|
363
384
|
nodbUtil.wrapFns(ResultSet.prototype, errors.ERR_BUSY_RS,
|
package/lib/settings.js
CHANGED
|
@@ -62,6 +62,7 @@ class Settings {
|
|
|
62
62
|
this.configProviderCacheTimeout = 86400;
|
|
63
63
|
this.thin = true;
|
|
64
64
|
this.thinDriverInitialized = false;
|
|
65
|
+
this.thickModeDSNPassthrough = true;
|
|
65
66
|
this.createFetchTypeMap(this.fetchAsString, this.fetchAsBuffer);
|
|
66
67
|
this.fetchTypeHandler = undefined;
|
|
67
68
|
this.dbObjectTypeHandler = undefined;
|