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.
- package/README.md +2 -2
- package/build/Release/oracledb-6.10.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-6.10.0-darwin-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.10.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.10.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.10.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.10.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.10.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.10.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.10.0-win32-x64.node-buildinfo.txt +1 -0
- package/lib/aqDeqOptions.js +18 -1
- package/lib/aqQueue.js +10 -6
- package/lib/connection.js +6 -2
- package/lib/dbObject.js +25 -4
- package/lib/errors.js +14 -4
- package/lib/impl/aqDeqOptions.js +10 -1
- package/lib/impl/datahandlers/buffer.js +49 -0
- package/lib/impl/datahandlers/oson.js +7 -2
- package/lib/impl/sodaDocument.js +5 -14
- package/lib/oracledb.js +23 -14
- package/lib/pool.js +187 -146
- package/lib/poolStatistics.js +1 -1
- package/lib/sodaCollection.js +12 -8
- package/lib/sodaDatabase.js +35 -8
- package/lib/sodaDocument.js +24 -6
- package/lib/sodaOperation.js +7 -6
- package/lib/thin/aq.js +475 -0
- package/lib/thin/connection.js +54 -4
- package/lib/thin/protocol/capabilities.js +3 -1
- package/lib/thin/protocol/constants.js +61 -0
- package/lib/thin/protocol/encryptDecrypt.js +2 -2
- package/lib/thin/protocol/messages/aqArray.js +238 -0
- package/lib/thin/protocol/messages/aqBase.js +305 -0
- package/lib/thin/protocol/messages/aqDeq.js +164 -0
- package/lib/thin/protocol/messages/aqEnq.js +135 -0
- package/lib/thin/protocol/messages/auth.js +12 -27
- package/lib/thin/protocol/messages/withData.js +3 -3
- package/lib/thin/protocol/packet.js +6 -5
- package/lib/thin/sqlnet/networkSession.js +1 -1
- package/lib/types.js +6 -6
- package/lib/util.js +0 -13
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/plugins/configProviders/azure/index.js +3 -0
- package/build/Release/oracledb-6.9.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-6.9.0-darwin-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.9.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.9.0-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.9.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.9.0-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.9.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-6.9.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.9.0-win32-x64.node-buildinfo.txt +0 -1
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// Copyright (c) 2025, 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
|
+
//-----------------------------------------------------------------------------
|
|
28
|
+
// aqDeq.js
|
|
29
|
+
//
|
|
30
|
+
// This file defines the messages that are sent to the database and the
|
|
31
|
+
// responses that are received by the client for dequeuing an AQ message.
|
|
32
|
+
//-----------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
'use strict';
|
|
35
|
+
|
|
36
|
+
const AqBaseMessage = require("./aqBase.js");
|
|
37
|
+
const constants = require("../constants.js");
|
|
38
|
+
|
|
39
|
+
class AqDeqMessage extends AqBaseMessage {
|
|
40
|
+
|
|
41
|
+
constructor(connImpl) {
|
|
42
|
+
super(connImpl);
|
|
43
|
+
this.functionCode = constants.TNS_FUNC_AQ_DEQ;
|
|
44
|
+
this.propsImpl = null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//--------------------------------------------------------------------------
|
|
48
|
+
// processReturnParameter()
|
|
49
|
+
//
|
|
50
|
+
// Process the return parameters of the AQ Dequeue request.
|
|
51
|
+
//--------------------------------------------------------------------------
|
|
52
|
+
processReturnParameter(buf) {
|
|
53
|
+
const numBytes = buf.readUB4();
|
|
54
|
+
if (numBytes > 0) {
|
|
55
|
+
this._processMsgProps(buf, this.propsImpl);
|
|
56
|
+
this.propsImpl.recipients = this._processRecipients(buf);
|
|
57
|
+
this.propsImpl.payload = this._processPayload(buf);
|
|
58
|
+
this.propsImpl.msgId = this._processMsgId(buf);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//--------------------------------------------------------------------------
|
|
63
|
+
// _writeMessageBody()
|
|
64
|
+
//
|
|
65
|
+
// Writes the body of the message to the buffer.
|
|
66
|
+
//--------------------------------------------------------------------------
|
|
67
|
+
encode(buf) {
|
|
68
|
+
const queueNameBytes = Buffer.from(this.queueImpl.name, 'utf-8');
|
|
69
|
+
const consumerNameBytes = this.deqOptionsImpl.consumerName ?
|
|
70
|
+
Buffer.from(this.deqOptionsImpl.consumerName, 'utf-8') : null;
|
|
71
|
+
const correlationBytes = this.deqOptionsImpl.correlation ?
|
|
72
|
+
Buffer.from(this.deqOptionsImpl.correlation, 'utf-8') : null;
|
|
73
|
+
const conditionBytes = this.deqOptionsImpl.condition ?
|
|
74
|
+
Buffer.from(this.deqOptionsImpl.condition, 'utf-8') : null;
|
|
75
|
+
let msgIdBytes = this.deqOptionsImpl.msgId ?
|
|
76
|
+
this.deqOptionsImpl.msgId.slice(0, 16) : null;
|
|
77
|
+
const deliveryMode = this.deqOptionsImpl.deliveryMode;
|
|
78
|
+
let deqFlags = 0;
|
|
79
|
+
|
|
80
|
+
if (msgIdBytes && msgIdBytes.length < 16) {
|
|
81
|
+
msgIdBytes = Buffer.concat([msgIdBytes,
|
|
82
|
+
Buffer.alloc(16 - msgIdBytes.length)]);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (deliveryMode === constants.TNS_AQ_MSG_BUFFERED) {
|
|
86
|
+
deqFlags |= constants.TNS_KPD_AQ_BUFMSG;
|
|
87
|
+
} else if (deliveryMode === constants.TNS_AQ_MSG_PERSISTENT_OR_BUFFERED) {
|
|
88
|
+
deqFlags |= constants.TNS_KPD_AQ_EITHER;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
this.writeFunctionHeader(buf);
|
|
92
|
+
buf.writeUInt8(1); // queue name (ptr)
|
|
93
|
+
buf.writeUB4(queueNameBytes.length); // queue name len
|
|
94
|
+
buf.writeUInt8(1); // message properties
|
|
95
|
+
buf.writeUInt8(1); // msg props len
|
|
96
|
+
buf.writeUInt8(1); // recipient list
|
|
97
|
+
buf.writeUInt8(1); // recipient list len
|
|
98
|
+
if (consumerNameBytes) {
|
|
99
|
+
buf.writeUInt8(1); // consumer name
|
|
100
|
+
buf.writeUB4(consumerNameBytes.length);
|
|
101
|
+
} else {
|
|
102
|
+
buf.writeUInt8(0); // consumer name
|
|
103
|
+
buf.writeUB4(0); // consumer name len
|
|
104
|
+
}
|
|
105
|
+
buf.writeSB4(this.deqOptionsImpl.mode); // dequeue mode
|
|
106
|
+
buf.writeSB4(this.deqOptionsImpl.navigation); // navigation
|
|
107
|
+
buf.writeSB4(this.deqOptionsImpl.visibility); // visibility
|
|
108
|
+
buf.writeSB4(this.deqOptionsImpl.wait); // wait
|
|
109
|
+
if (msgIdBytes) {
|
|
110
|
+
buf.writeUInt8(1); // select mesg id
|
|
111
|
+
buf.writeUB4(constants.TNS_AQ_MESSAGE_ID_LENGTH); // mesg id len
|
|
112
|
+
} else {
|
|
113
|
+
buf.writeUInt8(0); // select mesg id
|
|
114
|
+
buf.writeUB4(0); // select mesg id len
|
|
115
|
+
}
|
|
116
|
+
if (correlationBytes) {
|
|
117
|
+
buf.writeUInt8(1); // correlation id
|
|
118
|
+
buf.writeUB4(correlationBytes.length); // correlation id len
|
|
119
|
+
} else {
|
|
120
|
+
buf.writeUInt8(0); // correlation id
|
|
121
|
+
buf.writeUB4(0); // correlation id len
|
|
122
|
+
}
|
|
123
|
+
buf.writeUInt8(1); // toid of payload
|
|
124
|
+
buf.writeUB4(16); // toid len
|
|
125
|
+
buf.writeUB2(constants.TNS_AQ_MESSAGE_VERSION);
|
|
126
|
+
buf.writeUInt8(1); // payload
|
|
127
|
+
buf.writeUInt8(1); // return msg id
|
|
128
|
+
buf.writeUB4(constants.TNS_AQ_MESSAGE_ID_LENGTH);
|
|
129
|
+
buf.writeUB4(deqFlags); // dequeue flags
|
|
130
|
+
if (conditionBytes) {
|
|
131
|
+
buf.writeUInt8(1); // condition (pointer)
|
|
132
|
+
buf.writeUB4(conditionBytes.length); // condition len
|
|
133
|
+
} else {
|
|
134
|
+
buf.writeUInt8(0); // condition
|
|
135
|
+
buf.writeUB4(0); // condition len
|
|
136
|
+
}
|
|
137
|
+
buf.writeUInt8(0); // extensions
|
|
138
|
+
buf.writeUB4(0); // number of extensions
|
|
139
|
+
if (buf.caps.ttcFieldVersion >= constants.TNS_CCAP_FIELD_VERSION_20_1) {
|
|
140
|
+
buf.writeUInt8(0); // JSON payload
|
|
141
|
+
}
|
|
142
|
+
if (buf.caps.ttcFieldVersion >= constants.TNS_CCAP_FIELD_VERSION_21_1) {
|
|
143
|
+
buf.writeUB4(0xffffffff); // shard id
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
buf.writeBytesWithLength(queueNameBytes);
|
|
147
|
+
if (consumerNameBytes) {
|
|
148
|
+
buf.writeBytesWithLength(consumerNameBytes);
|
|
149
|
+
}
|
|
150
|
+
if (msgIdBytes) {
|
|
151
|
+
buf.writeBytes(msgIdBytes);
|
|
152
|
+
}
|
|
153
|
+
if (correlationBytes) {
|
|
154
|
+
buf.writeBytesWithLength(correlationBytes);
|
|
155
|
+
}
|
|
156
|
+
buf.writeBytes(this.queueImpl.payloadToid);
|
|
157
|
+
if (conditionBytes) {
|
|
158
|
+
buf.writeBytesWithLength(conditionBytes);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
module.exports = AqDeqMessage;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// Copyright (c) 2025, 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
|
+
//-----------------------------------------------------------------------------
|
|
28
|
+
// aqEnq.js
|
|
29
|
+
//
|
|
30
|
+
// This file defines the messages that are sent to the database and the
|
|
31
|
+
// responses that are received by the client for enqueuing an AQ message.
|
|
32
|
+
//-----------------------------------------------------------------------------
|
|
33
|
+
|
|
34
|
+
'use strict';
|
|
35
|
+
|
|
36
|
+
const AqBaseMessage = require("./aqBase.js");
|
|
37
|
+
const constants = require("../constants.js");
|
|
38
|
+
|
|
39
|
+
class AqEnqMessage extends AqBaseMessage {
|
|
40
|
+
|
|
41
|
+
constructor(connImpl) {
|
|
42
|
+
super(connImpl);
|
|
43
|
+
this.functionCode = constants.TNS_FUNC_AQ_ENQ;
|
|
44
|
+
this.propsImpl = null;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
//--------------------------------------------------------------------------
|
|
48
|
+
// processReturnParameter()
|
|
49
|
+
//
|
|
50
|
+
// Process the return parameters for the AQ enqueue request.
|
|
51
|
+
//--------------------------------------------------------------------------
|
|
52
|
+
processReturnParameter(buf) {
|
|
53
|
+
this.propsImpl.msgId = this._processMsgId(buf);
|
|
54
|
+
buf.skipUB2(); // extensions length
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
//--------------------------------------------------------------------------
|
|
58
|
+
// encode()
|
|
59
|
+
//
|
|
60
|
+
// Writes the body of the message to the buffer.
|
|
61
|
+
//--------------------------------------------------------------------------
|
|
62
|
+
encode(buf) {
|
|
63
|
+
const queueNameBytes = Buffer.from(this.queueImpl.name, 'utf-8');
|
|
64
|
+
let enqFlags = 0;
|
|
65
|
+
|
|
66
|
+
if (this.enqOptionsImpl.deliveryMode === constants.TNS_AQ_MSG_BUFFERED) {
|
|
67
|
+
enqFlags |= constants.TNS_KPD_AQ_BUFMSG;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
this.writeFunctionHeader(buf);
|
|
71
|
+
buf.writeUInt8(1); // queue name (ptr)
|
|
72
|
+
buf.writeUB4(queueNameBytes.length); // queue name len
|
|
73
|
+
this._writeMsgProps(buf, this.propsImpl);
|
|
74
|
+
if (!this.propsImpl.recipients) {
|
|
75
|
+
buf.writeUInt8(0); // recipients (ptr)
|
|
76
|
+
buf.writeUB4(0); // no. of key/value pairs
|
|
77
|
+
} else {
|
|
78
|
+
buf.writeUInt8(1); // recipients (ptr)
|
|
79
|
+
buf.writeUB4(3 * this.propsImpl.recipients.length);
|
|
80
|
+
}
|
|
81
|
+
buf.writeUB4(this.enqOptionsImpl.visibility);
|
|
82
|
+
buf.writeUInt8(0); // relative msg id
|
|
83
|
+
buf.writeUB4(0); // relative msg len
|
|
84
|
+
buf.writeUB4(0); // sequence deviation
|
|
85
|
+
buf.writeUInt8(1); // TOID of payload (ptr)
|
|
86
|
+
buf.writeUB4(16); // TOID of payload len
|
|
87
|
+
buf.writeUB2(constants.TNS_AQ_MESSAGE_VERSION);
|
|
88
|
+
if (this.queueImpl.isJson) {
|
|
89
|
+
buf.writeUInt8(0); // payload (ptr)
|
|
90
|
+
buf.writeUInt8(0); // RAW payload (ptr)
|
|
91
|
+
buf.writeUB4(0); // RAW payload len
|
|
92
|
+
} else if (this.queueImpl.payloadTypeClass) {
|
|
93
|
+
buf.writeUInt8(1); // payload (ptr)
|
|
94
|
+
buf.writeUInt8(0); // RAW payload (ptr)
|
|
95
|
+
buf.writeUB4(0); // RAW payload len
|
|
96
|
+
} else {
|
|
97
|
+
buf.writeUInt8(0); // payload (ptr)
|
|
98
|
+
buf.writeUInt8(1); // RAW payload (ptr)
|
|
99
|
+
buf.writeUB4(this.propsImpl.payload.length);
|
|
100
|
+
}
|
|
101
|
+
buf.writeUInt8(1); // return msg id (ptr)
|
|
102
|
+
buf.writeUB4(constants.TNS_AQ_MESSAGE_ID_LENGTH); // return msg id len
|
|
103
|
+
buf.writeUB4(enqFlags); // enqueue flags
|
|
104
|
+
buf.writeUInt8(0); // extensions 1 (ptr)
|
|
105
|
+
buf.writeUB4(0); // number of extensions 1
|
|
106
|
+
buf.writeUInt8(0); // extensions 2 (ptr)
|
|
107
|
+
buf.writeUB4(0); // number of extensions 2
|
|
108
|
+
buf.writeUInt8(0); // source sequence number
|
|
109
|
+
buf.writeUB4(0); // source sequence len
|
|
110
|
+
buf.writeUInt8(0); // max sequence number
|
|
111
|
+
buf.writeUB4(0); // max sequence len
|
|
112
|
+
buf.writeUInt8(0); // output ack len
|
|
113
|
+
buf.writeUInt8(0); // correlation (ptr)
|
|
114
|
+
buf.writeUB4(0); // correlation len
|
|
115
|
+
buf.writeUInt8(0); // sender name (ptr)
|
|
116
|
+
buf.writeUB4(0); // sender name len
|
|
117
|
+
buf.writeUInt8(0); // sender address (ptr)
|
|
118
|
+
buf.writeUB4(0); // sender address len
|
|
119
|
+
buf.writeUInt8(0); // sender charset id
|
|
120
|
+
buf.writeUInt8(0); // sender ncharset id
|
|
121
|
+
if (buf.caps.ttcFieldVersion >= constants.TNS_CCAP_FIELD_VERSION_20_1) {
|
|
122
|
+
buf.writeUInt8(this.queueImpl.isJson ? 1 : 0); // JSON payload (ptr)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
buf.writeBytesWithLength(queueNameBytes);
|
|
126
|
+
if (this.propsImpl.recipients) {
|
|
127
|
+
this._writeRecipients(buf, this.propsImpl);
|
|
128
|
+
}
|
|
129
|
+
buf.writeBytes(this.queueImpl.payloadToid);
|
|
130
|
+
this._writePayload(buf, this.propsImpl);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
module.exports = AqEnqMessage;
|
|
@@ -355,34 +355,19 @@ class AuthMessage extends Message {
|
|
|
355
355
|
}
|
|
356
356
|
if (this.functionCode === constants.TNS_FUNC_AUTH_PHASE_ONE) {
|
|
357
357
|
this.functionCode = constants.TNS_FUNC_AUTH_PHASE_TWO;
|
|
358
|
-
} else {
|
|
359
|
-
|
|
360
|
-
let
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
const fullVersionNum = Number(this.sessionData['AUTH_VERSION_NO']);
|
|
371
|
-
const versionNum = (fullVersionNum >> 24) & 0xFF;
|
|
372
|
-
this.conn.warning = this.warning;
|
|
373
|
-
if (buf.caps.ttcFieldVersion >= constants.TNS_CCAP_FIELD_VERSION_18_1_EXT_1) {
|
|
374
|
-
releaseNum = (fullVersionNum >> 16) & 0xFF;
|
|
375
|
-
updateNum = (fullVersionNum >> 12) & 0x0F;
|
|
376
|
-
portReleaseNum = (fullVersionNum >> 4) & 0xFF;
|
|
377
|
-
portUpdateNum = fullVersionNum & 0x0F;
|
|
378
|
-
} else {
|
|
379
|
-
releaseNum = (fullVersionNum >> 20) & 0x0F;
|
|
380
|
-
updateNum = (fullVersionNum >> 12) & 0xFF;
|
|
381
|
-
portReleaseNum = (fullVersionNum >> 8) & 0x0F;
|
|
382
|
-
portUpdateNum = fullVersionNum & 0xFF;
|
|
358
|
+
} else if (!this.changePassword && this.comboKey) {
|
|
359
|
+
const value = this.sessionData.AUTH_SVR_RESPONSE;
|
|
360
|
+
let response;
|
|
361
|
+
if (value) {
|
|
362
|
+
const encodedResponse = Buffer.from(value, "hex");
|
|
363
|
+
response = ED.decrypt(this.comboKey, encodedResponse);
|
|
364
|
+
}
|
|
365
|
+
if (
|
|
366
|
+
!response ||
|
|
367
|
+
!response.subarray(16, 32).equals(Buffer.from("SERVER_TO_CLIENT"))
|
|
368
|
+
) {
|
|
369
|
+
errors.throwErr(errors.ERR_INVALID_SERVER_RESPONSE);
|
|
383
370
|
}
|
|
384
|
-
this.conn.serverVersionString = versionNum + '.' + releaseNum + '.' + updateNum + '.' + portReleaseNum + '.' + portUpdateNum;
|
|
385
|
-
this.conn.serverVersion = versionNum * 100000000 + releaseNum * 1000000 + updateNum * 10000 + portReleaseNum * 100 + portUpdateNum * 1;
|
|
386
371
|
}
|
|
387
372
|
}
|
|
388
373
|
|
|
@@ -156,7 +156,6 @@ class MessageWithData extends Message {
|
|
|
156
156
|
if (statement.numQueryVars > 0) {
|
|
157
157
|
buf.skipUB1();
|
|
158
158
|
}
|
|
159
|
-
resultSet.metadata = [];
|
|
160
159
|
const metadata = [];
|
|
161
160
|
const queryVars = [];
|
|
162
161
|
for (let i = 0; i < statement.numQueryVars; i++) {
|
|
@@ -185,7 +184,7 @@ class MessageWithData extends Message {
|
|
|
185
184
|
* at end of the DescribeInfo function so that an OutOfPacketsError
|
|
186
185
|
* won't cause partial information state to be stored.
|
|
187
186
|
*/
|
|
188
|
-
resultSet.
|
|
187
|
+
resultSet.metaData = metadata;
|
|
189
188
|
statement.queryVars = queryVars;
|
|
190
189
|
this.resultSetsToSetup.push(resultSet);
|
|
191
190
|
}
|
|
@@ -236,6 +235,7 @@ class MessageWithData extends Message {
|
|
|
236
235
|
// build metadata
|
|
237
236
|
const fetchInfo = {
|
|
238
237
|
name: name,
|
|
238
|
+
dbColumnName: name,
|
|
239
239
|
dbType: types.getTypeByOraTypeNum(dataType, csfrm),
|
|
240
240
|
nullable: nullable
|
|
241
241
|
};
|
|
@@ -628,7 +628,7 @@ class MessageWithData extends Message {
|
|
|
628
628
|
}
|
|
629
629
|
await this.connection._populatePartialDbObjectTypes();
|
|
630
630
|
for (const resultSet of this.resultSetsToSetup) {
|
|
631
|
-
resultSet._setup(this.options, resultSet.
|
|
631
|
+
resultSet._setup(this.options, resultSet.metaData);
|
|
632
632
|
// LOBs always require define and they change the type that is actually
|
|
633
633
|
// returned by the server
|
|
634
634
|
for (const variable of resultSet.statement.queryVars) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c) 2022,
|
|
1
|
+
// Copyright (c) 2022, 2025, Oracle and/or its affiliates.
|
|
2
2
|
|
|
3
3
|
//-----------------------------------------------------------------------------
|
|
4
4
|
//
|
|
@@ -576,10 +576,10 @@ class WritePacket extends BaseBuffer {
|
|
|
576
576
|
* Encodes a JavaScript object into OSON and then writes it (QLocator
|
|
577
577
|
* followed by data) to the buffer.
|
|
578
578
|
*/
|
|
579
|
-
writeOson(value, osonMaxFieldSize) {
|
|
579
|
+
writeOson(value, osonMaxFieldSize, writeLength = true) {
|
|
580
580
|
const encoder = new oson.OsonEncoder();
|
|
581
581
|
const buf = encoder.encode(value, osonMaxFieldSize);
|
|
582
|
-
this.writeQLocator(buf.length);
|
|
582
|
+
this.writeQLocator(buf.length, writeLength);
|
|
583
583
|
this.writeBytesWithLength(buf);
|
|
584
584
|
}
|
|
585
585
|
|
|
@@ -604,9 +604,10 @@ class WritePacket extends BaseBuffer {
|
|
|
604
604
|
//
|
|
605
605
|
// Writes a QLocator. QLocators are always 40 bytes in length.
|
|
606
606
|
//---------------------------------------------------------------------------
|
|
607
|
-
writeQLocator(numBytes) {
|
|
607
|
+
writeQLocator(numBytes, writeLength = true) {
|
|
608
608
|
this.writeUB4(40); // QLocator length
|
|
609
|
-
|
|
609
|
+
if (writeLength)
|
|
610
|
+
this.writeUInt8(40); // repeated length
|
|
610
611
|
this.writeUInt16BE(38); // internal length
|
|
611
612
|
this.writeUInt16BE(constants.TNS_LOB_QLOCATOR_VERSION);
|
|
612
613
|
this.writeUInt8(constants.TNS_LOB_LOC_FLAGS_VALUE_BASED |
|
|
@@ -298,7 +298,6 @@ class NetworkSession {
|
|
|
298
298
|
|
|
299
299
|
/* Accepted */
|
|
300
300
|
|
|
301
|
-
this.connected = true;
|
|
302
301
|
this.cData = null;
|
|
303
302
|
this.sndDatapkt = new Packet.DataPacket(this.sAtts.largeSDU);
|
|
304
303
|
this.markerPkt = new Packet.MarkerPacket(this.sAtts.largeSDU);
|
|
@@ -319,6 +318,7 @@ class NetworkSession {
|
|
|
319
318
|
this.sndDatapkt.createPacket(constants.NSPDADAT); //Currently only used for disconnect
|
|
320
319
|
this.sndDatapkt.offset = this.sndDatapkt.dataPtr;
|
|
321
320
|
this.sndDatapkt.len = this.sndDatapkt.bufLen;
|
|
321
|
+
this.connected = true;
|
|
322
322
|
return (true);
|
|
323
323
|
}
|
|
324
324
|
|
package/lib/types.js
CHANGED
|
@@ -46,7 +46,7 @@ class DbType {
|
|
|
46
46
|
this._oraTypeNum = options.oraTypeNum || 0;
|
|
47
47
|
this._csfrm = options.csfrm || 0;
|
|
48
48
|
dbTypeByNum.set(num, this);
|
|
49
|
-
const key =
|
|
49
|
+
const key = this._csfrm * 256 + this._oraTypeNum;
|
|
50
50
|
dbTypeByOraTypeNum.set(key, this);
|
|
51
51
|
dbTypeByColumnTypeName.set(columnTypeName, this);
|
|
52
52
|
}
|
|
@@ -525,8 +525,8 @@ class IntervalYM {
|
|
|
525
525
|
errors.assertParamPropInt(obj, 1, "years");
|
|
526
526
|
errors.assertParamPropInt(obj, 1, "months");
|
|
527
527
|
}
|
|
528
|
-
this.years = obj?.years || 0;
|
|
529
528
|
this.months = obj?.months || 0;
|
|
529
|
+
this.years = obj?.years || 0;
|
|
530
530
|
}
|
|
531
531
|
}
|
|
532
532
|
|
|
@@ -540,11 +540,11 @@ class IntervalDS {
|
|
|
540
540
|
errors.assertParamPropInt(obj, 1, "seconds");
|
|
541
541
|
errors.assertParamPropInt(obj, 1, "fseconds");
|
|
542
542
|
}
|
|
543
|
-
this.days = obj?.days || 0;
|
|
544
|
-
this.hours = obj?.hours || 0;
|
|
545
|
-
this.minutes = obj?.minutes || 0;
|
|
546
|
-
this.seconds = obj?.seconds || 0;
|
|
547
543
|
this.fseconds = obj?.fseconds || 0;
|
|
544
|
+
this.seconds = obj?.seconds || 0;
|
|
545
|
+
this.minutes = obj?.minutes || 0;
|
|
546
|
+
this.hours = obj?.hours || 0;
|
|
547
|
+
this.days = obj?.days || 0;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
550
|
|
package/lib/util.js
CHANGED
|
@@ -414,10 +414,6 @@ function isAppContext(value) {
|
|
|
414
414
|
return true;
|
|
415
415
|
}
|
|
416
416
|
|
|
417
|
-
function isSodaDocument(value) {
|
|
418
|
-
return (value != null && value._sodaDocumentMarker);
|
|
419
|
-
}
|
|
420
|
-
|
|
421
417
|
function isXid(value) {
|
|
422
418
|
return (isObject(value) && Number.isInteger(value.formatId) &&
|
|
423
419
|
(Buffer.isBuffer(value.globalTransactionId) ||
|
|
@@ -484,13 +480,6 @@ function normalizeTransactionId(value) {
|
|
|
484
480
|
return normalizedTransactionId;
|
|
485
481
|
}
|
|
486
482
|
|
|
487
|
-
function verifySodaDoc(content) {
|
|
488
|
-
if (isSodaDocument(content))
|
|
489
|
-
return content._impl;
|
|
490
|
-
errors.assertParamValue(isObject(content), 1);
|
|
491
|
-
return Buffer.from(JSON.stringify(content));
|
|
492
|
-
}
|
|
493
|
-
|
|
494
483
|
function isTokenExpired(token) {
|
|
495
484
|
errors.assert(typeof token === 'string', errors.ERR_TOKEN_BASED_AUTH);
|
|
496
485
|
if (token.split('.')[1] === undefined) {
|
|
@@ -644,7 +633,6 @@ module.exports = {
|
|
|
644
633
|
isPrivilege,
|
|
645
634
|
isShardingKey,
|
|
646
635
|
isAppContext,
|
|
647
|
-
isSodaDocument,
|
|
648
636
|
isTokenExpired,
|
|
649
637
|
isTokenValid,
|
|
650
638
|
isTransactionId,
|
|
@@ -654,7 +642,6 @@ module.exports = {
|
|
|
654
642
|
normalizeXid,
|
|
655
643
|
makeDate,
|
|
656
644
|
sanitize,
|
|
657
|
-
verifySodaDoc,
|
|
658
645
|
wrapFn,
|
|
659
646
|
wrapFns,
|
|
660
647
|
isPemFile
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -128,6 +128,9 @@ class AzureProvider extends base {
|
|
|
128
128
|
//retrieve password
|
|
129
129
|
configObject.password = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'password');
|
|
130
130
|
|
|
131
|
+
// retrieve config_time_to_live
|
|
132
|
+
configObject.configTTL = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'config_time_to_live');
|
|
133
|
+
|
|
131
134
|
// retrieve wallet_location
|
|
132
135
|
configObject.walletContent = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'wallet_location');
|
|
133
136
|
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.9.0-darwin-arm64.node v23.10.0 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:23:44 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.9.0-darwin-x64.node v22.16.0 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:07:19 GMT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.9.0-linux-arm64.node v20.19.2 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:06:47 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.9.0-linux-x64.node v22.13.1 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:48:53 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-6.9.0-win32-x64.node v20.17.0 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:04:06 GMT
|