oracledb 5.5.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 -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.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 +1047 -345
- package/lib/pool.js +654 -465
- package/lib/poolStatistics.js +23 -9
- package/lib/queryStream.js +14 -7
- package/lib/resultset.js +291 -183
- 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 -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
package/package/install.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
/* Copyright (c) 2017,
|
|
1
|
+
/* Copyright (c) 2017, 2023, Oracle and/or its affiliates. */
|
|
2
2
|
|
|
3
3
|
/******************************************************************************
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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 https://www.apache.org/licenses/LICENSE-2.0. You may choose
|
|
8
|
+
* either license.
|
|
7
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.
|
|
8
15
|
* You may obtain a copy of the License at
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
10
16
|
*
|
|
11
|
-
*
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
13
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
14
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.
|
|
15
22
|
* See the License for the specific language governing permissions and
|
|
16
23
|
* limitations under the License.
|
|
17
24
|
*
|
|
@@ -20,10 +27,12 @@
|
|
|
20
27
|
*
|
|
21
28
|
* DESCRIPTION
|
|
22
29
|
* This script is included in the npm bundle of node-oracledb. It
|
|
23
|
-
* is invoked by package.json during npm install
|
|
30
|
+
* is invoked by package.json during npm install to check the viability
|
|
31
|
+
* of the installation.
|
|
24
32
|
*
|
|
25
33
|
* MAINTENANCE NOTES
|
|
26
|
-
* This file should only ever 'require' packages included in core Node.js
|
|
34
|
+
* This file should only ever 'require' packages included in core Node.js
|
|
35
|
+
* or that are part of node-oracledb.
|
|
27
36
|
*
|
|
28
37
|
*****************************************************************************/
|
|
29
38
|
|
|
@@ -31,6 +40,12 @@
|
|
|
31
40
|
|
|
32
41
|
const fs = require('fs');
|
|
33
42
|
const nodbUtil = require('../lib/util.js');
|
|
43
|
+
const errors = require('../lib/errors.js');
|
|
44
|
+
const constants = require('../lib/constants.js');
|
|
45
|
+
|
|
46
|
+
let installUrl = constants.DEFAULT_ERROR_URL;
|
|
47
|
+
let arch;
|
|
48
|
+
let thickModeErrMsg;
|
|
34
49
|
|
|
35
50
|
// Log standard output with an 'oracledb' prefix
|
|
36
51
|
function log(message) { // eslint-disable-line
|
|
@@ -46,67 +61,77 @@ function error(message) { // eslint-disable-line
|
|
|
46
61
|
console.error.apply(console, args);
|
|
47
62
|
}
|
|
48
63
|
|
|
49
|
-
//
|
|
50
|
-
function
|
|
51
|
-
|
|
64
|
+
// Log warnings. It combines 'oracledb' with a stylized 'WARN' prefix
|
|
65
|
+
function warn(message) { // eslint-disable-line
|
|
66
|
+
const args = Array.from(arguments);
|
|
67
|
+
args.unshift('oracledb \x1b[31mWARN!\x1b[0m');
|
|
68
|
+
console.error.apply(console, args);
|
|
69
|
+
}
|
|
52
70
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
71
|
+
// This version of node-oracledb works with Node.js 14.6 or later.
|
|
72
|
+
// Note: the checked version is the minimum required for Node-API
|
|
73
|
+
// compatibility. When new Node.js versions are released, older Node.js
|
|
74
|
+
// versions are dropped from the node-oracledb test plan.
|
|
75
|
+
//
|
|
76
|
+
// Keep this code in sync with lib/oracledb.js
|
|
77
|
+
function checkVersion() {
|
|
78
|
+
const vs = process.version.substring(1).split(".").map(Number);
|
|
79
|
+
errors.assert(vs[0] > 14 || (vs[0] === 14 && vs[1] >= 6),
|
|
80
|
+
errors.ERR_NODE_TOO_OLD, nodbUtil.PACKAGE_JSON_VERSION, "14.6");
|
|
81
|
+
}
|
|
63
82
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
83
|
+
// Check for the binary node-oracledb module needed for "Thick mode".
|
|
84
|
+
// If one isn't available, only Thin mode can be used.
|
|
85
|
+
function checkThickMode() {
|
|
86
|
+
try {
|
|
87
|
+
fs.statSync(nodbUtil.RELEASE_DIR + '/' + nodbUtil.BINARY_FILE);
|
|
88
|
+
} catch (err) {
|
|
89
|
+
errors.throwErr(errors.ERR_NO_BINARY_AVAILABLE, process.platform + ' ' + process.arch);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
69
92
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
93
|
+
try {
|
|
94
|
+
checkVersion();
|
|
95
|
+
} catch (err) {
|
|
96
|
+
// This version of Node.js is too old
|
|
97
|
+
error(err.message);
|
|
98
|
+
error('An older node-oracledb version may work with Node.js ' + process.version);
|
|
99
|
+
process.exit(87);
|
|
100
|
+
}
|
|
77
101
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
log('** - Follow the installation instructions:');
|
|
84
|
-
log('** ' + installUrl);
|
|
85
|
-
log('********************************************************************************\n');
|
|
86
|
-
}
|
|
102
|
+
try {
|
|
103
|
+
checkThickMode();
|
|
104
|
+
} catch (err) {
|
|
105
|
+
// No Thick mode binary was found for this platform
|
|
106
|
+
thickModeErrMsg = err.message;
|
|
87
107
|
}
|
|
88
108
|
|
|
89
|
-
//
|
|
90
|
-
// and 10.16 (and 12.0) contain an important Node-API performance regression fix.
|
|
91
|
-
// Note that the checked versions are the minimum required for Node-API
|
|
92
|
-
// compatibility; as new Node.js versions are released, older Node.js versions
|
|
93
|
-
// are dropped from the node-oracledb test plan. For example, the obsolete
|
|
94
|
-
// Node.js 9 and 11 versions are not tested.
|
|
109
|
+
// Successfully installed
|
|
95
110
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
}
|
|
111
|
+
if (process.arch === 'x64' || process.arch === 'arm64') {
|
|
112
|
+
arch = '64-bit';
|
|
113
|
+
} else {
|
|
114
|
+
arch = '32-bit';
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (process.platform === 'linux') {
|
|
118
|
+
installUrl += '#node-oracledb-installation-on-linux';
|
|
119
|
+
} else if (process.platform === 'darwin') {
|
|
120
|
+
installUrl += '#node-oracledb-installation-on-apple-macos-intel-x86';
|
|
121
|
+
} else if (process.platform === 'win32') {
|
|
122
|
+
installUrl += '#node-oracledb-installation-on-microsoft-windowsstallation';
|
|
110
123
|
}
|
|
111
124
|
|
|
112
|
-
|
|
125
|
+
log('********************************************************************************');
|
|
126
|
+
log('** Node-oracledb ' + nodbUtil.PACKAGE_JSON_VERSION + ' installed in Node.js ' + process.versions.node + ' (' + process.platform + ', ' + process.arch + ')');
|
|
127
|
+
log('** To use node-oracledb in Thin mode, no additional steps are needed.');
|
|
128
|
+
if (thickModeErrMsg) {
|
|
129
|
+
warn(thickModeErrMsg);
|
|
130
|
+
warn('If you want to use the optional Thick mode, compile node-oracledb code using');
|
|
131
|
+
warn(installUrl + '#github');
|
|
132
|
+
} else {
|
|
133
|
+
log('** To use the optional Thick mode, the Oracle Client libraries (' + arch + ')');
|
|
134
|
+
log('** must be available, see the installation instructions:');
|
|
135
|
+
log('** ' + installUrl);
|
|
136
|
+
}
|
|
137
|
+
log('********************************************************************************\n');
|
package/package/prunebinaries.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
/* Copyright (c) 2019,
|
|
1
|
+
/* Copyright (c) 2019, 2023, Oracle and/or its affiliates. */
|
|
2
2
|
|
|
3
3
|
/******************************************************************************
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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 https://www.apache.org/licenses/LICENSE-2.0. You may choose
|
|
8
|
+
* either license.
|
|
7
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.
|
|
8
15
|
* You may obtain a copy of the License at
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
10
16
|
*
|
|
11
|
-
*
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
13
|
-
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* https://www.apache.org/licenses/LICENSE-2.0
|
|
14
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.
|
|
15
22
|
* See the License for the specific language governing permissions and
|
|
16
23
|
* limitations under the License.
|
|
17
24
|
*
|
|
@@ -25,7 +32,11 @@
|
|
|
25
32
|
* USAGE
|
|
26
33
|
* Invoke this from the top level directory.
|
|
27
34
|
* After an 'npm install oracledb' installs pre-built binaries, this file
|
|
28
|
-
* can be run with 'npm run prune'.
|
|
35
|
+
* can be run with 'npm run prune [all]'.
|
|
36
|
+
* 'npm run prune' will keep only the binary files for the platform where
|
|
37
|
+
* the application using node-oracledb is being run.
|
|
38
|
+
* Passing the optional 'all' parameter deletes all binary files, so that
|
|
39
|
+
* only Thin mode will be available.
|
|
29
40
|
*
|
|
30
41
|
*****************************************************************************/
|
|
31
42
|
|
|
@@ -34,17 +45,54 @@
|
|
|
34
45
|
const fs = require('fs');
|
|
35
46
|
const nodbUtil = require('../lib/util.js');
|
|
36
47
|
|
|
37
|
-
const dir = nodbUtil.RELEASE_DIR;
|
|
48
|
+
const dir = nodbUtil.RELEASE_DIR; // contains the binaries
|
|
38
49
|
|
|
39
50
|
let re = new RegExp(nodbUtil.BINARY_FILE);
|
|
40
51
|
|
|
41
52
|
try {
|
|
42
53
|
let f = fs.readdirSync(dir);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
let opt = process.argv[2];
|
|
55
|
+
|
|
56
|
+
if (opt) {
|
|
57
|
+
// 'npm run prune <option>' is called
|
|
58
|
+
if (opt.toLowerCase() === 'all') {
|
|
59
|
+
// Remove all the binaries in nodbUtil.RELEASE_DIR
|
|
60
|
+
for (let i = 0; i < f.length; i++) {
|
|
61
|
+
removeFileorDir(dir + '/' + f[i]);
|
|
62
|
+
}
|
|
63
|
+
} else {
|
|
64
|
+
// Invalid option
|
|
65
|
+
throw new Error('Invalid Command option: ' + `'${opt}'. Usage 'npm run prune [all]'`);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
// 'npm run prune' is called
|
|
69
|
+
for (let i = 0; i < f.length; i++) {
|
|
70
|
+
if (!f[i].match(re) && (f[i].match(/oracledb.*\.node(-buildinfo.txt)*/))) {
|
|
71
|
+
fs.unlinkSync(dir + '/' + f[i]);
|
|
72
|
+
}
|
|
46
73
|
}
|
|
47
74
|
}
|
|
48
75
|
} catch (err) {
|
|
49
76
|
console.error(err.message);
|
|
50
77
|
}
|
|
78
|
+
|
|
79
|
+
async function removeFileorDir(fileOrDirPath) {
|
|
80
|
+
try {
|
|
81
|
+
const isDir = fs.statSync(fileOrDirPath).isDirectory();
|
|
82
|
+
if (isDir) {
|
|
83
|
+
// Remove the directory and its files recursively
|
|
84
|
+
// Use fs.promises for Node.js versions 14.6-14.13,
|
|
85
|
+
// which do not support fs.rmSync()
|
|
86
|
+
const vs = process.version.substring(1).split(".").map(Number);
|
|
87
|
+
if (vs[0] > 14 || (vs[0] === 14 && vs[1] >= 14))
|
|
88
|
+
fs.rmSync(fileOrDirPath, { recursive: true, force: true });
|
|
89
|
+
else
|
|
90
|
+
await fs.promises.rmdir(fileOrDirPath, { recursive: true, force: true });
|
|
91
|
+
} else {
|
|
92
|
+
// Remove the file or the symlink synchronously
|
|
93
|
+
fs.unlinkSync(fileOrDirPath);
|
|
94
|
+
}
|
|
95
|
+
} catch (err) {
|
|
96
|
+
throw new Error('Invalid File or Directory: ' + `'${fileOrDirPath}'`);
|
|
97
|
+
}
|
|
98
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oracledb",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "A Node.js module for Oracle Database access from JavaScript and TypeScript",
|
|
5
|
-
"license": "Apache-2.0",
|
|
5
|
+
"license": "(Apache-2.0 OR UPL-1.0)",
|
|
6
6
|
"homepage": "http://oracle.github.io/node-oracledb/",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"Oracle",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"prune": "node package/prunebinaries.js"
|
|
35
35
|
},
|
|
36
36
|
"engines": {
|
|
37
|
-
"node": ">=
|
|
37
|
+
"node": ">=14.6"
|
|
38
38
|
},
|
|
39
39
|
"maintainers": [
|
|
40
40
|
{
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-5.5.0-darwin-x64.node v18.8.0 6bbe60772e67967e524cedb23c8e501fd8d18cf0 1b40d66d5375522445b9a05a2243317057ef11c3 Wed, 07 Sep 2022 08:36:54 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-5.5.0-linux-x64.node v10.23.1 6bbe60772e67967e524cedb23c8e501fd8d18cf0 1b40d66d5375522445b9a05a2243317057ef11c3 Wed, 07 Sep 2022 08:40:30 GMT
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
oracledb-5.5.0-win32-x64.node v18.8.0 77dd8c6c2822588ae3996f1c810f97bcab25b954 1b40d66d5375522445b9a05a2243317057ef11c3 Wed, 07 Sep 2022 07:01:17 GMT
|