Skip to content

Commit 4ec0993

Browse files
committed
Code update to the settable parameters and bug fixes
1 parent bbb8980 commit 4ec0993

File tree

5 files changed

+18
-13
lines changed

5 files changed

+18
-13
lines changed

doc/src/user_guide/connection_handling.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4498,7 +4498,7 @@ in node-oracledb to access the information stored in OCI Object Storage. The
44984498
:meth:`oracledb.createPool()` should be a URL such as::
44994499
45004500
config-ociobject://<objectstorage-name>/n/<namespaceName>/b/<bucketName>/o/
4501-
<objectName>[/c/<networkServiceName>][?<option1>=<value1>&<option2>=<value2>...]
4501+
<objectName>[?key=<networkServiceName>&<option1>=<value1>&<option2>=<value2>...]
45024502
45034503
The parameters of the connection string are detailed in the table below.
45044504
@@ -4515,7 +4515,7 @@ The parameters of the connection string are detailed in the table below.
45154515
* - ``config-ociobject``
45164516
- Required
45174517
- Indicates that the configuration provider is OCI Object Storage.
4518-
* - ``<server-name>``
4518+
* - ``<objectstorage-name>``
45194519
- Required
45204520
- The URL of OCI Object Storage endpoint.
45214521
* - ``<namespaceName>``
@@ -4527,7 +4527,7 @@ The parameters of the connection string are detailed in the table below.
45274527
* - ``<objectName>``
45284528
- Required
45294529
- The JSON file name.
4530-
* - ``<networkServiceName>``
4530+
* - ``key=<networkServiceName>``
45314531
- Optional
45324532
- The network service name or alias if the JSON file contains one or more network service names.
45334533
* - ``<options>`` and ``<values>``

lib/thin/protocol/messages/base.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ class Message {
296296
this._writeCurrentSchemaPiggyback(buf);
297297
}
298298
if (this.connection.statementCache._cursorsToClose.size > 0 && !this.connection._drcpEstablishSession) {
299+
// skip closing cursors when '_drcpEstablishSession = true' Since we don't know whether the same session
300+
// is in use. We can not send the information across until after the session information has been returned
301+
// (on the first round trip).
299302
this.writeCloseCursorsPiggyBack(buf);
300303
}
301304
if (

lib/thin/protocol/messages/sessionRelease.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class SessionReleaseMessage extends Message {
4545
}
4646

4747
encode(buf) {
48+
this.writePiggybacks(buf);
4849
this.writeFunctionHeader(buf);
4950
buf.writeUInt8(0); // pointer (tag name)
5051
buf.writeUInt8(0); // tag name length

lib/thin/sqlnet/networkSession.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class NetworkSession {
199199
* Establish network session .Make transport level connection, send NSPTCN(connect packet) and read the response.
200200
* @returns NetError.(connection successfully established(NetError.CONNECTED) or reason for failure)
201201
*/
202-
async connect2(address) {
202+
async connect2(address, userConfig) {
203203
/* Sanitise SDU */
204204
if (this.sAtts.sdu) {
205205
if (this.sAtts.sdu > constants.NSPABSSDULN) {
@@ -269,7 +269,7 @@ class NetworkSession {
269269
redirConnData = this.cData;
270270
}
271271

272-
const redirAddressNode = await resolveAddress(adrStr);
272+
const redirAddressNode = await resolveAddress(adrStr, userConfig);
273273
const host = address.hostname;
274274
address = await redirAddressNode.execute();
275275
if (address.desc)
@@ -314,10 +314,10 @@ class NetworkSession {
314314
do {
315315
try {
316316
if (this.sAtts.connectTimeout) {
317-
const asyncPromise = this.connect2(address);
317+
const asyncPromise = this.connect2(address, userConfig);
318318
connected = await timeout(asyncPromise, this.sAtts.connectTimeout, "connectTimeout", address, this.sAtts.connectionId);
319319
} else {
320-
connected = await this.connect2(address);
320+
connected = await this.connect2(address, userConfig);
321321
}
322322
} catch (err) {
323323
if (err.message.startsWith('NJS-510') && !this.ntAdapter.connected) {

lib/util.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ const constants = require('./constants.js');
3535
const traceHandler = require('./traceHandler.js');
3636

3737
// set of valid network characters
38-
const validNetworkCharacterSet = new Set(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
39-
'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
40-
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
41-
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
42-
'4', '5', '6', '7', '8', '9', '0', '<', '>', '/', '\\', ',', '.', ':', ';', '\'',
43-
'"', '-', '_', '$', '+', '*', '#', '&', '!', '%', '?', '@']);
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+
'@']);
4445

4546
// node-oracledb version number
4647
let packageJSON;

0 commit comments

Comments
 (0)