oracledb 5.4.0 → 6.0.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/CHANGELOG.md +1 -1849
- package/LICENSE.txt +8 -222
- package/NOTICE.txt +1 -1
- package/README.md +38 -30
- package/SECURITY.md +38 -0
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/build/Release/oracledb-6.0.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-6.0.0-darwin-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-6.0.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.0-linux-x64.node +0 -0
- package/build/Release/oracledb-6.0.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-6.0.0-win32-x64.node +0 -0
- package/build/Release/oracledb-6.0.0-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 +146 -7
- package/lib/aqEnqOptions.js +59 -7
- package/lib/aqMessage.js +118 -7
- package/lib/aqQueue.js +242 -53
- package/lib/connection.js +1324 -465
- package/lib/constants.js +203 -0
- package/lib/dbObject.js +346 -32
- package/lib/errors.js +781 -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 +156 -68
- package/lib/oracledb.js +1051 -257
- package/lib/pool.js +654 -465
- package/lib/poolStatistics.js +23 -9
- package/lib/queryStream.js +14 -7
- package/lib/resultset.js +292 -171
- package/lib/settings.js +191 -0
- package/lib/sodaCollection.js +214 -201
- package/lib/sodaDatabase.js +107 -71
- package/lib/sodaDocCursor.js +44 -32
- package/lib/sodaDocument.js +76 -14
- package/lib/sodaOperation.js +131 -118
- package/lib/thin/connection.js +1038 -0
- package/lib/thin/dbObject.js +629 -0
- package/lib/thin/index.js +40 -0
- package/lib/thin/lob.js +188 -0
- package/lib/thin/pool.js +481 -0
- package/lib/thin/protocol/buffer.js +1040 -0
- package/lib/thin/protocol/capabilities.js +116 -0
- package/lib/thin/protocol/constants.js +764 -0
- package/lib/thin/protocol/encryptDecrypt.js +185 -0
- package/lib/thin/protocol/messages/auth.js +348 -0
- package/lib/thin/protocol/messages/base.js +475 -0
- package/lib/thin/protocol/messages/commit.js +56 -0
- package/lib/thin/protocol/messages/dataType.js +382 -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 +200 -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 +811 -0
- package/lib/thin/protocol/oson.js +660 -0
- package/lib/thin/protocol/packet.js +520 -0
- package/lib/thin/protocol/protocol.js +202 -0
- package/lib/thin/protocol/utils.js +88 -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 +620 -0
- package/lib/thin/sqlnet/ntTcp.js +525 -0
- package/lib/thin/sqlnet/nvStrToNvPair.js +783 -0
- package/lib/thin/sqlnet/packet.js +405 -0
- package/lib/thin/sqlnet/paramParser.js +205 -0
- package/lib/thin/sqlnet/sessionAtts.js +160 -0
- package/lib/thin/statement.js +301 -0
- package/lib/thin/util.js +289 -0
- package/lib/transformer.js +250 -0
- package/lib/types.js +357 -0
- package/lib/util.js +194 -108
- 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.4.0-darwin-x64.node +0 -0
- package/build/Release/oracledb-5.4.0-darwin-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-5.4.0-linux-x64.node +0 -0
- package/build/Release/oracledb-5.4.0-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-5.4.0-win32-x64.node +0 -0
- package/build/Release/oracledb-5.4.0-win32-x64.node-buildinfo.txt +0 -1
|
@@ -0,0 +1,116 @@
|
|
|
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 Buffer = require("buffer").Buffer;
|
|
30
|
+
const constants = require("./constants.js");
|
|
31
|
+
const errors = require('../../errors');
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Negotiates Compiletime and Runtime capabilities
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
class Capabilities {
|
|
38
|
+
|
|
39
|
+
constructor(protocolVersion) {
|
|
40
|
+
this.protocolVersion = protocolVersion;
|
|
41
|
+
this.ttcFieldVersion = constants.TNS_CCAP_FIELD_VERSION_MAX;
|
|
42
|
+
this.supports12cLogon = true;
|
|
43
|
+
this.supportsOob = false;
|
|
44
|
+
this.nCharsetId = constants.TNS_CHARSET_UTF16;
|
|
45
|
+
this.compileCaps = Buffer.alloc(constants.TNS_CCAP_MAX);
|
|
46
|
+
this.runtimeCaps = Buffer.alloc(constants.TNS_RCAP_MAX);
|
|
47
|
+
this.initCompileCaps();
|
|
48
|
+
this.initRuntimeCaps();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
adjustForServerCompileCaps(serverCaps) {
|
|
52
|
+
if (serverCaps[constants.TNS_CCAP_FIELD_VERSION] < this.ttcFieldVersion) {
|
|
53
|
+
this.ttcFieldVersion = serverCaps[constants.TNS_CCAP_FIELD_VERSION];
|
|
54
|
+
this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] =
|
|
55
|
+
this.ttcFieldVersion;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
adjustForServerRuntimeCaps() {
|
|
60
|
+
// nothing to do currently
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
initCompileCaps() {
|
|
64
|
+
this.compileCaps[constants.TNS_CCAP_SQL_VERSION] =
|
|
65
|
+
constants.TNS_CCAP_SQL_VERSION_MAX;
|
|
66
|
+
this.compileCaps[constants.TNS_CCAP_LOGON_TYPES] =
|
|
67
|
+
constants.TNS_CCAP_O5LOGON | constants.TNS_CCAP_O5LOGON_NP |
|
|
68
|
+
constants.TNS_CCAP_O7LOGON | constants.TNS_CCAP_O8LOGON_LONG_IDENTIFIER |
|
|
69
|
+
constants.TNS_CCAP_O9LOGON_LONG_PASSWORD;
|
|
70
|
+
this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] = this.ttcFieldVersion;
|
|
71
|
+
this.compileCaps[constants.TNS_CCAP_SERVER_DEFINE_CONV] = 1;
|
|
72
|
+
this.compileCaps[constants.TNS_CCAP_TTC1] =
|
|
73
|
+
constants.TNS_CCAP_FAST_BVEC | constants.TNS_CCAP_END_OF_CALL_STATUS |
|
|
74
|
+
constants.TNS_CCAP_IND_RCD;
|
|
75
|
+
this.compileCaps[constants.TNS_CCAP_OCI1] =
|
|
76
|
+
constants.TNS_CCAP_FAST_SESSION_PROPAGATE |
|
|
77
|
+
constants.TNS_CCAP_APP_CTX_PIGGYBACK;
|
|
78
|
+
this.compileCaps[constants.TNS_CCAP_TDS_VERSION] =
|
|
79
|
+
constants.TNS_CCAP_TDS_VERSION_MAX;
|
|
80
|
+
this.compileCaps[constants.TNS_CCAP_RPC_VERSION] =
|
|
81
|
+
constants.TNS_CCAP_RPC_VERSION_MAX;
|
|
82
|
+
this.compileCaps[constants.TNS_CCAP_RPC_SIG] =
|
|
83
|
+
constants.TNS_CCAP_RPC_SIG_VALUE;
|
|
84
|
+
this.compileCaps[constants.TNS_CCAP_DBF_VERSION] =
|
|
85
|
+
constants.TNS_CCAP_DBF_VERSION_MAX;
|
|
86
|
+
this.compileCaps[constants.TNS_CCAP_LOB] =
|
|
87
|
+
constants.TNS_CCAP_LOB_UB8_SIZE | constants.TNS_CCAP_LOB_ENCS | constants.TNS_CCAP_LOB_PREFETCH;
|
|
88
|
+
this.compileCaps[constants.TNS_CCAP_UB2_DTY] = 1;
|
|
89
|
+
this.compileCaps[constants.TNS_CCAP_LOB2] =
|
|
90
|
+
constants.TNS_CCAP_LOB2_QUASI | constants.TNS_CCAP_LOB2_2GB_PREFETCH;
|
|
91
|
+
this.compileCaps[constants.TNS_CCAP_TTC3] =
|
|
92
|
+
constants.TNS_CCAP_IMPLICIT_RESULTS | constants.TNS_CCAP_BIG_CHUNK_CLR |
|
|
93
|
+
constants.TNS_CCAP_KEEP_OUT_ORDER;
|
|
94
|
+
this.compileCaps[constants.TNS_CCAP_TTC2] = constants.TNS_CCAP_ZLNP;
|
|
95
|
+
this.compileCaps[constants.TNS_CCAP_OCI2] = constants.TNS_CCAP_DRCP;
|
|
96
|
+
this.compileCaps[constants.TNS_CCAP_CLIENT_FN] =
|
|
97
|
+
constants.TNS_CCAP_CLIENT_FN_MAX;
|
|
98
|
+
this.compileCaps[constants.TNS_CCAP_TTC4] =
|
|
99
|
+
constants.TNS_CCAP_INBAND_NOTIFICATION;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
initRuntimeCaps() {
|
|
103
|
+
this.runtimeCaps[constants.TNS_RCAP_COMPAT] = constants.TNS_RCAP_COMPAT_81;
|
|
104
|
+
this.runtimeCaps[constants.TNS_RCAP_TTC] =
|
|
105
|
+
constants.TNS_RCAP_TTC_ZERO_COPY | constants.TNS_RCAP_TTC_32K;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
checkNCharsetId() {
|
|
109
|
+
if (this.nCharsetId !== constants.TNS_CHARSET_UTF16) {
|
|
110
|
+
errors.throwErr(errors.ERR_NCHAR_CS_NOT_SUPPORTED, this.nCharsetId);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
module.exports = Capabilities;
|