oracledb 6.2.0 → 6.4.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 +3 -3
- package/build/Release/oracledb-6.4.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.4.0-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.4.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.4.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.4.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.4.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.4.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.4.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.4.0-win32-x64.node-buildinfo.txt +1 -0
- package/examples/README.md +29 -8
- package/examples/dbconfig.js +50 -26
- package/examples/example.js +6 -4
- package/lib/aqQueue.js +8 -8
- package/lib/connection.js +121 -9
- package/lib/constants.js +7 -1
- package/lib/dbObject.js +72 -1
- package/lib/errors.js +45 -8
- package/lib/future.js +53 -0
- package/lib/impl/connection.js +56 -0
- package/lib/{thin/protocol → impl/datahandlers}/buffer.js +51 -39
- package/lib/impl/datahandlers/constants.js +105 -0
- package/lib/{thin/protocol → impl/datahandlers}/oson.js +19 -1
- package/lib/impl/datahandlers/vector.js +156 -0
- package/lib/impl/pool.js +14 -3
- package/lib/impl/resultset.js +65 -11
- package/lib/lob.js +22 -6
- package/lib/oracledb.js +47 -8
- package/lib/pool.js +20 -1
- package/lib/poolStatistics.js +3 -1
- package/lib/settings.js +30 -6
- package/lib/sodaDocCursor.js +14 -1
- package/lib/thin/connection.js +146 -146
- package/lib/thin/dbObject.js +49 -3
- package/lib/thin/index.js +1 -1
- package/lib/thin/lob.js +6 -6
- package/lib/thin/pool.js +25 -6
- package/lib/thin/protocol/capabilities.js +6 -2
- package/lib/thin/protocol/constants.js +50 -65
- package/lib/thin/protocol/messages/auth.js +6 -2
- package/lib/thin/protocol/messages/base.js +50 -32
- package/lib/thin/protocol/messages/dataType.js +10 -6
- package/lib/thin/protocol/messages/lobOp.js +7 -8
- package/lib/thin/protocol/messages/withData.js +91 -24
- package/lib/thin/protocol/packet.js +58 -4
- package/lib/thin/protocol/utils.js +1 -1
- package/lib/thin/sqlnet/connStrategy.js +8 -4
- package/lib/thin/sqlnet/constants.js +138 -138
- package/lib/thin/sqlnet/navNodes.js +5 -5
- package/lib/thin/sqlnet/networkSession.js +22 -3
- package/lib/thin/sqlnet/ntTcp.js +7 -7
- package/lib/thin/statement.js +8 -8
- package/lib/thin/statementCache.js +167 -0
- package/lib/thin/util.js +15 -4
- package/lib/transformer.js +13 -4
- package/lib/types.js +17 -2
- package/lib/util.js +37 -0
- package/lib/version.js +2 -2
- package/package.json +1 -1
- package/build/Release/oracledb-6.2.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.2.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.2.0-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.2.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.2.0-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.2.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.2.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.2.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.2.0-win32-x64.node-buildinfo.txt +0 -1
package/lib/thin/util.js
CHANGED
|
@@ -110,9 +110,9 @@ function checkProxyUserValidity(userName) {
|
|
|
110
110
|
let quoteFound = false, openSquareBracketFound = false;
|
|
111
111
|
let lastQuoteFoundIndex = 0;
|
|
112
112
|
const result = {
|
|
113
|
-
status
|
|
114
|
-
proxyUser
|
|
115
|
-
schemaUser
|
|
113
|
+
status: -1,
|
|
114
|
+
proxyUser: '',
|
|
115
|
+
schemaUser: ''
|
|
116
116
|
};
|
|
117
117
|
const userNameLength = userName.length;
|
|
118
118
|
let index = 0, i, j;
|
|
@@ -238,10 +238,21 @@ function checkCredentials(params) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
//---------------------------------------------------------------------------
|
|
242
|
+
// normalizePrivateKey()
|
|
243
|
+
//
|
|
244
|
+
// Add header and footer to private key
|
|
245
|
+
//---------------------------------------------------------------------------
|
|
246
|
+
function normalizePrivateKey(privateKey) {
|
|
247
|
+
return '-----BEGIN PRIVATE KEY-----\n' + privateKey +
|
|
248
|
+
'\n' + '-----END PRIVATE KEY-----';
|
|
249
|
+
}
|
|
250
|
+
|
|
241
251
|
module.exports = {
|
|
242
252
|
getMetadataMany,
|
|
243
253
|
CLIENT_INFO,
|
|
244
254
|
getOutBinds,
|
|
245
255
|
checkProxyUserValidity,
|
|
246
|
-
checkCredentials
|
|
256
|
+
checkCredentials,
|
|
257
|
+
normalizePrivateKey
|
|
247
258
|
};
|
package/lib/transformer.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2023, Oracle and/or its affiliates.
|
|
1
|
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -34,6 +34,7 @@ const constants = require('./constants.js');
|
|
|
34
34
|
const errors = require('./errors.js');
|
|
35
35
|
const util = require('util');
|
|
36
36
|
const types = require('./types.js');
|
|
37
|
+
const nodbUtil = require('./util.js');
|
|
37
38
|
|
|
38
39
|
//-----------------------------------------------------------------------------
|
|
39
40
|
// checkType()
|
|
@@ -86,9 +87,9 @@ function transformJsonValue(value) {
|
|
|
86
87
|
|
|
87
88
|
// handle simple scalars
|
|
88
89
|
if (value === undefined || value === null ||
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
typeof value === 'number' || typeof value === 'string' ||
|
|
91
|
+
typeof value === 'boolean' || Buffer.isBuffer(value) ||
|
|
92
|
+
util.isDate(value) || nodbUtil.isVectorValue(value))
|
|
92
93
|
return value;
|
|
93
94
|
|
|
94
95
|
// arrays are transformed to a new array with processed values
|
|
@@ -220,6 +221,14 @@ function transformValueIn(info, value, options) {
|
|
|
220
221
|
checkType(info, options, types.DB_TYPE_OBJECT);
|
|
221
222
|
return value._impl;
|
|
222
223
|
|
|
224
|
+
// handle vectors
|
|
225
|
+
} else if (value instanceof Float32Array || value instanceof Float64Array ||
|
|
226
|
+
value instanceof Int8Array) {
|
|
227
|
+
checkType(info, options, types.DB_TYPE_VECTOR);
|
|
228
|
+
return value;
|
|
229
|
+
} else if (info.type === types.DB_TYPE_VECTOR && Array.isArray(value)) {
|
|
230
|
+
return new Float64Array(value);
|
|
231
|
+
|
|
223
232
|
// handle arrays
|
|
224
233
|
} else if (options.allowArray && Array.isArray(value)) {
|
|
225
234
|
info.isArray = true;
|
package/lib/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2024, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -196,6 +196,12 @@ const DB_TYPE_UROWID = new DbType(2030,
|
|
|
196
196
|
const DB_TYPE_VARCHAR = new DbType(2001,
|
|
197
197
|
"DB_TYPE_VARCHAR", "VARCHAR2",
|
|
198
198
|
{ oraTypeNum: 1, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 4 });
|
|
199
|
+
const DB_TYPE_XMLTYPE = new DbType(2032,
|
|
200
|
+
"DB_TYPE_XMLTYPE", "XMLTYPE",
|
|
201
|
+
{ oraTypeNum: 109, csfrm: constants.CSFRM_IMPLICIT, bufferSizeFactor: 2147483647 });
|
|
202
|
+
const DB_TYPE_VECTOR = new DbType(2033,
|
|
203
|
+
"DB_TYPE_VECTOR", "VECTOR",
|
|
204
|
+
{ oraTypeNum: 127 });
|
|
199
205
|
|
|
200
206
|
// database type conversion map: the top level key refers to the database
|
|
201
207
|
// type being fetched and the value is another map; this map's key is the
|
|
@@ -273,6 +279,11 @@ const DB_TYPE_CONVERSION_MAP = new Map([
|
|
|
273
279
|
[DB_TYPE_UROWID, new Map([
|
|
274
280
|
[DB_TYPE_VARCHAR, DB_TYPE_ROWID]
|
|
275
281
|
])],
|
|
282
|
+
[DB_TYPE_VECTOR, new Map([
|
|
283
|
+
[DB_TYPE_VARCHAR, DB_TYPE_LONG],
|
|
284
|
+
[DB_TYPE_LONG, DB_TYPE_LONG],
|
|
285
|
+
[DB_TYPE_CLOB, DB_TYPE_CLOB]
|
|
286
|
+
])],
|
|
276
287
|
]);
|
|
277
288
|
|
|
278
289
|
// default fetch type map
|
|
@@ -304,7 +315,9 @@ const DB_TYPE_FETCH_TYPE_MAP = new Map([
|
|
|
304
315
|
[DB_TYPE_TIMESTAMP_LTZ, DB_TYPE_TIMESTAMP_TZ],
|
|
305
316
|
[DB_TYPE_TIMESTAMP_TZ, DB_TYPE_TIMESTAMP_TZ],
|
|
306
317
|
[DB_TYPE_UROWID, DB_TYPE_UROWID],
|
|
307
|
-
[DB_TYPE_VARCHAR, DB_TYPE_VARCHAR]
|
|
318
|
+
[DB_TYPE_VARCHAR, DB_TYPE_VARCHAR],
|
|
319
|
+
[DB_TYPE_XMLTYPE, DB_TYPE_XMLTYPE],
|
|
320
|
+
[DB_TYPE_VECTOR, DB_TYPE_VECTOR]
|
|
308
321
|
]);
|
|
309
322
|
|
|
310
323
|
// additional aliases for types by column type name
|
|
@@ -349,8 +362,10 @@ module.exports = {
|
|
|
349
362
|
DB_TYPE_TIMESTAMP_TZ,
|
|
350
363
|
DB_TYPE_UROWID,
|
|
351
364
|
DB_TYPE_VARCHAR,
|
|
365
|
+
DB_TYPE_VECTOR,
|
|
352
366
|
DB_TYPE_CONVERSION_MAP,
|
|
353
367
|
DB_TYPE_FETCH_TYPE_MAP,
|
|
368
|
+
DB_TYPE_XMLTYPE,
|
|
354
369
|
getTypeByColumnTypeName,
|
|
355
370
|
getTypeByNum,
|
|
356
371
|
getTypeByOraTypeNum
|
package/lib/util.js
CHANGED
|
@@ -297,6 +297,13 @@ function isTokenValid(accessToken) {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
+
function denormalizePrivateKey(privateKey) {
|
|
301
|
+
privateKey = privateKey.replace(/\n/g, '');
|
|
302
|
+
privateKey = privateKey.replace('-----BEGIN PRIVATE KEY-----', '');
|
|
303
|
+
privateKey = privateKey.replace('-----END PRIVATE KEY-----', '');
|
|
304
|
+
return privateKey;
|
|
305
|
+
}
|
|
306
|
+
|
|
300
307
|
//-----------------------------------------------------------------------------
|
|
301
308
|
// addTypeProperties()
|
|
302
309
|
//
|
|
@@ -320,6 +327,33 @@ function addTypeProperties(obj, attrName) {
|
|
|
320
327
|
}
|
|
321
328
|
}
|
|
322
329
|
|
|
330
|
+
//-----------------------------------------------------------------------------
|
|
331
|
+
// isVectorValue()
|
|
332
|
+
//
|
|
333
|
+
// Returns true for list of typed arrays supported for vector column types
|
|
334
|
+
//
|
|
335
|
+
// -----------------------------------------------------------------------------
|
|
336
|
+
function isVectorValue(value) {
|
|
337
|
+
return (value instanceof Float32Array ||
|
|
338
|
+
value instanceof Float64Array ||
|
|
339
|
+
value instanceof Int8Array);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
//-----------------------------------------------------------------------------
|
|
343
|
+
// makeDate()
|
|
344
|
+
//
|
|
345
|
+
// Returns a date from the given components.
|
|
346
|
+
//
|
|
347
|
+
// -----------------------------------------------------------------------------
|
|
348
|
+
function makeDate(useLocal, year, month, day, hour, minute,
|
|
349
|
+
second, fseconds, offset) {
|
|
350
|
+
if (useLocal) {
|
|
351
|
+
return new Date(year, month - 1, day, hour, minute, second, fseconds);
|
|
352
|
+
}
|
|
353
|
+
return new Date(Date.UTC(year, month - 1, day, hour, minute, second,
|
|
354
|
+
fseconds) - offset * 60000);
|
|
355
|
+
}
|
|
356
|
+
|
|
323
357
|
// define exports
|
|
324
358
|
module.exports = {
|
|
325
359
|
BINARY_FILE,
|
|
@@ -329,6 +363,7 @@ module.exports = {
|
|
|
329
363
|
STAGING_DIR,
|
|
330
364
|
addTypeProperties,
|
|
331
365
|
callbackify,
|
|
366
|
+
denormalizePrivateKey,
|
|
332
367
|
getInstallURL,
|
|
333
368
|
getInstallHelp,
|
|
334
369
|
isArrayOfStrings,
|
|
@@ -338,7 +373,9 @@ module.exports = {
|
|
|
338
373
|
isSodaDocument,
|
|
339
374
|
isTokenExpired,
|
|
340
375
|
isTokenValid,
|
|
376
|
+
isVectorValue,
|
|
341
377
|
isXid,
|
|
378
|
+
makeDate,
|
|
342
379
|
preventConcurrent,
|
|
343
380
|
serialize,
|
|
344
381
|
verifySodaDoc,
|
package/lib/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2023, Oracle and/or its affiliates.
|
|
1
|
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
module.exports = {
|
|
32
32
|
VERSION_MAJOR: 6,
|
|
33
|
-
VERSION_MINOR:
|
|
33
|
+
VERSION_MINOR: 4,
|
|
34
34
|
VERSION_PATCH: 0,
|
|
35
35
|
VERSION_SUFFIX: ''
|
|
36
36
|
};
|
package/package.json
CHANGED
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.2.0-darwin-x64.node v16.20.2 fe16239d5a7ceb588ae0e0766e74da2d20fb7af9 20785f251426f274f4216369b9259908a103384d Wed, 27 Sep 2023 05:56:04 GMT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fe16239d5a7ceb588ae0e0766e74da2d20fb7af9
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.2.0-linux-arm64.node v18.15.0 fe16239d5a7ceb588ae0e0766e74da2d20fb7af9 20785f251426f274f4216369b9259908a103384d Wed, 27 Sep 2023 06:02:23 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.2.0-linux-x64.node v16.19.1 fe16239d5a7ceb588ae0e0766e74da2d20fb7af9 20785f251426f274f4216369b9259908a103384d Thu, 28 Sep 2023 16:23:40 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.2.0-win32-x64.node v16.19.0 fe16239d5a7ceb588ae0e0766e74da2d20fb7af9 20785f251426f274f4216369b9259908a103384d Wed, 27 Sep 2023 10:36:18 GMT
|