oracledb 6.9.0 → 7.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.
Files changed (100) hide show
  1. package/LICENSE.txt +1 -1
  2. package/NOTICE.txt +1 -1
  3. package/README.md +9 -9
  4. package/build/Release/oracledb-7.0.0-darwin-arm64.node +0 -0
  5. package/build/Release/oracledb-7.0.0-darwin-arm64.node-buildinfo.txt +1 -0
  6. package/build/Release/oracledb-7.0.0-js-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-7.0.0-linux-arm64.node +0 -0
  8. package/build/Release/oracledb-7.0.0-linux-arm64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-7.0.0-linux-x64.node +0 -0
  10. package/build/Release/oracledb-7.0.0-linux-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-7.0.0-win32-x64.node +0 -0
  12. package/build/Release/oracledb-7.0.0-win32-x64.node-buildinfo.txt +1 -0
  13. package/eslint.config.js +39 -0
  14. package/lib/aqDeqOptions.js +18 -1
  15. package/lib/aqQueue.js +10 -6
  16. package/lib/connection.js +418 -39
  17. package/lib/dbObject.js +25 -4
  18. package/lib/endUserSecurityContext.js +176 -0
  19. package/lib/errors.js +99 -8
  20. package/lib/impl/aqDeqOptions.js +10 -1
  21. package/lib/impl/connection.js +76 -2
  22. package/lib/impl/datahandlers/buffer.js +68 -5
  23. package/lib/impl/datahandlers/oson.js +7 -2
  24. package/lib/impl/datahandlers/vector.js +25 -5
  25. package/lib/impl/lob.js +9 -0
  26. package/lib/impl/parserHelpers.js +443 -0
  27. package/lib/impl/resultset.js +1 -1
  28. package/lib/impl/sodaDocument.js +5 -14
  29. package/lib/lob.js +27 -14
  30. package/lib/obfuscation.js +97 -0
  31. package/lib/oracledb.js +163 -49
  32. package/lib/parser.js +204 -0
  33. package/lib/pipeline.js +113 -0
  34. package/lib/pool.js +203 -147
  35. package/lib/poolStatistics.js +1 -1
  36. package/lib/resultset.js +42 -21
  37. package/lib/settings.js +1 -0
  38. package/lib/sodaCollection.js +12 -8
  39. package/lib/sodaDatabase.js +35 -8
  40. package/lib/sodaDocument.js +24 -6
  41. package/lib/sodaOperation.js +7 -6
  42. package/lib/thin/aq.js +475 -0
  43. package/lib/thin/connection.js +518 -54
  44. package/lib/thin/dbObject.js +7 -1
  45. package/lib/thin/lob.js +20 -1
  46. package/lib/thin/pool.js +42 -62
  47. package/lib/thin/protocol/capabilities.js +21 -4
  48. package/lib/thin/protocol/constants.js +143 -2
  49. package/lib/thin/protocol/encryptDecrypt.js +45 -10
  50. package/lib/thin/protocol/messages/aqArray.js +238 -0
  51. package/lib/thin/protocol/messages/aqBase.js +305 -0
  52. package/lib/thin/protocol/messages/aqDeq.js +164 -0
  53. package/lib/thin/protocol/messages/aqEnq.js +135 -0
  54. package/lib/thin/protocol/messages/auth.js +18 -28
  55. package/lib/thin/protocol/messages/base.js +245 -4
  56. package/lib/thin/protocol/messages/dataType.js +8 -3
  57. package/lib/thin/protocol/messages/directPathLoadStream.js +377 -0
  58. package/lib/thin/protocol/messages/directPathOp.js +65 -0
  59. package/lib/thin/protocol/messages/directPathPrepare.js +158 -0
  60. package/lib/thin/protocol/messages/endPipeline.js +56 -0
  61. package/lib/thin/protocol/messages/execute.js +9 -7
  62. package/lib/thin/protocol/messages/index.js +9 -1
  63. package/lib/thin/protocol/messages/protocol.js +2 -2
  64. package/lib/thin/protocol/messages/withData.js +10 -142
  65. package/lib/thin/protocol/packet.js +120 -28
  66. package/lib/thin/protocol/protocol.js +110 -25
  67. package/lib/thin/protocol/utils.js +1 -26
  68. package/lib/thin/resultSet.js +13 -19
  69. package/lib/thin/sqlnet/ezConnectResolver.js +2 -2
  70. package/lib/thin/sqlnet/networkSession.js +63 -41
  71. package/lib/thin/sqlnet/ntTcp.js +24 -0
  72. package/lib/thin/sqlnet/nvStrToNvPair.js +50 -25
  73. package/lib/thin/sqlnet/packet.js +25 -4
  74. package/lib/thin/sqlnet/paramParser.js +10 -7
  75. package/lib/thin/statementCache.js +2 -4
  76. package/lib/traceHandler.js +59 -2
  77. package/lib/transformer.js +8 -3
  78. package/lib/types.js +36 -22
  79. package/lib/util.js +6 -19
  80. package/lib/version.js +3 -3
  81. package/package/install.js +5 -5
  82. package/package/prunebinaries.js +1 -1
  83. package/package.json +1 -1
  84. package/plugins/configProviders/awsCommon.js +125 -0
  85. package/plugins/configProviders/awss3/index.js +138 -0
  86. package/plugins/configProviders/awssecretsmanager/index.js +147 -0
  87. package/plugins/configProviders/azure/index.js +7 -5
  88. package/plugins/token/extensionAzure/index.js +0 -1
  89. package/plugins/token/extensionOci/index.js +0 -1
  90. package/build/Release/oracledb-6.9.0-darwin-arm64.node +0 -0
  91. package/build/Release/oracledb-6.9.0-darwin-arm64.node-buildinfo.txt +0 -1
  92. package/build/Release/oracledb-6.9.0-darwin-x64.node +0 -0
  93. package/build/Release/oracledb-6.9.0-darwin-x64.node-buildinfo.txt +0 -1
  94. package/build/Release/oracledb-6.9.0-js-buildinfo.txt +0 -1
  95. package/build/Release/oracledb-6.9.0-linux-arm64.node +0 -0
  96. package/build/Release/oracledb-6.9.0-linux-arm64.node-buildinfo.txt +0 -1
  97. package/build/Release/oracledb-6.9.0-linux-x64.node +0 -0
  98. package/build/Release/oracledb-6.9.0-linux-x64.node-buildinfo.txt +0 -1
  99. package/build/Release/oracledb-6.9.0-win32-x64.node +0 -0
  100. package/build/Release/oracledb-6.9.0-win32-x64.node-buildinfo.txt +0 -1
@@ -0,0 +1,138 @@
1
+ // Copyright (c) 2026, Oracle and/or its affiliates.
2
+ //-----------------------------------------------------------------------------
3
+ //
4
+ // This software is dual-licensed to you under the Universal Permissive License
5
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
6
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
7
+ // either license.
8
+ //
9
+ // If you elect to accept the software under the Apache License, Version 2.0,
10
+ // the following applies:
11
+ //
12
+ // Licensed under the Apache License, Version 2.0 (the "License");
13
+ // you may not use this file except in compliance with the License.
14
+ // You may obtain a copy of the License at
15
+ //
16
+ // https://www.apache.org/licenses/LICENSE-2.0
17
+ //
18
+ // Unless required by applicable law or agreed to in writing, software
19
+ // distributed under the License is distributed on an "AS IS" BASIS,
20
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ // See the License for the specific language governing permissions and
22
+ // limitations under the License.
23
+ //
24
+ //-----------------------------------------------------------------------------
25
+
26
+ "use strict";
27
+
28
+ const util = require("node:util");
29
+ const { base } = require("../base.js");
30
+ const {
31
+ createAwsCredential,
32
+ initAwsCommon,
33
+ initAwsRequestHandler,
34
+ resolveRegion
35
+ } = require("../awsCommon.js");
36
+ const oracledb = require("oracledb");
37
+
38
+ let S3Client, GetObjectCommand;
39
+
40
+ class AWSS3Provider extends base {
41
+ constructor(provider_arg, urlExtendedPart) {
42
+ super(urlExtendedPart);
43
+ const url = new URL(provider_arg);
44
+ this._addParam("bucket", url.hostname);
45
+ this._addParam("key", url.pathname.substring(1));
46
+ }
47
+
48
+ init() {
49
+ initAwsCommon();
50
+ ({ S3Client, GetObjectCommand } = require("@aws-sdk/client-s3"));
51
+ this.requestHandler = initAwsRequestHandler(this.paramMap);
52
+ }
53
+
54
+ async dataFromStream(stream) {
55
+ const chunks = [];
56
+ return await new Promise((resolve, reject) => {
57
+ stream.on("data", (chunk) => chunks.push(chunk));
58
+ stream.on("end", () => {
59
+ try {
60
+ const data = Buffer.concat(chunks).toString("utf-8");
61
+ resolve(data);
62
+ } catch (error) {
63
+ reject(new Error(`Rejected with error: ${error.message}`));
64
+ }
65
+ });
66
+ stream.on("error", (error) => {
67
+ reject(new Error(`Stream error: ${error.message}`));
68
+ });
69
+ });
70
+ };
71
+
72
+ async returnConfig() {
73
+ const fetchRegion = await resolveRegion(this.paramMap);
74
+
75
+ this.credential = createAwsCredential(
76
+ this.paramMap,
77
+ this.requestHandler,
78
+ fetchRegion
79
+ );
80
+
81
+ const s3Client = new S3Client({
82
+ region: fetchRegion,
83
+ credentials: this.credential,
84
+ requestHandler: this.requestHandler,
85
+ });
86
+
87
+ const params = {
88
+ Bucket: this.paramMap.get("bucket"),
89
+ Key: this.paramMap.get("key"),
90
+ };
91
+
92
+ try {
93
+ const cmd = new GetObjectCommand(params);
94
+ const resp = await s3Client.send(cmd);
95
+
96
+ if (!resp.Body) {
97
+ throw new Error(`S3 response body is empty for key: ${params.Key}`);
98
+ }
99
+
100
+ const data = await this.dataFromStream(resp.Body);
101
+ return JSON.parse(data);
102
+ } catch (e) {
103
+ const errmsg = util.format(
104
+ "Failed to retrieve or parse config: %s\n%s",
105
+ e.message,
106
+ e.stack
107
+ );
108
+ throw new Error(errmsg);
109
+ } finally {
110
+ s3Client.destroy();
111
+ }
112
+ }
113
+ }
114
+
115
+ module.exports = AWSS3Provider;
116
+
117
+ async function hookFn(args) {
118
+ const configProvider = new AWSS3Provider(
119
+ args.provider_arg,
120
+ args.urlExtendedPart
121
+ );
122
+ try {
123
+ configProvider.init();
124
+ } catch (err) {
125
+ const errmsg = util.format(
126
+ "AWS Config Provider failed to load required modules: %s\n%s",
127
+ err.message,
128
+ err.stack
129
+ );
130
+ throw new Error(errmsg);
131
+ }
132
+
133
+ const cfg = await configProvider.returnConfig();
134
+ // Return config object
135
+ return [cfg, null];
136
+ }
137
+
138
+ oracledb.registerConfigurationProviderHook("awss3", hookFn);
@@ -0,0 +1,147 @@
1
+ // Copyright (c) 2026, Oracle and/or its affiliates.
2
+ //-----------------------------------------------------------------------------
3
+ //
4
+ // This software is dual-licensed to you under the Universal Permissive License
5
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
6
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
7
+ // either license.
8
+ //
9
+ // If you elect to accept the software under the Apache License, Version 2.0,
10
+ // the following applies:
11
+ //
12
+ // Licensed under the Apache License, Version 2.0 (the "License");
13
+ // you may not use this file except in compliance with the License.
14
+ // You may obtain a copy of the License at
15
+ //
16
+ // https://www.apache.org/licenses/LICENSE-2.0
17
+ //
18
+ // Unless required by applicable law or agreed to in writing, software
19
+ // distributed under the License is distributed on an "AS IS" BASIS,
20
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21
+ // See the License for the specific language governing permissions and
22
+ // limitations under the License.
23
+ //
24
+ //-----------------------------------------------------------------------------
25
+
26
+ "use strict";
27
+
28
+ const util = require("node:util");
29
+ const { base } = require("../base.js");
30
+ const {
31
+ createAwsCredential,
32
+ initAwsCommon,
33
+ initAwsRequestHandler,
34
+ resolveRegion
35
+ } = require("../awsCommon.js");
36
+ const oracledb = require("oracledb");
37
+
38
+ let SecretsManagerClient, GetSecretValueCommand;
39
+
40
+ class AWSSecretsManagerProvider extends base {
41
+ constructor(provider_arg, urlExtendedPart) {
42
+ super(urlExtendedPart);
43
+ if (provider_arg) {
44
+ this._addParam("secretname", provider_arg);
45
+ }
46
+ }
47
+
48
+ init() {
49
+ initAwsCommon();
50
+ ({ SecretsManagerClient, GetSecretValueCommand } = require("@aws-sdk/client-secrets-manager"));
51
+ this.requestHandler = initAwsRequestHandler(this.paramMap);
52
+ }
53
+
54
+ resolveSecretString(response) {
55
+ let secretString = response.SecretString;
56
+ if (!secretString && response.SecretBinary) {
57
+ secretString = Buffer.from(response.SecretBinary, "base64").toString(
58
+ "utf-8"
59
+ );
60
+ }
61
+
62
+ if (!secretString) {
63
+ throw new Error("Secret payload is empty");
64
+ }
65
+
66
+ return secretString;
67
+ }
68
+
69
+ async returnConfig() {
70
+ const fetchRegion = await resolveRegion(this.paramMap);
71
+
72
+ this.credential = createAwsCredential(
73
+ this.paramMap,
74
+ this.requestHandler,
75
+ fetchRegion
76
+ );
77
+
78
+ const secretsManagerClient = new SecretsManagerClient({
79
+ region: fetchRegion,
80
+ credentials: this.credential,
81
+ requestHandler: this.requestHandler,
82
+ });
83
+
84
+ const secretIdentifier = this.paramMap.get("secretname");
85
+ if (!secretIdentifier) {
86
+ throw new Error(
87
+ "Secret identifier not provided for AWS Secrets Manager ConfigProvider."
88
+ );
89
+ }
90
+
91
+ const input = {
92
+ SecretId: secretIdentifier,
93
+ };
94
+
95
+ const versionId = this.paramMap.get("versionid");
96
+ if (versionId) {
97
+ input.VersionId = versionId;
98
+ }
99
+
100
+ try {
101
+ const command = new GetSecretValueCommand(input);
102
+ const response = await secretsManagerClient.send(command);
103
+
104
+ const secretString = this.resolveSecretString(response);
105
+
106
+ try {
107
+ return JSON.parse(secretString);
108
+ } catch {
109
+ return secretString;
110
+ }
111
+ } catch (e) {
112
+ throw new Error(
113
+ `Failed to retrieve configuration from AWS Secrets Manager: ${e.message}`
114
+ );
115
+ } finally {
116
+ secretsManagerClient.destroy();
117
+ }
118
+ }
119
+ }
120
+
121
+
122
+ async function hookFn(args) {
123
+ const configProvider = new AWSSecretsManagerProvider(
124
+ args.provider_arg,
125
+ args.urlExtendedPart
126
+ );
127
+
128
+ if (args.paramMap) {
129
+ configProvider.paramMap = args.paramMap;
130
+ }
131
+
132
+ try {
133
+ configProvider.init();
134
+ } catch (err) {
135
+ const errmsg = util.format(
136
+ "AWS Secrets Manager Config Provider failed to load required modules: %s\n%s",
137
+ err.message,
138
+ err.stack
139
+ );
140
+ throw new Error(errmsg);
141
+ }
142
+
143
+ const cfg = await configProvider.returnConfig();
144
+ return [cfg, null];
145
+ }
146
+
147
+ oracledb.registerConfigurationProviderHook("awssecretsmanager", hookFn);
@@ -29,6 +29,7 @@ let ClientSecretCredential, ClientCertificateCredential, ChainedTokenCredential,
29
29
  const util = require('node:util');
30
30
  const { base } = require("../base.js");
31
31
  const oracledb = require('oracledb');
32
+
32
33
  class AzureProvider extends base {
33
34
  constructor(provider_arg, urlExtendedPart) {
34
35
  super(urlExtendedPart);
@@ -96,7 +97,7 @@ class AzureProvider extends base {
96
97
  return credential;
97
98
  }
98
99
  async returnConfig() {
99
- const configObject = {};
100
+ let configObject = {};
100
101
  const label = this.paramMap.get("label");
101
102
  try {
102
103
  this.credential = await this.returnAzureCredential();
@@ -115,10 +116,8 @@ class AzureProvider extends base {
115
116
  const params = (await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'njs'));
116
117
  if (params) {
117
118
  const obj = JSON.parse(params);
118
- for (const key in obj) {
119
- var val = obj[key];
120
- configObject[key] = val;
121
- }
119
+ const spreadNjs = { ...obj };
120
+ configObject = { ...configObject, ...spreadNjs };
122
121
  } else {
123
122
  configObject['njs'] = null;
124
123
  }
@@ -128,6 +127,9 @@ class AzureProvider extends base {
128
127
  //retrieve password
129
128
  configObject.password = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'password');
130
129
 
130
+ // retrieve config_time_to_live
131
+ configObject.configTTL = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'config_time_to_live');
132
+
131
133
  // retrieve wallet_location
132
134
  configObject.walletContent = await this.retrieveParamValueFromAzureConfigurationProvider(client, label, 'wallet_location');
133
135
 
@@ -91,7 +91,6 @@ async function servicePrincipalCredentials(params) {
91
91
 
92
92
  function hookFn(options) {
93
93
  if (options.tokenAuthConfigAzure) {
94
- // eslint-disable-next-line no-unused-vars
95
94
  options.accessToken = async function callbackFn(refresh, config) {
96
95
  return await getToken(config);
97
96
  };
@@ -200,7 +200,6 @@ async function instancePrincipalAuthentication(accessTokenConfig) {
200
200
  //---------------------------------------------------------------------------
201
201
  function hookFn(options) {
202
202
  if (options.tokenAuthConfigOci) {
203
- // eslint-disable-next-line no-unused-vars
204
203
  options.accessToken = async function callbackFn(refresh, config) {
205
204
  return await getToken(config);
206
205
  };
@@ -1 +0,0 @@
1
- oracledb-6.9.0-darwin-arm64.node v23.10.0 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:23:44 GMT
@@ -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
@@ -1 +0,0 @@
1
- oracledb-6.9.0-linux-arm64.node v20.19.2 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:06:47 GMT
@@ -1 +0,0 @@
1
- oracledb-6.9.0-linux-x64.node v22.13.1 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:48:53 GMT
@@ -1 +0,0 @@
1
- oracledb-6.9.0-win32-x64.node v20.17.0 2eb94e8660458ba0f6a59a00ebaa1d65e380cbd9 9cbfa993c59da0cfba2baa65e1c51fc0216bf586 Tue, 15 Jul 2025 11:04:06 GMT