oracledb 6.5.1 → 6.7.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 (73) hide show
  1. package/README.md +2 -2
  2. package/build/Release/oracledb-6.7.0-darwin-arm64.node +0 -0
  3. package/build/Release/oracledb-6.7.0-darwin-arm64.node-buildinfo.txt +1 -0
  4. package/build/Release/oracledb-6.7.0-darwin-x64.node +0 -0
  5. package/build/Release/oracledb-6.7.0-darwin-x64.node-buildinfo.txt +1 -0
  6. package/build/Release/oracledb-6.7.0-js-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-6.7.0-linux-arm64.node +0 -0
  8. package/build/Release/oracledb-6.7.0-linux-arm64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-6.7.0-linux-x64.node +0 -0
  10. package/build/Release/oracledb-6.7.0-linux-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-6.7.0-win32-x64.node +0 -0
  12. package/build/Release/oracledb-6.7.0-win32-x64.node-buildinfo.txt +1 -0
  13. package/examples/README.md +4 -0
  14. package/lib/configProviders/azure.js +178 -0
  15. package/lib/configProviders/base.js +85 -0
  16. package/lib/configProviders/ociobject.js +211 -0
  17. package/lib/connection.js +97 -14
  18. package/lib/constants.js +1 -0
  19. package/lib/errors.js +68 -6
  20. package/lib/impl/aqQueue.js +2 -1
  21. package/lib/impl/base.js +45 -0
  22. package/lib/impl/connection.js +53 -0
  23. package/lib/impl/datahandlers/constants.js +3 -1
  24. package/lib/impl/datahandlers/vector.js +24 -9
  25. package/lib/impl/lob.js +29 -1
  26. package/lib/impl/pool.js +15 -0
  27. package/lib/impl/resultset.js +28 -2
  28. package/lib/impl/sodaCollection.js +2 -1
  29. package/lib/impl/sodaDatabase.js +2 -1
  30. package/lib/impl/sodaDocCursor.js +2 -1
  31. package/lib/impl/sodaOperation.js +2 -1
  32. package/lib/lob.js +55 -3
  33. package/lib/oracledb.js +246 -7
  34. package/lib/pool.js +14 -5
  35. package/lib/settings.js +1 -0
  36. package/lib/thin/connection.js +304 -29
  37. package/lib/thin/dbObject.js +4 -0
  38. package/lib/thin/lob.js +193 -1
  39. package/lib/thin/pool.js +18 -0
  40. package/lib/thin/protocol/capabilities.js +2 -0
  41. package/lib/thin/protocol/constants.js +29 -1
  42. package/lib/thin/protocol/messages/auth.js +12 -6
  43. package/lib/thin/protocol/messages/base.js +3 -0
  44. package/lib/thin/protocol/messages/index.js +5 -1
  45. package/lib/thin/protocol/messages/lobOp.js +17 -5
  46. package/lib/thin/protocol/messages/sessionRelease.js +1 -0
  47. package/lib/thin/protocol/messages/transactionChangeState.js +99 -0
  48. package/lib/thin/protocol/messages/transactionSwitch.js +139 -0
  49. package/lib/thin/protocol/messages/withData.js +21 -6
  50. package/lib/thin/protocol/protocol.js +23 -0
  51. package/lib/thin/sqlnet/connStrategy.js +9 -1
  52. package/lib/thin/sqlnet/constants.js +2 -0
  53. package/lib/thin/sqlnet/navNodes.js +14 -2
  54. package/lib/thin/sqlnet/networkSession.js +11 -10
  55. package/lib/thin/sqlnet/ntTcp.js +1 -1
  56. package/lib/thin/sqlnet/paramParser.js +87 -50
  57. package/lib/thin/sqlnet/sessionAtts.js +14 -2
  58. package/lib/thin/util.js +4 -3
  59. package/lib/traceHandler.js +133 -0
  60. package/lib/transformer.js +1 -2
  61. package/lib/types.js +1 -1
  62. package/lib/util.js +213 -35
  63. package/lib/version.js +2 -2
  64. package/package.json +1 -1
  65. package/build/Release/oracledb-6.5.1-darwin-x64.node +0 -0
  66. package/build/Release/oracledb-6.5.1-darwin-x64.node-buildinfo.txt +0 -1
  67. package/build/Release/oracledb-6.5.1-js-buildinfo.txt +0 -1
  68. package/build/Release/oracledb-6.5.1-linux-arm64.node +0 -0
  69. package/build/Release/oracledb-6.5.1-linux-arm64.node-buildinfo.txt +0 -1
  70. package/build/Release/oracledb-6.5.1-linux-x64.node +0 -0
  71. package/build/Release/oracledb-6.5.1-linux-x64.node-buildinfo.txt +0 -1
  72. package/build/Release/oracledb-6.5.1-win32-x64.node +0 -0
  73. package/build/Release/oracledb-6.5.1-win32-x64.node-buildinfo.txt +0 -1
@@ -0,0 +1,133 @@
1
+ // Copyright (c) 2024, Oracle and/or its affiliates.
2
+
3
+ //-----------------------------------------------------------------------------
4
+ //
5
+ // This software is dual-licensed to you under the Universal Permissive License
6
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8
+ // either license.
9
+ //
10
+ // If you elect to accept the software under the Apache License, Version 2.0,
11
+ // the following applies:
12
+ //
13
+ // Licensed under the Apache License, Version 2.0 (the "License");
14
+ // you may not use this file except in compliance with the License.
15
+ // You may obtain a copy of the License at
16
+ //
17
+ // https://www.apache.org/licenses/LICENSE-2.0
18
+ //
19
+ // Unless required by applicable law or agreed to in writing, software
20
+ // distributed under the License is distributed on an "AS IS" BASIS,
21
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ // See the License for the specific language governing permissions and
23
+ // limitations under the License.
24
+ //
25
+ //-----------------------------------------------------------------------------
26
+
27
+ 'use strict';
28
+
29
+ /**
30
+ * TraceHandler interface defination which application needs to implement
31
+ * the hooks defined. The hooks will be called by the driver with traceContext
32
+ * data.
33
+ *
34
+ * TraceContext Data details.
35
+ * connectLevelConfig - Connection Config details.
36
+ * protcol - tcp/tcps protocol.
37
+ * user - user/schema associated.
38
+ * instanceName - instance Name.
39
+ * pdbName - PDB name.
40
+ * serviceName - service name.
41
+ * connectString - connect string passed.
42
+ * hostName - host name.
43
+ * port - port number.
44
+ * poolMin - pool Min.
45
+ * poolMax - pool Max.
46
+ * poolIncrement - pool Increment.
47
+ *
48
+ * callLevelConfig - Post connection, call leveldetails.
49
+ * statement - SQL statement.
50
+ * values - Bind values.
51
+ *
52
+ * additionalConfig - Custom Config based on the methods executed.
53
+ * args - input arguments of function.
54
+ * self - the current instance on which function is called.
55
+ * result - the result object returned after calling function.
56
+ * implicitRelease - true if implicit release is done.
57
+ *
58
+ */
59
+
60
+ class TraceHandlerBase {
61
+
62
+ constructor() {
63
+ this._config = {};
64
+ }
65
+
66
+ // check if sending traces is enabled.
67
+ isEnabled() {
68
+ return (this._config.enable);
69
+ }
70
+
71
+ // Enable sending traces
72
+ enable() {
73
+ this._config.enable = true;
74
+ }
75
+
76
+ // Disable sending traces
77
+ disable() {
78
+ this._config.enable = false;
79
+ }
80
+
81
+ // It is called before invoking a public async method.
82
+ onEnterFn(/*traceContext*/) {
83
+ }
84
+
85
+ // It is called after invoking a public async method.
86
+ // The same traceContext object passed inside onEnterFn
87
+ // will be passed in this function.
88
+ onExitFn(/*traceContext*/) {
89
+ }
90
+
91
+ // called when a round trip is begun
92
+ // OpenTelemetry will start a new span as a child of the public API span.
93
+ onBeginRoundTrip(/*traceContext*/) {
94
+ }
95
+
96
+ // called when a round trip has ended
97
+ // OpenTelemetry will end the span
98
+ // The same traceContext object passed inside onBeginRoundTrip
99
+ // is passed here.
100
+ onEndRoundTrip(/*traceContext*/) {
101
+ }
102
+
103
+ }
104
+
105
+ // singleton object pointing to traceHandler instance.
106
+ let _currentTraceObject;
107
+
108
+ // It enables user defined implementation of
109
+ // TraceHandlerBase interface to be used.
110
+ function setTraceInstance(obj) {
111
+ _currentTraceObject = obj;
112
+ }
113
+
114
+ // It returns the user defined instance implementing the interface.
115
+ function getTraceInstance() {
116
+ return _currentTraceObject;
117
+ }
118
+
119
+ // returns if tracing is enabled.
120
+ function isEnabled() {
121
+ return _currentTraceObject?.isEnabled();
122
+ }
123
+
124
+ module.exports = {
125
+ // class
126
+ TraceHandlerBase,
127
+
128
+ // methods
129
+ setTraceInstance,
130
+ getTraceInstance,
131
+ isEnabled
132
+
133
+ };
@@ -228,8 +228,7 @@ function transformValueIn(info, value, options) {
228
228
  return value._impl;
229
229
 
230
230
  // handle vectors
231
- } else if (value instanceof Float32Array || value instanceof Float64Array ||
232
- value instanceof Int8Array) {
231
+ } else if (nodbUtil.isVectorValue(value)) {
233
232
  checkType(info, options, types.DB_TYPE_VECTOR);
234
233
  return value;
235
234
  } else if (info.type === types.DB_TYPE_VECTOR && Array.isArray(value)) {
package/lib/types.js CHANGED
@@ -112,7 +112,7 @@ function getTypeByOraTypeNum(oraTypeNum, csfrm) {
112
112
 
113
113
  const DB_TYPE_BFILE = new DbType(2020,
114
114
  "DB_TYPE_BFILE", "BFILE",
115
- { oraTypeNum: 114, bufferSizeFactor: 112 });
115
+ { oraTypeNum: 114, bufferSizeFactor: 4000 });
116
116
  const DB_TYPE_BINARY_DOUBLE = new DbType(2008,
117
117
  "DB_TYPE_BINARY_DOUBLE", "BINARY_DOUBLE",
118
118
  { oraTypeNum: 101, bufferSizeFactor: 8 });
package/lib/util.js CHANGED
@@ -32,6 +32,16 @@ const process = require('process');
32
32
  const util = require('util');
33
33
  const types = require('./types.js');
34
34
  const constants = require('./constants.js');
35
+ const traceHandler = require('./traceHandler.js');
36
+
37
+ // set of valid network characters
38
+ const validNetworkCharacterSet = new Set(['A', 'B', 'C', 'D', 'E', 'F', 'G',
39
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
40
+ 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
41
+ 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
42
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '<', '>', '/', '\\', ',',
43
+ '.', ':', ';', '\'', '"', '-', '_', '$', '+', '*', '#', '&', '!', '%', '?',
44
+ '@']);
35
45
 
36
46
  // node-oracledb version number
37
47
  let packageJSON;
@@ -54,6 +64,17 @@ const BUILD_FILE = 'oracledb.node';
54
64
  // Staging directory used by maintainers building the npm package
55
65
  const STAGING_DIR = 'package/Staging';
56
66
 
67
+ //-----------------------------------------------------------------------------
68
+ // assertParamPropNetworkName()
69
+ //
70
+ // Asserts input vaue and sanitized value passes specified condition
71
+ // -----------------------------------------------------------------------------
72
+ function assertParamPropNetworkName(obj, parameterNum, propName) {
73
+ errors.assertParamPropString(obj, parameterNum, propName);
74
+ const sanitizedValue = sanitize(obj[propName]);
75
+ errors.assertParamPropValue(obj[propName] === sanitizedValue, parameterNum, propName);
76
+ }
77
+
57
78
  // getInstallURL returns a string with installation URL
58
79
  function getInstallURL() {
59
80
  return ('Node-oracledb installation instructions: https://node-oracledb.readthedocs.io/en/latest/user_guide/installation.html');
@@ -113,6 +134,79 @@ function getInstallHelp() {
113
134
  return mesg;
114
135
  }
115
136
 
137
+ function getOperationName(methodName) {
138
+ const className = (this.constructor.name === 'Object') ? 'oracledb'
139
+ : `oracledb.${this.constructor.name}`;
140
+ return `${className}.${methodName}`;
141
+ }
142
+
143
+ // It returns an userContext after populating the traceContext with this below data.
144
+ // Operation derived from className, methodName.
145
+ // Initialize the callLevelTraceData.
146
+ // traceContext is filled.
147
+ function traceEnterFn(traceContext) {
148
+ if (!traceHandler.isEnabled()) {
149
+ return;
150
+ }
151
+
152
+ // initialize callLevel data
153
+ if (this._impl) {
154
+ this._impl._callLevelTraceData = {};
155
+ }
156
+
157
+ // fill the traceContext.
158
+ traceContext.additionalConfig = {};
159
+ traceContext.additionalConfig.self = this;
160
+ traceContext.additionalConfig.args = traceContext.args;
161
+ traceContext.operation = getOperationName.call(this, traceContext.fn.name);
162
+ traceContext.connectLevelConfig = this._impl?._getConnectTraceConfig();
163
+ traceHandler.getTraceInstance().onEnterFn(traceContext);
164
+ }
165
+
166
+ // It calls the onExitFn method providing the userContext resturned in onEnterFn.
167
+ function traceExitFn(traceContext, result, err) {
168
+ const callExitFn = traceHandler.isEnabled();
169
+ if (!callExitFn) {
170
+ return;
171
+ }
172
+
173
+ // Fill the traceContext.
174
+ if (err) {
175
+ traceContext.error = Object.assign(({}, err));
176
+ }
177
+ traceContext.additionalConfig.result = result;
178
+ if (this._impl) {
179
+ // fill function call state.
180
+ traceContext.callLevelConfig = this._impl._callLevelTraceData;
181
+ }
182
+ if (['oracledb.getConnection', 'oracledb.createPool'].includes(traceContext.operation)) {
183
+ if (err) {
184
+ if (traceContext.args && traceContext.args.length >= 1) {
185
+ // connectString and user information is populated in traceContext,
186
+ // which is useful if an error happens and connection object is not created.
187
+ const config = {};
188
+ const inp = traceContext.args[0];
189
+ config.user = inp.user || inp.username;
190
+ config.connectString = inp.connectString || inp.connectionString;
191
+ traceContext.connectLevelConfig = config;
192
+ }
193
+ } else {
194
+ traceContext.connectLevelConfig = result._impl._getConnectTraceConfig();
195
+ }
196
+ } else if (traceContext.operation === 'oracledb.Pool.getConnection') {
197
+ if (!err) {
198
+ // we update the connectTraceConfig with more values with returned conn.
199
+ traceContext.connectLevelConfig = result._impl._getConnectTraceConfig();
200
+ }
201
+ }
202
+
203
+ traceHandler.getTraceInstance().onExitFn(traceContext);
204
+ if (this._impl) {
205
+ // cleanup the function call state.
206
+ this._impl._callLevelTraceData = undefined;
207
+ }
208
+ }
209
+
116
210
  // The callbackify function is used to wrap async methods to add optional
117
211
  // callback support. If the last parameter passed to a method is a function,
118
212
  // then it is assumed that the callback pattern is being used and the promise
@@ -124,9 +218,7 @@ function callbackify(func) {
124
218
  // if last argument is not a function, simply invoke the function as usual
125
219
  // and a promise will be returned
126
220
  if (typeof arguments[arguments.length - 1] !== 'function') {
127
- return func.apply(this, arguments).catch(function stackCapture(err) {
128
- throw errors.transformErr(err, stackCapture);
129
- });
221
+ return func.apply(this, arguments);
130
222
  }
131
223
 
132
224
  // otherwise, resolve or reject the promise and invoke the callback
@@ -134,9 +226,7 @@ function callbackify(func) {
134
226
  const cb = arguments[arguments.length - 1];
135
227
  func.apply(this, args).then(function(result) {
136
228
  cb(null, result);
137
- }, function stackCapture(err) {
138
- cb(errors.transformErr(err, stackCapture));
139
- });
229
+ }, cb);
140
230
  };
141
231
  if (func.name) {
142
232
  Object.defineProperty(wrapper, 'name', { value: func.name });
@@ -144,17 +234,30 @@ function callbackify(func) {
144
234
  return wrapper;
145
235
  }
146
236
 
147
- // The serialize function is used to wrap methods to ensure that the connection
148
- // is not used concurrently by multiple threads
149
- function serialize(func) {
150
- return async function() {
237
+ // the wrapFn() function is used to wrap a single method to ensure that calls
238
+ // are serialized and that concurrent calls are prevented where that is needed;
239
+ // this method also ensures that error information is captured correctly.
240
+ // If tracing is enabled, the hooks onEnterFn and onExitFn are called after
241
+ // the input traceContext is prepared. The func is passed in traceContext
242
+ // which is filled with additional context inside onEnterFn.
243
+ function wrapFn(func, serialize, preventConcurrentErrorCode) {
244
+ const wrapper = async function wrapper() {
151
245
 
152
246
  let connImpl;
247
+ const traceEnabled = traceHandler.isEnabled();
248
+ const traceContext = {fn: func, args: arguments};
249
+
250
+ // if concurrent operations are to be prevented, check for that now
251
+ if (preventConcurrentErrorCode) {
252
+ if (this._isActive)
253
+ errors.throwErr(preventConcurrentErrorCode);
254
+ this._isActive = true;
255
+ }
153
256
 
154
257
  // determine the connection implementation associated with the object, if
155
258
  // one currently exists and acquire the "lock"; this simply checks to see
156
259
  // if another operation is in progress, and if so, waits for it to complete
157
- if (this._impl) {
260
+ if (serialize && this._impl) {
158
261
  connImpl = this._impl._getConnImpl();
159
262
  await connImpl._acquireLock();
160
263
  }
@@ -162,48 +265,54 @@ function serialize(func) {
162
265
  // call the function and ensure that the lock is "released" once the
163
266
  // function has completed -- either successfully or in failure -- but only
164
267
  // if a connection implementation is currently associated with this object
268
+ let result, tErr;
165
269
  try {
166
- return await func.apply(this, arguments);
270
+ if (traceEnabled) {
271
+ traceEnterFn.call(this, traceContext);
272
+ }
273
+ result = await traceContext.fn.apply(this, arguments);
274
+ return result;
275
+ } catch (err) {
276
+ tErr = errors.transformErr(err, wrapper);
277
+ throw tErr;
167
278
  } finally {
168
279
  if (connImpl)
169
280
  connImpl._releaseLock();
281
+ if (preventConcurrentErrorCode) {
282
+ this._isActive = false;
283
+ }
284
+ if (traceEnabled) {
285
+ traceExitFn.call(this, traceContext, result, tErr);
286
+ }
170
287
  }
171
- };
172
- }
173
288
 
174
- function preventConcurrent(func, errorCode) {
175
- return async function() {
176
- if (this._isActive)
177
- errors.throwErr(errorCode);
178
- this._isActive = true;
179
- try {
180
- return await func.apply(this, arguments);
181
- } finally {
182
- this._isActive = false;
183
- }
184
289
  };
290
+ if (func.name) {
291
+ Object.defineProperty(wrapper, 'name', { value: func.name });
292
+ }
293
+ return wrapper;
185
294
  }
186
295
 
187
296
  // The wrapFns() function is used to wrap the named methods on the prototype
188
- // in multiple ways (serialize, preventConcurrent and callbackify); the
297
+ // so that a number of common tasks can be done in a single place; the
189
298
  // arguments following the formal arguments contain the names of methods to
190
299
  // wrap on the prototype; if the first extra argument is an error code, it is
191
300
  // used to wrap to prevent concurrent access
192
301
  function wrapFns(proto) {
193
302
  let nameIndex = 1;
303
+ let serialize = true;
194
304
  let preventConcurrentErrorCode;
195
305
  if (typeof arguments[1] === 'number') {
196
- nameIndex = 2;
306
+ nameIndex++;
197
307
  preventConcurrentErrorCode = arguments[1];
308
+ } else if (typeof arguments[1] === 'boolean') {
309
+ nameIndex++;
310
+ serialize = arguments[1];
198
311
  }
199
312
  for (let i = nameIndex; i < arguments.length; i++) {
200
313
  const name = arguments[i];
201
314
  const f = proto[name];
202
- if (preventConcurrentErrorCode) {
203
- proto[name] = callbackify(preventConcurrent(serialize(f),
204
- preventConcurrentErrorCode));
205
- } else
206
- proto[name] = callbackify(serialize(f));
315
+ proto[name] = callbackify(wrapFn(f, serialize, preventConcurrentErrorCode));
207
316
  }
208
317
  }
209
318
 
@@ -277,6 +386,36 @@ function isXid(value) {
277
386
  typeof value.branchQualifier === 'string'));
278
387
  }
279
388
 
389
+ function normalizeXid(value) {
390
+ let normalizedXid;
391
+ if (Buffer.isBuffer(value.globalTransactionId) &&
392
+ Buffer.isBuffer(value.branchQualifier)) {
393
+ normalizedXid = value;
394
+ } else {
395
+ normalizedXid = {
396
+ formatId: value.formatId,
397
+ globalTransactionId: value.globalTransactionId,
398
+ branchQualifier: value.branchQualifier
399
+ };
400
+ if (typeof value.globalTransactionId === 'string') {
401
+ normalizedXid.globalTransactionId = Buffer.from(value.globalTransactionId);
402
+ }
403
+ if (typeof value.branchQualifier === 'string') {
404
+ normalizedXid.branchQualifier = Buffer.from(value.branchQualifier);
405
+ }
406
+ }
407
+ if (normalizedXid.globalTransactionId.length > 64) {
408
+ errors.throwErr(errors.ERR_INVALID_TRANSACTION_SIZE,
409
+ normalizedXid.globalTransactionId.length);
410
+ }
411
+ if (normalizedXid.branchQualifier.length > 64) {
412
+ errors.throwErr(errors.ERR_INVALID_BRANCH_SIZE,
413
+ normalizedXid.branchQualifier.length);
414
+ }
415
+
416
+ return normalizedXid;
417
+ }
418
+
280
419
  function verifySodaDoc(content) {
281
420
  if (isSodaDocument(content))
282
421
  return content._impl;
@@ -362,8 +501,9 @@ function addTypeProperties(obj, attrName) {
362
501
  // -----------------------------------------------------------------------------
363
502
  function isVectorValue(value) {
364
503
  return (value instanceof Float32Array ||
365
- value instanceof Float64Array ||
366
- value instanceof Int8Array);
504
+ value instanceof Float64Array ||
505
+ value instanceof Int8Array || (Object.getPrototypeOf(value)
506
+ === Uint8Array.prototype));
367
507
  }
368
508
 
369
509
  //-----------------------------------------------------------------------------
@@ -381,6 +521,42 @@ function makeDate(useLocal, year, month, day, hour, minute,
381
521
  fseconds) - offset * 60000);
382
522
  }
383
523
 
524
+ //---------------------------------------------------------------------------
525
+ // sanitize()
526
+ //
527
+ // this function replaces invalid characters in a string with characters
528
+ // guaranteed to be in the Network Character Set.
529
+ //---------------------------------------------------------------------------
530
+ function sanitize(text) {
531
+ let value = text.split('');
532
+
533
+ // if first character is single/double quote
534
+ if ((value[0] === '\'' || value[0] === '"')) {
535
+ value = value.splice(1);
536
+ }
537
+
538
+ // if last character is single/double quote
539
+ if ((value[value.length - 1] === '\'' || value[value.length - 1] === '"')) {
540
+ value.pop();
541
+ }
542
+
543
+ // look for invalid characters, and replace them with '?'
544
+ // in case of default values and throw an error
545
+ // for user provided values
546
+ for (let i = 0; i < value.length; i++) {
547
+ if (!validNetworkCharacterSet.has(value[i])) {
548
+ value[i] = '?';
549
+ }
550
+ }
551
+
552
+ // if last character is a backslash
553
+ if (value[value.length - 1] === '\\') {
554
+ value[value.length - 1] = '?';
555
+ }
556
+
557
+ return value.join('');
558
+ }
559
+
384
560
  // define exports
385
561
  module.exports = {
386
562
  BINARY_FILE,
@@ -389,6 +565,7 @@ module.exports = {
389
565
  RELEASE_DIR,
390
566
  STAGING_DIR,
391
567
  addTypeProperties,
568
+ assertParamPropNetworkName,
392
569
  callbackify,
393
570
  denormalizePrivateKey,
394
571
  getInstallURL,
@@ -403,9 +580,10 @@ module.exports = {
403
580
  isTokenValid,
404
581
  isVectorValue,
405
582
  isXid,
583
+ normalizeXid,
406
584
  makeDate,
407
- preventConcurrent,
408
- serialize,
585
+ sanitize,
409
586
  verifySodaDoc,
587
+ wrapFn,
410
588
  wrapFns
411
589
  };
package/lib/version.js CHANGED
@@ -30,7 +30,7 @@
30
30
 
31
31
  module.exports = {
32
32
  VERSION_MAJOR: 6,
33
- VERSION_MINOR: 5,
34
- VERSION_PATCH: 1,
33
+ VERSION_MINOR: 7,
34
+ VERSION_PATCH: 0,
35
35
  VERSION_SUFFIX: ''
36
36
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oracledb",
3
- "version": "6.5.1",
3
+ "version": "6.7.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/",
@@ -1 +0,0 @@
1
- oracledb-6.5.1-darwin-x64.node v20.11.1 572ce8bae4965b47d3554fa08a0d131acb4dc70b 077b92ae23b597c7854563e2ab4506966aa5fe40 Fri, 17 May 2024 14:57:54 GMT
@@ -1 +0,0 @@
1
- 572ce8bae4965b47d3554fa08a0d131acb4dc70b
@@ -1 +0,0 @@
1
- oracledb-6.5.1-linux-arm64.node v18.19.1 572ce8bae4965b47d3554fa08a0d131acb4dc70b 077b92ae23b597c7854563e2ab4506966aa5fe40 Fri, 17 May 2024 15:07:07 GMT
@@ -1 +0,0 @@
1
- oracledb-6.5.1-linux-x64.node v16.20.2 572ce8bae4965b47d3554fa08a0d131acb4dc70b 077b92ae23b597c7854563e2ab4506966aa5fe40 Fri, 17 May 2024 15:08:37 GMT
@@ -1 +0,0 @@
1
- oracledb-6.5.1-win32-x64.node v18.16.0 572ce8bae4965b47d3554fa08a0d131acb4dc70b 077b92ae23b597c7854563e2ab4506966aa5fe40 Fri, 17 May 2024 15:09:11 GMT