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,121 @@
|
|
|
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');
|
|
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
|
+
this.maxStringSize = 0;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
adjustForServerCompileCaps(serverCaps) {
|
|
53
|
+
if (serverCaps[constants.TNS_CCAP_FIELD_VERSION] < this.ttcFieldVersion) {
|
|
54
|
+
this.ttcFieldVersion = serverCaps[constants.TNS_CCAP_FIELD_VERSION];
|
|
55
|
+
this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] =
|
|
56
|
+
this.ttcFieldVersion;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
adjustForServerRuntimeCaps(serverCaps) {
|
|
61
|
+
if (serverCaps[constants.TNS_RCAP_TTC] & constants.TNS_RCAP_TTC_32K) {
|
|
62
|
+
this.maxStringSize = 32767;
|
|
63
|
+
} else {
|
|
64
|
+
this.maxStringSize = 4000;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
initCompileCaps() {
|
|
69
|
+
this.compileCaps[constants.TNS_CCAP_SQL_VERSION] =
|
|
70
|
+
constants.TNS_CCAP_SQL_VERSION_MAX;
|
|
71
|
+
this.compileCaps[constants.TNS_CCAP_LOGON_TYPES] =
|
|
72
|
+
constants.TNS_CCAP_O5LOGON | constants.TNS_CCAP_O5LOGON_NP |
|
|
73
|
+
constants.TNS_CCAP_O7LOGON | constants.TNS_CCAP_O8LOGON_LONG_IDENTIFIER |
|
|
74
|
+
constants.TNS_CCAP_O9LOGON_LONG_PASSWORD;
|
|
75
|
+
this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] = this.ttcFieldVersion;
|
|
76
|
+
this.compileCaps[constants.TNS_CCAP_SERVER_DEFINE_CONV] = 1;
|
|
77
|
+
this.compileCaps[constants.TNS_CCAP_TTC1] =
|
|
78
|
+
constants.TNS_CCAP_FAST_BVEC | constants.TNS_CCAP_END_OF_CALL_STATUS |
|
|
79
|
+
constants.TNS_CCAP_IND_RCD;
|
|
80
|
+
this.compileCaps[constants.TNS_CCAP_OCI1] =
|
|
81
|
+
constants.TNS_CCAP_FAST_SESSION_PROPAGATE |
|
|
82
|
+
constants.TNS_CCAP_APP_CTX_PIGGYBACK;
|
|
83
|
+
this.compileCaps[constants.TNS_CCAP_TDS_VERSION] =
|
|
84
|
+
constants.TNS_CCAP_TDS_VERSION_MAX;
|
|
85
|
+
this.compileCaps[constants.TNS_CCAP_RPC_VERSION] =
|
|
86
|
+
constants.TNS_CCAP_RPC_VERSION_MAX;
|
|
87
|
+
this.compileCaps[constants.TNS_CCAP_RPC_SIG] =
|
|
88
|
+
constants.TNS_CCAP_RPC_SIG_VALUE;
|
|
89
|
+
this.compileCaps[constants.TNS_CCAP_DBF_VERSION] =
|
|
90
|
+
constants.TNS_CCAP_DBF_VERSION_MAX;
|
|
91
|
+
this.compileCaps[constants.TNS_CCAP_LOB] =
|
|
92
|
+
constants.TNS_CCAP_LOB_UB8_SIZE | constants.TNS_CCAP_LOB_ENCS | constants.TNS_CCAP_LOB_PREFETCH;
|
|
93
|
+
this.compileCaps[constants.TNS_CCAP_UB2_DTY] = 1;
|
|
94
|
+
this.compileCaps[constants.TNS_CCAP_LOB2] =
|
|
95
|
+
constants.TNS_CCAP_LOB2_QUASI | constants.TNS_CCAP_LOB2_2GB_PREFETCH;
|
|
96
|
+
this.compileCaps[constants.TNS_CCAP_TTC3] =
|
|
97
|
+
constants.TNS_CCAP_IMPLICIT_RESULTS | constants.TNS_CCAP_BIG_CHUNK_CLR |
|
|
98
|
+
constants.TNS_CCAP_KEEP_OUT_ORDER;
|
|
99
|
+
this.compileCaps[constants.TNS_CCAP_TTC2] = constants.TNS_CCAP_ZLNP;
|
|
100
|
+
this.compileCaps[constants.TNS_CCAP_OCI2] = constants.TNS_CCAP_DRCP;
|
|
101
|
+
this.compileCaps[constants.TNS_CCAP_CLIENT_FN] =
|
|
102
|
+
constants.TNS_CCAP_CLIENT_FN_MAX;
|
|
103
|
+
this.compileCaps[constants.TNS_CCAP_TTC4] =
|
|
104
|
+
constants.TNS_CCAP_INBAND_NOTIFICATION;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
initRuntimeCaps() {
|
|
108
|
+
this.runtimeCaps[constants.TNS_RCAP_COMPAT] = constants.TNS_RCAP_COMPAT_81;
|
|
109
|
+
this.runtimeCaps[constants.TNS_RCAP_TTC] =
|
|
110
|
+
constants.TNS_RCAP_TTC_ZERO_COPY | constants.TNS_RCAP_TTC_32K;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
checkNCharsetId() {
|
|
114
|
+
if (this.nCharsetId !== constants.TNS_CHARSET_UTF16) {
|
|
115
|
+
errors.throwErr(errors.ERR_NCHAR_CS_NOT_SUPPORTED, this.nCharsetId);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
module.exports = Capabilities;
|