oracledb 5.5.0 → 6.0.1
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/CHANGELOG.md +1 -1875
- package/LICENSE.txt +8 -222
- package/NOTICE.txt +1 -1
- package/README.md +38 -30
- package/SECURITY.md +38 -0
- package/build/Release/oracledb-6.0.1-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.0.1-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.1-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.1-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.0.1-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.1-linux-x64.node +0 -0
- package/build/Release/oracledb-6.0.1-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.1-win32-x64.node +0 -0
- package/build/Release/oracledb-6.0.1-win32-x64.node-buildinfo.txt +1 -0
- package/examples/README.md +113 -0
- package/examples/dbconfig.js +100 -0
- package/examples/example.js +156 -0
- package/index.js +26 -0
- package/lib/aqDeqOptions.js +148 -8
- package/lib/aqEnqOptions.js +59 -7
- package/lib/aqMessage.js +118 -7
- package/lib/aqQueue.js +243 -53
- package/lib/connection.js +1326 -465
- package/lib/constants.js +203 -0
- package/lib/dbObject.js +346 -32
- package/lib/errors.js +785 -0
- package/lib/impl/aqDeqOptions.js +197 -0
- package/lib/impl/aqEnqOptions.js +89 -0
- package/lib/impl/aqMessage.js +134 -0
- package/lib/impl/aqQueue.js +81 -0
- package/lib/impl/connection.js +529 -0
- package/lib/impl/dbObject.js +159 -0
- package/lib/impl/index.js +59 -0
- package/lib/impl/lob.js +85 -0
- package/lib/impl/pool.js +195 -0
- package/lib/impl/resultset.js +223 -0
- package/lib/impl/sodaCollection.js +174 -0
- package/lib/impl/sodaDatabase.js +81 -0
- package/lib/impl/sodaDocCursor.js +63 -0
- package/lib/impl/sodaDocument.js +98 -0
- package/lib/impl/sodaOperation.js +109 -0
- package/lib/lob.js +157 -68
- package/lib/oracledb.js +1047 -345
- package/lib/pool.js +654 -465
- package/lib/poolStatistics.js +24 -9
- package/lib/queryStream.js +16 -8
- package/lib/resultset.js +291 -183
- package/lib/settings.js +191 -0
- package/lib/sodaCollection.js +214 -201
- package/lib/sodaDatabase.js +108 -71
- package/lib/sodaDocCursor.js +44 -32
- package/lib/sodaDocument.js +76 -14
- package/lib/sodaOperation.js +131 -118
- package/lib/thin/connection.js +1043 -0
- package/lib/thin/dbObject.js +630 -0
- package/lib/thin/index.js +40 -0
- package/lib/thin/lob.js +189 -0
- package/lib/thin/pool.js +481 -0
- package/lib/thin/protocol/buffer.js +1043 -0
- package/lib/thin/protocol/capabilities.js +121 -0
- package/lib/thin/protocol/constants.js +765 -0
- package/lib/thin/protocol/encryptDecrypt.js +185 -0
- package/lib/thin/protocol/messages/auth.js +349 -0
- package/lib/thin/protocol/messages/base.js +476 -0
- package/lib/thin/protocol/messages/commit.js +56 -0
- package/lib/thin/protocol/messages/dataType.js +391 -0
- package/lib/thin/protocol/messages/execute.js +312 -0
- package/lib/thin/protocol/messages/fetch.js +60 -0
- package/lib/thin/protocol/messages/index.js +53 -0
- package/lib/thin/protocol/messages/lobOp.js +201 -0
- package/lib/thin/protocol/messages/logOff.js +53 -0
- package/lib/thin/protocol/messages/ping.js +56 -0
- package/lib/thin/protocol/messages/protocol.js +78 -0
- package/lib/thin/protocol/messages/rollback.js +56 -0
- package/lib/thin/protocol/messages/sessionRelease.js +60 -0
- package/lib/thin/protocol/messages/withData.js +812 -0
- package/lib/thin/protocol/oson.js +661 -0
- package/lib/thin/protocol/packet.js +519 -0
- package/lib/thin/protocol/protocol.js +202 -0
- package/lib/thin/protocol/utils.js +89 -0
- package/lib/thin/resultSet.js +122 -0
- package/lib/thin/sqlnet/connStrategy.js +175 -0
- package/lib/thin/sqlnet/constants.js +199 -0
- package/lib/thin/sqlnet/ezConnectResolver.js +488 -0
- package/lib/thin/sqlnet/navNodes.js +870 -0
- package/lib/thin/sqlnet/networkSession.js +621 -0
- package/lib/thin/sqlnet/ntTcp.js +527 -0
- package/lib/thin/sqlnet/nvStrToNvPair.js +783 -0
- package/lib/thin/sqlnet/packet.js +405 -0
- package/lib/thin/sqlnet/paramParser.js +206 -0
- package/lib/thin/sqlnet/sessionAtts.js +160 -0
- package/lib/thin/statement.js +300 -0
- package/lib/thin/util.js +289 -0
- package/lib/transformer.js +252 -0
- package/lib/types.js +357 -0
- package/lib/util.js +196 -110
- package/lib/version.js +36 -0
- package/package/README.md +33 -30
- package/package/install.js +89 -64
- package/package/prunebinaries.js +60 -12
- package/package.json +3 -3
- package/build/Release/oracledb-5.5.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-5.5.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-5.5.0-linux-x64.node +0 -0
- package/build/Release/oracledb-5.5.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-5.5.0-win32-x64.node +0 -0
- package/build/Release/oracledb-5.5.0-win32-x64.node-buildinfo.txt +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright (c) 2022, 2023, 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
|
+
const Message = require("./base.js");
|
|
30
|
+
const constants = require("../constants.js");
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Executes a Ping RPC function
|
|
34
|
+
*
|
|
35
|
+
* @class PingMessage
|
|
36
|
+
* @extends {Message}
|
|
37
|
+
*/
|
|
38
|
+
class PingMessage extends Message {
|
|
39
|
+
|
|
40
|
+
constructor(connImpl) {
|
|
41
|
+
super(connImpl);
|
|
42
|
+
this.functionCode = constants.TNS_FUNC_PING;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//-------------------------------------------------------------------------
|
|
46
|
+
// encode()
|
|
47
|
+
//
|
|
48
|
+
// Write the RPC to Ping the database
|
|
49
|
+
//-------------------------------------------------------------------------
|
|
50
|
+
encode(buf) {
|
|
51
|
+
this.writeFunctionHeader(buf);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = PingMessage;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
// Copyright (c) 2022, 2023, 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
|
+
const constants = require("../constants.js");
|
|
30
|
+
const Message = require("./base.js");
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Executes a Protocol Negotiation RPC function
|
|
34
|
+
*
|
|
35
|
+
* @class ProtocolMessage
|
|
36
|
+
* @extends {Message}
|
|
37
|
+
*/
|
|
38
|
+
class ProtocolMessage extends Message {
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Serializes the ProtocolMessage function arguments
|
|
42
|
+
*
|
|
43
|
+
* @param {object} buf input arguments
|
|
44
|
+
*/
|
|
45
|
+
encode(buf) {
|
|
46
|
+
buf.writeUInt8(constants.TNS_MSG_TYPE_PROTOCOL);
|
|
47
|
+
buf.writeUInt8(6); // protocol version (8.1+)
|
|
48
|
+
buf.writeUInt8(0); // "array" terminator
|
|
49
|
+
buf.writeStr("node-oracledb"); // unique name for driver
|
|
50
|
+
buf.writeUInt8(0);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
decode(buf) {
|
|
54
|
+
let message_type = buf.readUInt8();
|
|
55
|
+
if (message_type === constants.TNS_MSG_TYPE_PROTOCOL) {
|
|
56
|
+
buf.skipBytes(2); // skip protocol array
|
|
57
|
+
let x = buf.readUInt8();
|
|
58
|
+
while (x !== 0) { // skip server banner
|
|
59
|
+
x = buf.readUInt8();
|
|
60
|
+
}
|
|
61
|
+
buf.skipBytes(2); // character set ID
|
|
62
|
+
buf.skipUB1(1); // skip server flags
|
|
63
|
+
let num_elem = buf.readUInt16LE();
|
|
64
|
+
if (num_elem > 0) { // skip elements
|
|
65
|
+
buf.skipBytes(num_elem * 5);
|
|
66
|
+
}
|
|
67
|
+
let fdoLen = buf.readUInt16BE();
|
|
68
|
+
let fdo = buf.readBytes(fdoLen);
|
|
69
|
+
let ix = 6 + fdo[5] + fdo[6];
|
|
70
|
+
buf.caps.nCharsetId = (fdo[ix + 3] << 8) + fdo[ix + 4];
|
|
71
|
+
buf.caps.adjustForServerCompileCaps(buf.readBytesWithLength());
|
|
72
|
+
buf.caps.adjustForServerRuntimeCaps(buf.readBytesWithLength());
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
module.exports = ProtocolMessage;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Copyright (c) 2022, 2023, 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
|
+
const Message = require("./base.js");
|
|
30
|
+
const constants = require("../constants.js");
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Executes Rollback RPC
|
|
34
|
+
*
|
|
35
|
+
* @class RollbackeMessage
|
|
36
|
+
* @extends {Message}
|
|
37
|
+
*/
|
|
38
|
+
class RollbackMessage extends Message {
|
|
39
|
+
|
|
40
|
+
constructor(connImpl) {
|
|
41
|
+
super(connImpl);
|
|
42
|
+
this.functionCode = constants.TNS_FUNC_ROLLBACK;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//-------------------------------------------------------------------------
|
|
46
|
+
// encode()
|
|
47
|
+
//
|
|
48
|
+
// Write the RPC to perform Rollback operation in the database
|
|
49
|
+
//-------------------------------------------------------------------------
|
|
50
|
+
encode(buf) {
|
|
51
|
+
this.writeFunctionHeader(buf);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
module.exports = RollbackMessage;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// Copyright (c) 2022, 2023, 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
|
+
const Message = require("./base.js");
|
|
30
|
+
const constants = require("../constants.js");
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Executes Session Release RPC
|
|
34
|
+
*
|
|
35
|
+
* @class SessionReleaseMessage
|
|
36
|
+
* @extends {Message}
|
|
37
|
+
*/
|
|
38
|
+
class SessionReleaseMessage extends Message {
|
|
39
|
+
|
|
40
|
+
constructor(connImpl) {
|
|
41
|
+
super(connImpl);
|
|
42
|
+
this.functionCode = constants.TNS_FUNC_SESSION_RELEASE;
|
|
43
|
+
this.messageType = constants.TNS_MSG_TYPE_ONEWAY_FN;
|
|
44
|
+
this.sessReleaseMode = 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
encode(buf) {
|
|
48
|
+
this.writeFunctionHeader(buf);
|
|
49
|
+
buf.writeUInt8(0); // pointer (tag name)
|
|
50
|
+
buf.writeUInt8(0); // tag name length
|
|
51
|
+
buf.writeUB4(this.sessReleaseMode);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
decode() {
|
|
55
|
+
// pass:
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
module.exports = SessionReleaseMessage;
|