oracledb 7.0.1 → 26.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/README.md +16 -6
- package/build/Release/oracledb-26.0.0-darwin-arm64.node +0 -0
- package/build/Release/oracledb-26.0.0-darwin-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-26.0.0-js-buildinfo.txt +1 -0
- package/build/Release/oracledb-26.0.0-linux-arm64.node +0 -0
- package/build/Release/oracledb-26.0.0-linux-arm64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-26.0.0-linux-x64.node +0 -0
- package/build/Release/oracledb-26.0.0-linux-x64.node-buildinfo.txt +1 -0
- package/build/Release/oracledb-26.0.0-win32-x64.node +0 -0
- package/build/Release/oracledb-26.0.0-win32-x64.node-buildinfo.txt +1 -0
- package/lib/connection.js +71 -8
- package/lib/constants.js +4 -0
- package/lib/endUserSecurityContext.js +20 -8
- package/lib/errors.js +70 -5
- package/lib/impl/connection.js +36 -0
- package/lib/impl/datahandlers/buffer.js +91 -18
- package/lib/impl/datahandlers/oson.js +3 -2
- package/lib/impl/resultset.js +32 -11
- package/lib/oracledb.js +34 -0
- package/lib/pool.js +6 -2
- package/lib/queryStream.js +13 -5
- package/lib/resultset.js +10 -3
- package/lib/securityContextProvider.js +206 -0
- package/lib/thin/aq.js +2 -3
- package/lib/thin/connection.js +381 -19
- package/lib/thin/dbObject.js +17 -8
- package/lib/thin/pool.js +3 -2
- package/lib/thin/protocol/capabilities.js +37 -4
- package/lib/thin/protocol/constants.js +49 -1
- package/lib/thin/protocol/messages/auth.js +17 -6
- package/lib/thin/protocol/messages/base.js +74 -16
- package/lib/thin/protocol/messages/dataType.js +46 -0
- package/lib/thin/protocol/messages/directPathLoadStream.js +3 -2
- package/lib/thin/protocol/messages/execute.js +10 -4
- package/lib/thin/protocol/messages/index.js +4 -0
- package/lib/thin/protocol/messages/notification.js +281 -0
- package/lib/thin/protocol/messages/subscribe.js +181 -0
- package/lib/thin/protocol/messages/withData.js +21 -7
- package/lib/thin/protocol/packet.js +2 -4
- package/lib/thin/protocol/protocol.js +7 -4
- package/lib/thin/resultSet.js +40 -20
- package/lib/thin/sqlnet/ezConnectResolver.js +7 -0
- package/lib/thin/sqlnet/navNodes.js +3 -3
- package/lib/thin/sqlnet/ntTcp.js +24 -8
- package/lib/thin/statement.js +6 -1
- package/lib/thin/statementCache.js +34 -6
- package/lib/thin/subscr.js +363 -0
- package/lib/transformer.js +60 -17
- package/lib/util.js +46 -8
- package/lib/version.js +2 -2
- package/package.json +1 -1
- package/plugins/configProviders/gcpstorage/index.js +121 -0
- package/plugins/configProviders/ociobject/index.js +1 -1
- package/plugins/token/cache.js +154 -0
- package/plugins/token/endUserSecurityProvider/index.js +377 -0
- package/plugins/token/extensionAzure/index.js +160 -28
- package/plugins/token/extensionOci/index.js +221 -16
- package/plugins/vectorsdk/OracleVecDB.js +346 -0
- package/plugins/vectorsdk/index.js +49 -0
- package/plugins/vectorsdk/utils.js +370 -0
- package/plugins/vectorsdk/vectorEmbedding.js +223 -0
- package/plugins/vectorsdk/vectorIndex.js +177 -0
- package/plugins/vectorsdk/vectorRecords.js +406 -0
- package/plugins/vectorsdk/vectorSchema.js +408 -0
- package/plugins/vectorsdk/vectorSearch.js +538 -0
- package/build/Release/oracledb-7.0.1-darwin-arm64.node +0 -0
- package/build/Release/oracledb-7.0.1-darwin-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.1-js-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.1-linux-arm64.node +0 -0
- package/build/Release/oracledb-7.0.1-linux-arm64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.1-linux-x64.node +0 -0
- package/build/Release/oracledb-7.0.1-linux-x64.node-buildinfo.txt +0 -1
- package/build/Release/oracledb-7.0.1-win32-x64.node +0 -0
- package/build/Release/oracledb-7.0.1-win32-x64.node-buildinfo.txt +0 -1
package/README.md
CHANGED
|
@@ -1,22 +1,30 @@
|
|
|
1
|
-
# node-oracledb version
|
|
1
|
+
# node-oracledb version 26.0.0 <img src="https://img.shields.io/npm/v/oracledb.svg" alt="oracledb"/> <img src="https://img.shields.io/npm/dm/oracledb.svg" alt="oracledb"/>
|
|
2
2
|
|
|
3
3
|
The node-oracledb add-on for Node.js powers high performance Oracle Database
|
|
4
4
|
applications. Applications can be written in TypeScript, or directly in
|
|
5
5
|
JavaScript.
|
|
6
6
|
|
|
7
|
-
Use node-oracledb
|
|
7
|
+
Use node-oracledb 26.0.0 to connect Node.js 14.17, or later, to Oracle
|
|
8
8
|
Database. Older versions of node-oracledb may work with older versions of
|
|
9
9
|
Node.js.
|
|
10
10
|
|
|
11
11
|
Node-oracledb supports basic and advanced features of Oracle Database
|
|
12
|
-
and Oracle Client. See the [homepage][4] for a list.
|
|
12
|
+
and Oracle Client. See the [homepage][4] for a list. It is used by many
|
|
13
|
+
JavaScript and TypeScript frameworks, SQL generators, ORMs, and libraries.
|
|
14
|
+
|
|
15
|
+
Node-oracledb has a rich feature set which is easy to use. It gives you
|
|
16
|
+
control over SQL and PL/SQL statement execution, fast data ingestion, support
|
|
17
|
+
for calling NoSQL-style document APIs, message queueing,database notifications
|
|
18
|
+
and for starting and stopping the database.
|
|
19
|
+
It also has high availability and security features. Database operations
|
|
20
|
+
can optionally be [pipelined][16].
|
|
13
21
|
|
|
14
22
|
The node-oracledb module is open source and maintained by Oracle Corp.
|
|
15
23
|
It is stable, well documented, and has a comprehensive test suite.
|
|
16
24
|
|
|
17
25
|
## Installation
|
|
18
26
|
|
|
19
|
-
Run `npm install oracledb
|
|
27
|
+
Run `npm install oracledb`.
|
|
20
28
|
|
|
21
29
|
See [Getting Started with Node-oracledb][1] and [Quick Start Node-oracledb Installation][2].
|
|
22
30
|
|
|
@@ -40,7 +48,8 @@ See [Getting Started with Node-oracledb][1] and [Quick Start Node-oracledb Insta
|
|
|
40
48
|
available when optional Oracle Client libraries are loaded by
|
|
41
49
|
node-oracledb. Libraries are available in the free [Oracle Instant
|
|
42
50
|
Client][15] packages. Node-oracledb can use Oracle Client libraries version
|
|
43
|
-
19
|
|
51
|
+
19 or later. Older node-oracledb versions supported older Client
|
|
52
|
+
versions.
|
|
44
53
|
|
|
45
54
|
- Oracle Database
|
|
46
55
|
|
|
@@ -118,4 +127,5 @@ limitations under the License.
|
|
|
118
127
|
[12]: https://github.com/oracle/node-oracledb/blob/main/CONTRIBUTING.md
|
|
119
128
|
[13]: https://github.com/oracle/node-oracledb/blob/main/SECURITY.md
|
|
120
129
|
[14]: https://www.npmjs.com/package/oracledb
|
|
121
|
-
[15]: https://www.oracle.com/database/technologies/instant-client.html
|
|
130
|
+
[15]: https://www.oracle.com/database/technologies/instant-client.html
|
|
131
|
+
[16]: https://node-oracledb.readthedocs.io/en/latest/user_guide/pipeline.html
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-26.0.0-darwin-arm64.node v24.11.1 fdba9345f92e83a5f0e66f01a5953ecfc358e053 1c8cabceb27b2e7a64737fb3de66f3d0014eed5f Mon, 28 Sep 2026 10:55:10 GMT
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fdba9345f92e83a5f0e66f01a5953ecfc358e053
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-26.0.0-linux-arm64.node v24.19.0 fdba9345f92e83a5f0e66f01a5953ecfc358e053 1c8cabceb27b2e7a64737fb3de66f3d0014eed5f Mon, 28 Sep 2026 10:49:51 GMT
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-26.0.0-linux-x64.node v22.19.0 fdba9345f92e83a5f0e66f01a5953ecfc358e053 1c8cabceb27b2e7a64737fb3de66f3d0014eed5f Mon, 28 Sep 2026 10:48:56 GMT
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
oracledb-26.0.0-win32-x64.node v22.17.1 fdba9345f92e83a5f0e66f01a5953ecfc358e053 1c8cabceb27b2e7a64737fb3de66f3d0014eed5f Mon, 28 Sep 2026 10:54:04 GMT
|
package/lib/connection.js
CHANGED
|
@@ -55,6 +55,19 @@ const APP_CONTEXT_VALUE_MAX_BYTES = 4 * 1000;
|
|
|
55
55
|
// and destroyed with another!
|
|
56
56
|
const _subscriptions = new Map();
|
|
57
57
|
|
|
58
|
+
//---------------------------------------------------------------------------
|
|
59
|
+
// _removeSubscription()
|
|
60
|
+
//
|
|
61
|
+
// Remove a subscription only when it is still the subscription currently
|
|
62
|
+
// registered for the name. A terminal old subscription must not remove a newer
|
|
63
|
+
// subscription that reused the same name.
|
|
64
|
+
//---------------------------------------------------------------------------
|
|
65
|
+
function _removeSubscription(name, subscription) {
|
|
66
|
+
if (_subscriptions.get(name) === subscription) {
|
|
67
|
+
_subscriptions.delete(name);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
58
71
|
// default closure for NUMBER type.
|
|
59
72
|
const defaultNumberConverter = (v) => (v === null) ? null : parseFloat(v);
|
|
60
73
|
|
|
@@ -904,6 +917,23 @@ class Connection extends EventEmitter {
|
|
|
904
917
|
this._impl.setCurrentSchema(value);
|
|
905
918
|
}
|
|
906
919
|
|
|
920
|
+
//---------------------------------------------------------------------------
|
|
921
|
+
// databaseOpenTelemetryTracing
|
|
922
|
+
//
|
|
923
|
+
// Property for enabling database OpenTelemetry trace propagation.
|
|
924
|
+
//---------------------------------------------------------------------------
|
|
925
|
+
get databaseOpenTelemetryTracing() {
|
|
926
|
+
if (this._impl)
|
|
927
|
+
return this._impl.getDatabaseOpenTelemetryTracing();
|
|
928
|
+
return undefined;
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
set databaseOpenTelemetryTracing(value) {
|
|
932
|
+
errors.assertPropValue(typeof value === 'boolean', "databaseOpenTelemetryTracing");
|
|
933
|
+
errors.assert(this._impl, errors.ERR_INVALID_CONNECTION);
|
|
934
|
+
this._impl.setDatabaseOpenTelemetryTracing(value);
|
|
935
|
+
}
|
|
936
|
+
|
|
907
937
|
//---------------------------------------------------------------------------
|
|
908
938
|
// dbOp
|
|
909
939
|
//
|
|
@@ -1405,7 +1435,7 @@ class Connection extends EventEmitter {
|
|
|
1405
1435
|
errors.assertArgCount(arguments, 1, 1);
|
|
1406
1436
|
errors.assertParamValue(typeof sql === 'string', 1);
|
|
1407
1437
|
errors.assert(this._impl, errors.ERR_INVALID_CONNECTION);
|
|
1408
|
-
const info = await this._impl.getStatementInfo(sql);
|
|
1438
|
+
const info = await this._impl.getStatementInfo(sql, { connection: this });
|
|
1409
1439
|
if (info.metaData) {
|
|
1410
1440
|
for (let i = 0; i < info.metaData.length; i++) {
|
|
1411
1441
|
const m = info.metaData[i];
|
|
@@ -1563,6 +1593,21 @@ class Connection extends EventEmitter {
|
|
|
1563
1593
|
return this._impl && this._impl.getTransactionInProgress();
|
|
1564
1594
|
}
|
|
1565
1595
|
|
|
1596
|
+
//---------------------------------------------------------------------------
|
|
1597
|
+
// txnPriority
|
|
1598
|
+
//
|
|
1599
|
+
// Property for transaction priority associated with the connection.
|
|
1600
|
+
//---------------------------------------------------------------------------
|
|
1601
|
+
get txnPriority() {
|
|
1602
|
+
return this._impl && this._impl.getTxnPriority();
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
set txnPriority(value) {
|
|
1606
|
+
errors.assert(this._impl, errors.ERR_INVALID_CONNECTION);
|
|
1607
|
+
errors.assertTxnPriority(value);
|
|
1608
|
+
this._impl.setTxnPriority(value);
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1566
1611
|
//---------------------------------------------------------------------------
|
|
1567
1612
|
// ping()
|
|
1568
1613
|
//
|
|
@@ -1589,9 +1634,11 @@ class Connection extends EventEmitter {
|
|
|
1589
1634
|
} else {
|
|
1590
1635
|
options = {};
|
|
1591
1636
|
}
|
|
1637
|
+
errors.assertParamPropUnsignedIntNonZero(options, 3, "rowsPerDataEvent");
|
|
1638
|
+
const rowsPerDataEvent = options.rowsPerDataEvent;
|
|
1592
1639
|
options.resultSet = true;
|
|
1593
1640
|
|
|
1594
|
-
const stream = new QueryStream();
|
|
1641
|
+
const stream = new QueryStream(undefined, rowsPerDataEvent);
|
|
1595
1642
|
|
|
1596
1643
|
// calling execute() via nextTick to ensure that handlers are registered
|
|
1597
1644
|
// prior to the events being emitted
|
|
@@ -1731,15 +1778,22 @@ class Connection extends EventEmitter {
|
|
|
1731
1778
|
errors.assert(this._impl, errors.ERR_INVALID_CONNECTION);
|
|
1732
1779
|
|
|
1733
1780
|
const inSubscr = _subscriptions.get(name);
|
|
1781
|
+
if (this.thin) {
|
|
1782
|
+
options._onRetire = (subscription) =>
|
|
1783
|
+
_removeSubscription(name, subscription);
|
|
1784
|
+
}
|
|
1734
1785
|
const outValue = await this._impl.subscribe(inSubscr, options);
|
|
1735
1786
|
let subscription;
|
|
1736
1787
|
if (options.namespace === constants.SUBSCR_NAMESPACE_DBCHANGE) {
|
|
1737
1788
|
subscription = outValue.subscription;
|
|
1738
1789
|
delete outValue.subscription;
|
|
1790
|
+
outValue.regId = Number(outValue.regId);
|
|
1739
1791
|
} else {
|
|
1740
1792
|
subscription = outValue;
|
|
1741
1793
|
}
|
|
1742
|
-
|
|
1794
|
+
if (!this.thin || subscription._registered) {
|
|
1795
|
+
_subscriptions.set(name, subscription);
|
|
1796
|
+
}
|
|
1743
1797
|
return outValue;
|
|
1744
1798
|
}
|
|
1745
1799
|
|
|
@@ -1987,11 +2041,14 @@ class Connection extends EventEmitter {
|
|
|
1987
2041
|
|
|
1988
2042
|
// Force a ResultSet and then fetch rows according to the requested
|
|
1989
2043
|
// fetch variant in non-pipeline flow.
|
|
1990
|
-
|
|
1991
|
-
|
|
2044
|
+
const execOptions = {
|
|
2045
|
+
...op.options,
|
|
2046
|
+
resultSet: true,
|
|
2047
|
+
fetchTypeHandler: this._createFetchTypeHandler(op.fetchLobs)
|
|
2048
|
+
};
|
|
1992
2049
|
let shouldClose = false;
|
|
1993
2050
|
try {
|
|
1994
|
-
res = await this._execute(op.statement, op.parameters,
|
|
2051
|
+
res = await this._execute(op.statement, op.parameters, execOptions);
|
|
1995
2052
|
if (opType === 'fetchOne') {
|
|
1996
2053
|
const row = await res.resultSet._getRow();
|
|
1997
2054
|
res.rows = row ? [row] : [];
|
|
@@ -2094,12 +2151,18 @@ class Connection extends EventEmitter {
|
|
|
2094
2151
|
errors.assertParamValue(typeof name === 'string', 1);
|
|
2095
2152
|
errors.assert(this._impl, errors.ERR_INVALID_CONNECTION);
|
|
2096
2153
|
errors.assert(_subscriptions.has(name), errors.ERR_INVALID_SUBSCR);
|
|
2097
|
-
|
|
2154
|
+
const subscription = _subscriptions.get(name);
|
|
2155
|
+
await this._impl.unsubscribe(subscription);
|
|
2156
|
+
|
|
2157
|
+
if (this.thin) {
|
|
2158
|
+
_removeSubscription(name, subscription);
|
|
2159
|
+
return;
|
|
2160
|
+
}
|
|
2098
2161
|
|
|
2099
2162
|
// Delay decreasing the reference count
|
|
2100
2163
|
// as NJS layer starts cleanup (uv_close) of async handle asynchronously.
|
|
2101
2164
|
setTimeout(() => {
|
|
2102
|
-
|
|
2165
|
+
_removeSubscription(name, subscription);
|
|
2103
2166
|
}, 0);
|
|
2104
2167
|
}
|
|
2105
2168
|
|
package/lib/constants.js
CHANGED
|
@@ -40,11 +40,13 @@ function hasNonEmptyText(value) {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/*
|
|
43
|
-
Represents
|
|
43
|
+
Represents a Deep Data Security credential set for an end user or, for direct
|
|
44
|
+
application logon, the application identity encoded by its database token.
|
|
44
45
|
|
|
45
46
|
Required properties
|
|
46
47
|
- databaseAccessToken: non-empty string accepted by the database driver.
|
|
47
|
-
- endUserToken or endUserName: exactly one must be supplied as a string
|
|
48
|
+
- endUserToken or endUserName: exactly one must be supplied as a string for an
|
|
49
|
+
end-user context. Neither is supplied for direct application logon.
|
|
48
50
|
|
|
49
51
|
Optional properties
|
|
50
52
|
- key: look-up identifier the database maps to stored context attributes; may be
|
|
@@ -75,12 +77,15 @@ class EndUserSecurityContext {
|
|
|
75
77
|
const hasEndUserName = endUserName !== undefined && endUserName !== null;
|
|
76
78
|
const hasKey = key !== undefined && key !== null;
|
|
77
79
|
|
|
78
|
-
// The database access token is always required
|
|
79
|
-
//
|
|
80
|
+
// The database access token is always required. An end-user context has
|
|
81
|
+
// exactly one identity mechanism. A context with neither token nor name
|
|
82
|
+
// is an application-direct logon: the database maps the client identity
|
|
83
|
+
// in databaseAccessToken to its registered application identity.
|
|
80
84
|
errors.assertParamValue(hasNonEmptyText(databaseAccessToken), 1);
|
|
81
85
|
errors.assertParamValue(
|
|
82
86
|
(hasEndUserToken && !hasEndUserName && !hasKey) ||
|
|
83
|
-
(!hasEndUserToken && hasEndUserName)
|
|
87
|
+
(!hasEndUserToken && hasEndUserName) ||
|
|
88
|
+
(!hasEndUserToken && !hasEndUserName && !hasKey), 1);
|
|
84
89
|
|
|
85
90
|
// When supplied, token/name/key values must contain non-whitespace text.
|
|
86
91
|
if (hasEndUserToken) {
|
|
@@ -115,7 +120,10 @@ class EndUserSecurityContext {
|
|
|
115
120
|
|
|
116
121
|
// Data roles are optional, but must be passed as an array when present.
|
|
117
122
|
if (dataRoles != null) {
|
|
118
|
-
errors.assertParamValue(
|
|
123
|
+
errors.assertParamValue(
|
|
124
|
+
Array.isArray(dataRoles) && dataRoles.every(hasNonEmptyText),
|
|
125
|
+
1
|
|
126
|
+
);
|
|
119
127
|
payload.data_roles = Array.from(dataRoles);
|
|
120
128
|
}
|
|
121
129
|
|
|
@@ -126,17 +134,21 @@ class EndUserSecurityContext {
|
|
|
126
134
|
1
|
|
127
135
|
);
|
|
128
136
|
payload.attributes = Object.entries(attributes).map(
|
|
129
|
-
([name, values]) => ({ name, values }));
|
|
137
|
+
([name, values]) => ({ name, values: values ?? null }));
|
|
130
138
|
}
|
|
131
139
|
|
|
132
140
|
this._payloadStore = new ObfuscatedValue();
|
|
133
141
|
this._encodeAndStorePayload(payload);
|
|
134
142
|
}
|
|
135
143
|
|
|
144
|
+
// Encode EUSC payloads with strict validation of unsupported JSON values and
|
|
145
|
+
// field names.
|
|
136
146
|
_encodePayload(value) {
|
|
137
147
|
const encoder = new oson.OsonEncoder();
|
|
138
148
|
return encoder.encode(
|
|
139
|
-
transformer.transformJsonValue(value
|
|
149
|
+
transformer.transformJsonValue(value, {
|
|
150
|
+
rejectUnsupportedTypes: true
|
|
151
|
+
}),
|
|
140
152
|
DEFAULT_MAX_FIELD_NAME_SIZE
|
|
141
153
|
);
|
|
142
154
|
}
|
package/lib/errors.js
CHANGED
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
const util = require('util');
|
|
29
29
|
|
|
30
|
+
const constants = require('./constants.js');
|
|
31
|
+
|
|
30
32
|
// define error prefix for all messages
|
|
31
33
|
const ERR_PREFIX = "NJS";
|
|
32
34
|
|
|
@@ -199,6 +201,15 @@ const ERR_END_USER_SECURITY_CONTEXT_REQUIRES_TCPS = 190;
|
|
|
199
201
|
const ERR_UNSUPPORTED_DEEP_DATA_SECURITY_FEATURE = 191;
|
|
200
202
|
const ERR_CHAR_CS_NOT_SUPPORTED = 192;
|
|
201
203
|
const ERR_INVALID_PROPERTY_LENGTH = 193;
|
|
204
|
+
const ERR_UNSUPPORTED_JSON_VALUE_TYPE = 194;
|
|
205
|
+
const ERR_NON_FINITE_JSON_NUMBER = 195;
|
|
206
|
+
const ERR_UNSUPPORTED_JSON_FIELD_NAME = 196;
|
|
207
|
+
const ERR_UNSUPPORTED_DB_OTEL_FEATURE = 197;
|
|
208
|
+
const ERR_END_USER_SECURITY_CONTEXT_PROVIDER = 198;
|
|
209
|
+
const ERR_INVALID_SECURITY_CONTEXT_METADATA = 199;
|
|
210
|
+
const ERR_INVALID_SECURITY_CONTEXT_CALLBACK = 200;
|
|
211
|
+
const ERR_TIMESTAMP_LTZ_REGION_NOT_SUPPORTED = 201;
|
|
212
|
+
const ERR_CONFLICTING_SECURITY_CONTEXT_IDENTITIES = 202;
|
|
202
213
|
|
|
203
214
|
// Oracle Net layer errors start from 500
|
|
204
215
|
const ERR_CONNECTION_CLOSED = 500;
|
|
@@ -233,6 +244,8 @@ const ERR_ANO_NEGOTIATION = 533;
|
|
|
233
244
|
const ERR_DATA_COMPRESSION = 534;
|
|
234
245
|
const ERR_CONFIG_PROVIDER_PARAM_TYPE = 535;
|
|
235
246
|
const ERR_TOO_MANY_REDIRECTS = 536;
|
|
247
|
+
const ERR_TXN_PRIORITY_NOT_SUPPORTED = 537;
|
|
248
|
+
const ERR_INVALID_TXN_PRIORITY = 538;
|
|
236
249
|
|
|
237
250
|
// Oracle SUCCESS_WITH_INFO warning start from 700
|
|
238
251
|
const WRN_COMPILATION_CREATE = 700;
|
|
@@ -247,6 +260,7 @@ adjustErrorXref.set("DPI-1055", ERR_NAN_VALUE);
|
|
|
247
260
|
adjustErrorXref.set("DPI-1063", ERR_EXEC_MODE_ONLY_FOR_DML);
|
|
248
261
|
adjustErrorXref.set("DPI-1067", [ERR_CALL_TIMEOUT_EXCEEDED, "call timeout of ([0-9]+) ms"]);
|
|
249
262
|
adjustErrorXref.set("DPI-1080", ERR_CONNECTION_CLOSED);
|
|
263
|
+
adjustErrorXref.set("DPI-1087", ERR_NOT_A_QUERY);
|
|
250
264
|
adjustErrorXref.set("OCI-22303", [ERR_INVALID_OBJECT_TYPE_NAME, 'type "([^"]*"."[^"]*)"']);
|
|
251
265
|
adjustErrorXref.set("OCI-22164", ERR_DELETE_ELEMENTS_OF_VARRAY);
|
|
252
266
|
adjustErrorXref.set("OCI-22165", [ERR_INVALID_COLL_INDEX_SET, /index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]);
|
|
@@ -276,6 +290,7 @@ adjustErrorXref.set("ORA-12570", ERR_CONNECTION_CLOSED);
|
|
|
276
290
|
adjustErrorXref.set("ORA-12583", ERR_CONNECTION_CLOSED);
|
|
277
291
|
adjustErrorXref.set("ORA-27146", ERR_CONNECTION_CLOSED);
|
|
278
292
|
adjustErrorXref.set("ORA-28511", ERR_CONNECTION_CLOSED);
|
|
293
|
+
adjustErrorXref.set("ORA-29970", ERR_INVALID_SUBSCR);
|
|
279
294
|
adjustErrorXref.set("ORA-56600", ERR_CONNECTION_CLOSED);
|
|
280
295
|
adjustErrorXref.set("ORA-24315", ERR_APP_CONTEXT_EMPTY_NAMESPACE);
|
|
281
296
|
adjustErrorXref.set("ORA-24338", ERR_INVALID_REF_CURSOR);
|
|
@@ -284,6 +299,7 @@ adjustErrorXref.set("ORA-24344", WRN_COMPILATION_CREATE);
|
|
|
284
299
|
adjustErrorXref.set("ORA-26202", ERR_SESSIONLESS_INACTIVE);
|
|
285
300
|
adjustErrorXref.set("ORA-26211", ERR_SESSIONLESS_DIFFERING_METHODS);
|
|
286
301
|
adjustErrorXref.set("ORA-26216", ERR_SESSIONLESS_ALREADY_ACTIVE);
|
|
302
|
+
adjustErrorXref.set("ORA-24562", ERR_TXN_PRIORITY_NOT_SUPPORTED);
|
|
287
303
|
adjustErrorXref.set("DPI-1071", ERR_PAYLOAD_CANNOT_BE_ENQUEUED);
|
|
288
304
|
|
|
289
305
|
// define mapping for error messages
|
|
@@ -535,19 +551,19 @@ messages.set(ERR_OPERATION_ONLY_SUPPORTED_ON_BFILE, // NJS-156
|
|
|
535
551
|
messages.set(ERR_EXECMANY_NOT_ALLOWED_ON_QUERIES, // NJS-157
|
|
536
552
|
'executeMany() cannot be used with SELECT statement or WITH SQL clause');
|
|
537
553
|
messages.set(ERR_VECTOR_SPARSE_INDICES_IS_NOT_ARRAY, // NJS-158
|
|
538
|
-
'SPARSE VECTOR indices
|
|
554
|
+
'SPARSE VECTOR indices must be of type Uint32Array or a regular JavaScript array');
|
|
539
555
|
messages.set(ERR_VECTOR_SPARSE_VALUES_IS_NOT_ARRAY, // NJS-159
|
|
540
|
-
'SPARSE VECTOR values is not an
|
|
556
|
+
'SPARSE VECTOR values is not an array');
|
|
541
557
|
messages.set(ERR_VECTOR_SPARSE_DIMS_IS_NOT_INTEGER, // NJS-160
|
|
542
|
-
'SPARSE VECTOR dimensions
|
|
558
|
+
'SPARSE VECTOR dimensions must be a positive integer value');
|
|
543
559
|
messages.set(ERR_VECTOR_SPARSE_INDICES_VALUES_NOT_EQUAL, // NJS-161
|
|
544
560
|
'SPARSE VECTOR indices and values must be of same length');
|
|
545
561
|
messages.set(ERR_VECTOR_SPARSE_INVALID_JSON, // NJS-162
|
|
546
562
|
'SPARSE VECTOR string data is not valid JSON');
|
|
547
563
|
messages.set(ERR_VECTOR_SPARSE_INVALID_STRING, // NJS-163
|
|
548
|
-
'SPARSE VECTOR string data
|
|
564
|
+
'SPARSE VECTOR string data array should have exactly 3 elements');
|
|
549
565
|
messages.set(ERR_VECTOR_SPARSE_INVALID_INPUT, // NJS-164
|
|
550
|
-
'SPARSE VECTOR Invalid
|
|
566
|
+
'SPARSE VECTOR: Invalid input data');
|
|
551
567
|
messages.set(ERR_VECTOR_SPARSE_INDICES_ELEM_IS_NOT_VALID, // NJS-165
|
|
552
568
|
'SPARSE VECTOR indices element at index %d is not valid');
|
|
553
569
|
messages.set(ERR_DB_FETCH_TYPE_HANDLER_CONVERTER, // NJS-166
|
|
@@ -606,6 +622,24 @@ messages.set(ERR_CHAR_CS_NOT_SUPPORTED, // NJS-192
|
|
|
606
622
|
'Character set id %d is not supported by node-oracledb in Thin mode');
|
|
607
623
|
messages.set(ERR_INVALID_PROPERTY_LENGTH, // NJS-193
|
|
608
624
|
'The length of the parameter %s exceeds the maximum allowed length of %d');
|
|
625
|
+
messages.set(ERR_UNSUPPORTED_JSON_VALUE_TYPE, // NJS-194
|
|
626
|
+
'Unsupported JavaScript type "%s" in JSON value');
|
|
627
|
+
messages.set(ERR_NON_FINITE_JSON_NUMBER, // NJS-195
|
|
628
|
+
'Non-finite numbers are not supported in JSON value');
|
|
629
|
+
messages.set(ERR_UNSUPPORTED_JSON_FIELD_NAME, // NJS-196
|
|
630
|
+
'Unsupported JSON field name "%s"');
|
|
631
|
+
messages.set(ERR_UNSUPPORTED_DB_OTEL_FEATURE, // NJS-197
|
|
632
|
+
'The current database version does not support Oracle Database OpenTelemetry tracing');
|
|
633
|
+
messages.set(ERR_END_USER_SECURITY_CONTEXT_PROVIDER, // NJS-198
|
|
634
|
+
'end user security context provider failed');
|
|
635
|
+
messages.set(ERR_INVALID_SECURITY_CONTEXT_METADATA, // NJS-199
|
|
636
|
+
'runWithContext() expects a non-null metadata object');
|
|
637
|
+
messages.set(ERR_INVALID_SECURITY_CONTEXT_CALLBACK, // NJS-200
|
|
638
|
+
'runWithContext() expects a function callback');
|
|
639
|
+
messages.set(ERR_TIMESTAMP_LTZ_REGION_NOT_SUPPORTED, // NJS-201
|
|
640
|
+
'TIMESTAMP WITH LOCAL TIME ZONE is not supported in Thin mode when DBTIMEZONE is a region: %s. Use a fixed-offset DBTIMEZONE, such as +00:00, to use this type in Thin mode.');
|
|
641
|
+
messages.set(ERR_CONFLICTING_SECURITY_CONTEXT_IDENTITIES, // NJS-202
|
|
642
|
+
'runWithContext() metadata cannot combine endUserToken with endUserName or key');
|
|
609
643
|
|
|
610
644
|
// Oracle Net layer errors
|
|
611
645
|
|
|
@@ -673,6 +707,10 @@ messages.set(ERR_CONFIG_PROVIDER_PARAM_TYPE, // NJS-535
|
|
|
673
707
|
'Parameter does not have a valid type: %s\n');
|
|
674
708
|
messages.set(ERR_TOO_MANY_REDIRECTS, // NJS-536
|
|
675
709
|
'Too many connect redirects (limit: %d)');
|
|
710
|
+
messages.set(ERR_TXN_PRIORITY_NOT_SUPPORTED, // NJS-537
|
|
711
|
+
'Server does not support changing the transaction priority.');
|
|
712
|
+
messages.set(ERR_INVALID_TXN_PRIORITY, // NJS-538
|
|
713
|
+
'Invalid value for parameter txnPriority.');
|
|
676
714
|
messages.set(WRN_COMPILATION_CREATE, // NJS-700
|
|
677
715
|
'creation succeeded with compilation errors');
|
|
678
716
|
|
|
@@ -820,6 +858,21 @@ function assertPropValue(condition, propName) {
|
|
|
820
858
|
assert(condition, ERR_INVALID_PROPERTY_VALUE, propName);
|
|
821
859
|
}
|
|
822
860
|
|
|
861
|
+
//-----------------------------------------------------------------------------
|
|
862
|
+
// assertTxnPriority()
|
|
863
|
+
//
|
|
864
|
+
// Asserts that the transaction priority is a supported value.
|
|
865
|
+
//-----------------------------------------------------------------------------
|
|
866
|
+
function assertTxnPriority(value) {
|
|
867
|
+
assert(typeof value === 'string', ERR_INVALID_TXN_PRIORITY);
|
|
868
|
+
const normalizedValue = value.toUpperCase();
|
|
869
|
+
assert(normalizedValue === constants.TXN_PRIORITY_HIGH ||
|
|
870
|
+
normalizedValue === constants.TXN_PRIORITY_MEDIUM ||
|
|
871
|
+
normalizedValue === constants.TXN_PRIORITY_LOW ||
|
|
872
|
+
normalizedValue === constants.TXN_PRIORITY_DEFAULT,
|
|
873
|
+
ERR_INVALID_TXN_PRIORITY);
|
|
874
|
+
}
|
|
875
|
+
|
|
823
876
|
//-----------------------------------------------------------------------------
|
|
824
877
|
// getErr()
|
|
825
878
|
//
|
|
@@ -1127,6 +1180,17 @@ module.exports = {
|
|
|
1127
1180
|
ERR_PIPELINE_EXEC_OPTION_NOT_SUPPORTED,
|
|
1128
1181
|
ERR_INVALID_SQL_NAME,
|
|
1129
1182
|
ERR_CHAR_CS_NOT_SUPPORTED,
|
|
1183
|
+
ERR_UNSUPPORTED_JSON_VALUE_TYPE,
|
|
1184
|
+
ERR_NON_FINITE_JSON_NUMBER,
|
|
1185
|
+
ERR_UNSUPPORTED_JSON_FIELD_NAME,
|
|
1186
|
+
ERR_UNSUPPORTED_DB_OTEL_FEATURE,
|
|
1187
|
+
ERR_TXN_PRIORITY_NOT_SUPPORTED,
|
|
1188
|
+
ERR_INVALID_TXN_PRIORITY,
|
|
1189
|
+
ERR_END_USER_SECURITY_CONTEXT_PROVIDER,
|
|
1190
|
+
ERR_INVALID_SECURITY_CONTEXT_METADATA,
|
|
1191
|
+
ERR_INVALID_SECURITY_CONTEXT_CALLBACK,
|
|
1192
|
+
ERR_TIMESTAMP_LTZ_REGION_NOT_SUPPORTED,
|
|
1193
|
+
ERR_CONFLICTING_SECURITY_CONTEXT_IDENTITIES,
|
|
1130
1194
|
WRN_COMPILATION_CREATE,
|
|
1131
1195
|
assert,
|
|
1132
1196
|
assertArgCount,
|
|
@@ -1140,6 +1204,7 @@ module.exports = {
|
|
|
1140
1204
|
assertParamValue,
|
|
1141
1205
|
assertPropLength,
|
|
1142
1206
|
assertPropValue,
|
|
1207
|
+
assertTxnPriority,
|
|
1143
1208
|
getErr,
|
|
1144
1209
|
throwErr,
|
|
1145
1210
|
throwErrWithORAError,
|
package/lib/impl/connection.js
CHANGED
|
@@ -238,6 +238,15 @@ class ConnectionImpl {
|
|
|
238
238
|
errors.throwNotImplemented("getting current schema");
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
+
//---------------------------------------------------------------------------
|
|
242
|
+
// getDatabaseOpenTelemetryTracing()
|
|
243
|
+
//
|
|
244
|
+
// Returns the database OpenTelemetry trace propagation flag.
|
|
245
|
+
//---------------------------------------------------------------------------
|
|
246
|
+
getDatabaseOpenTelemetryTracing() {
|
|
247
|
+
errors.throwNotImplemented("getting database OpenTelemetry trace propagation");
|
|
248
|
+
}
|
|
249
|
+
|
|
241
250
|
//---------------------------------------------------------------------------
|
|
242
251
|
// getDbDomain()
|
|
243
252
|
//
|
|
@@ -430,6 +439,15 @@ class ConnectionImpl {
|
|
|
430
439
|
errors.throwNotImplemented("getting information about warning");
|
|
431
440
|
}
|
|
432
441
|
|
|
442
|
+
//---------------------------------------------------------------------------
|
|
443
|
+
// getTxnPriority()
|
|
444
|
+
//
|
|
445
|
+
// Returns the transaction priority associated with the connection.
|
|
446
|
+
//---------------------------------------------------------------------------
|
|
447
|
+
getTxnPriority() {
|
|
448
|
+
errors.throwNotImplemented("getting transaction priority");
|
|
449
|
+
}
|
|
450
|
+
|
|
433
451
|
//---------------------------------------------------------------------------
|
|
434
452
|
// isHealthy()
|
|
435
453
|
//
|
|
@@ -515,6 +533,15 @@ class ConnectionImpl {
|
|
|
515
533
|
errors.throwNotImplemented("setting end-to-end attribute 'dbOp'");
|
|
516
534
|
}
|
|
517
535
|
|
|
536
|
+
//---------------------------------------------------------------------------
|
|
537
|
+
// setDatabaseOpenTelemetryTracing()
|
|
538
|
+
//
|
|
539
|
+
// Sets the database OpenTelemetry trace propagation flag.
|
|
540
|
+
//---------------------------------------------------------------------------
|
|
541
|
+
setDatabaseOpenTelemetryTracing() {
|
|
542
|
+
errors.throwNotImplemented("setting database OpenTelemetry trace propagation");
|
|
543
|
+
}
|
|
544
|
+
|
|
518
545
|
//---------------------------------------------------------------------------
|
|
519
546
|
// setECID()
|
|
520
547
|
//
|
|
@@ -587,6 +614,15 @@ class ConnectionImpl {
|
|
|
587
614
|
errors.throwNotImplemented("setting the tag for the connection");
|
|
588
615
|
}
|
|
589
616
|
|
|
617
|
+
//---------------------------------------------------------------------------
|
|
618
|
+
// setTxnPriority()
|
|
619
|
+
//
|
|
620
|
+
// Sets the transaction priority associated with the connection.
|
|
621
|
+
//---------------------------------------------------------------------------
|
|
622
|
+
setTxnPriority() {
|
|
623
|
+
errors.throwNotImplemented("setting transaction priority");
|
|
624
|
+
}
|
|
625
|
+
|
|
590
626
|
//---------------------------------------------------------------------------
|
|
591
627
|
// shutdown()
|
|
592
628
|
//
|