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.
Files changed (107) hide show
  1. package/CHANGELOG.md +1 -1875
  2. package/LICENSE.txt +8 -222
  3. package/NOTICE.txt +1 -1
  4. package/README.md +38 -30
  5. package/SECURITY.md +38 -0
  6. package/build/Release/oracledb-6.0.1-darwin-x64.node +0 -0
  7. package/build/Release/oracledb-6.0.1-darwin-x64.node-buildinfo.txt +1 -0
  8. package/build/Release/oracledb-6.0.1-js-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-6.0.1-linux-arm64.node +0 -0
  10. package/build/Release/oracledb-6.0.1-linux-arm64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-6.0.1-linux-x64.node +0 -0
  12. package/build/Release/oracledb-6.0.1-linux-x64.node-buildinfo.txt +1 -0
  13. package/build/Release/oracledb-6.0.1-win32-x64.node +0 -0
  14. package/build/Release/oracledb-6.0.1-win32-x64.node-buildinfo.txt +1 -0
  15. package/examples/README.md +113 -0
  16. package/examples/dbconfig.js +100 -0
  17. package/examples/example.js +156 -0
  18. package/index.js +26 -0
  19. package/lib/aqDeqOptions.js +148 -8
  20. package/lib/aqEnqOptions.js +59 -7
  21. package/lib/aqMessage.js +118 -7
  22. package/lib/aqQueue.js +243 -53
  23. package/lib/connection.js +1326 -465
  24. package/lib/constants.js +203 -0
  25. package/lib/dbObject.js +346 -32
  26. package/lib/errors.js +785 -0
  27. package/lib/impl/aqDeqOptions.js +197 -0
  28. package/lib/impl/aqEnqOptions.js +89 -0
  29. package/lib/impl/aqMessage.js +134 -0
  30. package/lib/impl/aqQueue.js +81 -0
  31. package/lib/impl/connection.js +529 -0
  32. package/lib/impl/dbObject.js +159 -0
  33. package/lib/impl/index.js +59 -0
  34. package/lib/impl/lob.js +85 -0
  35. package/lib/impl/pool.js +195 -0
  36. package/lib/impl/resultset.js +223 -0
  37. package/lib/impl/sodaCollection.js +174 -0
  38. package/lib/impl/sodaDatabase.js +81 -0
  39. package/lib/impl/sodaDocCursor.js +63 -0
  40. package/lib/impl/sodaDocument.js +98 -0
  41. package/lib/impl/sodaOperation.js +109 -0
  42. package/lib/lob.js +157 -68
  43. package/lib/oracledb.js +1047 -345
  44. package/lib/pool.js +654 -465
  45. package/lib/poolStatistics.js +24 -9
  46. package/lib/queryStream.js +16 -8
  47. package/lib/resultset.js +291 -183
  48. package/lib/settings.js +191 -0
  49. package/lib/sodaCollection.js +214 -201
  50. package/lib/sodaDatabase.js +108 -71
  51. package/lib/sodaDocCursor.js +44 -32
  52. package/lib/sodaDocument.js +76 -14
  53. package/lib/sodaOperation.js +131 -118
  54. package/lib/thin/connection.js +1043 -0
  55. package/lib/thin/dbObject.js +630 -0
  56. package/lib/thin/index.js +40 -0
  57. package/lib/thin/lob.js +189 -0
  58. package/lib/thin/pool.js +481 -0
  59. package/lib/thin/protocol/buffer.js +1043 -0
  60. package/lib/thin/protocol/capabilities.js +121 -0
  61. package/lib/thin/protocol/constants.js +765 -0
  62. package/lib/thin/protocol/encryptDecrypt.js +185 -0
  63. package/lib/thin/protocol/messages/auth.js +349 -0
  64. package/lib/thin/protocol/messages/base.js +476 -0
  65. package/lib/thin/protocol/messages/commit.js +56 -0
  66. package/lib/thin/protocol/messages/dataType.js +391 -0
  67. package/lib/thin/protocol/messages/execute.js +312 -0
  68. package/lib/thin/protocol/messages/fetch.js +60 -0
  69. package/lib/thin/protocol/messages/index.js +53 -0
  70. package/lib/thin/protocol/messages/lobOp.js +201 -0
  71. package/lib/thin/protocol/messages/logOff.js +53 -0
  72. package/lib/thin/protocol/messages/ping.js +56 -0
  73. package/lib/thin/protocol/messages/protocol.js +78 -0
  74. package/lib/thin/protocol/messages/rollback.js +56 -0
  75. package/lib/thin/protocol/messages/sessionRelease.js +60 -0
  76. package/lib/thin/protocol/messages/withData.js +812 -0
  77. package/lib/thin/protocol/oson.js +661 -0
  78. package/lib/thin/protocol/packet.js +519 -0
  79. package/lib/thin/protocol/protocol.js +202 -0
  80. package/lib/thin/protocol/utils.js +89 -0
  81. package/lib/thin/resultSet.js +122 -0
  82. package/lib/thin/sqlnet/connStrategy.js +175 -0
  83. package/lib/thin/sqlnet/constants.js +199 -0
  84. package/lib/thin/sqlnet/ezConnectResolver.js +488 -0
  85. package/lib/thin/sqlnet/navNodes.js +870 -0
  86. package/lib/thin/sqlnet/networkSession.js +621 -0
  87. package/lib/thin/sqlnet/ntTcp.js +527 -0
  88. package/lib/thin/sqlnet/nvStrToNvPair.js +783 -0
  89. package/lib/thin/sqlnet/packet.js +405 -0
  90. package/lib/thin/sqlnet/paramParser.js +206 -0
  91. package/lib/thin/sqlnet/sessionAtts.js +160 -0
  92. package/lib/thin/statement.js +300 -0
  93. package/lib/thin/util.js +289 -0
  94. package/lib/transformer.js +252 -0
  95. package/lib/types.js +357 -0
  96. package/lib/util.js +196 -110
  97. package/lib/version.js +36 -0
  98. package/package/README.md +33 -30
  99. package/package/install.js +89 -64
  100. package/package/prunebinaries.js +60 -12
  101. package/package.json +3 -3
  102. package/build/Release/oracledb-5.5.0-darwin-x64.node +0 -0
  103. package/build/Release/oracledb-5.5.0-darwin-x64.node-buildinfo.txt +0 -1
  104. package/build/Release/oracledb-5.5.0-linux-x64.node +0 -0
  105. package/build/Release/oracledb-5.5.0-linux-x64.node-buildinfo.txt +0 -1
  106. package/build/Release/oracledb-5.5.0-win32-x64.node +0 -0
  107. package/build/Release/oracledb-5.5.0-win32-x64.node-buildinfo.txt +0 -1
package/lib/errors.js ADDED
@@ -0,0 +1,785 @@
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 util = require('util');
30
+
31
+ // define error prefix for all messages
32
+ const ERR_PREFIX = "NJS";
33
+
34
+ // define error number constants (used in JavaScript library)
35
+ const ERR_INVALID_POOL = 2;
36
+ const ERR_INVALID_CONNECTION = 3;
37
+ const ERR_INVALID_PROPERTY_VALUE = 4;
38
+ const ERR_INVALID_PARAMETER_VALUE = 5;
39
+ const ERR_INVALID_PROPERTY_VALUE_IN_PARAM = 7;
40
+ const ERR_INVALID_NUMBER_OF_PARAMETERS = 9;
41
+ const ERR_UNSUPPORTED_DATA_TYPE = 10;
42
+ const ERR_BIND_VALUE_AND_TYPE_MISMATCH = 11;
43
+ const ERR_INVALID_BIND_DATA_TYPE = 12;
44
+ const ERR_INVALID_BIND_DIRECTION = 13;
45
+ const ERR_NO_TYPE_FOR_CONVERSION = 15;
46
+ const ERR_INSUFFICIENT_BUFFER_FOR_BINDS = 16;
47
+ const ERR_BUSY_RS = 17;
48
+ const ERR_INVALID_RS = 18;
49
+ const ERR_NOT_A_QUERY = 19;
50
+ const ERR_INVALID_TYPE_FOR_CONVERSION = 21;
51
+ const ERR_INVALID_LOB = 22;
52
+ const ERR_BUSY_LOB = 23;
53
+ const ERR_INSUFFICIENT_MEMORY = 24;
54
+ const ERR_INVALID_TYPE_FOR_ARRAY_BIND = 34;
55
+ const ERR_REQUIRED_MAX_ARRAY_SIZE = 35;
56
+ const ERR_INVALID_ARRAY_SIZE = 36;
57
+ const ERR_INCOMPATIBLE_TYPE_ARRAY_BIND = 37;
58
+ const ERR_CONN_REQUEST_TIMEOUT = 40;
59
+ const ERR_CANNOT_CONVERT_RS_TO_STREAM = 41;
60
+ const ERR_CANNOT_INVOKE_RS_METHODS = 42;
61
+ const ERR_RS_ALREADY_CONVERTED = 43;
62
+ const ERR_INVALID_BIND_UNIT = 44;
63
+ const ERR_CANNOT_LOAD_BINARY = 45;
64
+ const ERR_POOL_WITH_ALIAS_ALREADY_EXISTS = 46;
65
+ const ERR_POOL_WITH_ALIAS_NOT_FOUND = 47;
66
+ const ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND = 52;
67
+ const ERR_MIXED_BIND = 55;
68
+ const ERR_MISSING_MAX_SIZE_BY_POS = 56;
69
+ const ERR_MISSING_MAX_SIZE_BY_NAME = 57;
70
+ const ERR_MAX_SIZE_TOO_SMALL = 58;
71
+ const ERR_MISSING_TYPE_BY_POS = 59;
72
+ const ERR_MISSING_TYPE_BY_NAME = 60;
73
+ const ERR_INVALID_SUBSCR = 61;
74
+ const ERR_MISSING_SUBSCR_CALLBACK = 62;
75
+ const ERR_MISSING_SUBSCR_SQL = 63;
76
+ const ERR_POOL_CLOSING = 64;
77
+ const ERR_POOL_CLOSED = 65;
78
+ const ERR_INVALID_SODA_DOC_CURSOR = 66;
79
+ const ERR_NO_BINARY_AVAILABLE = 67;
80
+ const ERR_INVALID_ERR_NUM = 68;
81
+ const ERR_NODE_TOO_OLD = 69;
82
+ const ERR_INVALID_AQ_MESSAGE = 70;
83
+ const ERR_DBL_CONNECT_STRING = 75;
84
+ const ERR_QUEUE_MAX_EXCEEDED = 76;
85
+ const ERR_UNSUPPORTED_DATA_TYPE_IN_JSON = 78;
86
+ const ERR_DBL_USER = 80;
87
+ const ERR_CONCURRENT_OPS = 81;
88
+ const ERR_POOL_RECONFIGURING = 82;
89
+ const ERR_POOL_STATISTICS_DISABLED = 83;
90
+ const ERR_TOKEN_BASED_AUTH = 84;
91
+ const ERR_POOL_TOKEN_BASED_AUTH = 85;
92
+ const ERR_CONN_TOKEN_BASED_AUTH = 86;
93
+ const ERR_TOKEN_HAS_EXPIRED = 87;
94
+ const ERR_NOT_IMPLEMENTED = 89;
95
+ const ERR_INIT_ORACLE_CLIENT_ARGS = 90;
96
+ const ERR_MISSING_FILE = 91;
97
+ const ERR_INVALID_NUMBER_OF_CONNECTIONS = 92;
98
+ const ERR_EXEC_MODE_ONLY_FOR_DML = 95;
99
+ const ERR_INVALID_BIND_NAME = 97;
100
+ const ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS = 98;
101
+ const ERR_BUFFER_LENGTH_INSUFFICIENT = 99;
102
+ const ERR_NCHAR_CS_NOT_SUPPORTED = 100;
103
+ const ERR_MISSING_CREDENTIALS = 101;
104
+ const ERR_UNEXPECTED_END_OF_DATA = 102;
105
+ const ERR_UNEXPECTED_MESSAGE_TYPE = 103;
106
+ const ERR_POOL_HAS_BUSY_CONNECTIONS = 104;
107
+ const ERR_NAN_VALUE = 105;
108
+ const ERR_INTERNAL = 106;
109
+ const ERR_INVALID_REF_CURSOR = 107;
110
+ const ERR_LOB_CLOSED = 108;
111
+ const ERR_INVALID_TYPE_NUM = 109;
112
+ const ERR_INVALID_ORACLE_TYPE_NUM = 110;
113
+ const ERR_UNEXPECTED_NEGATIVE_INTEGER = 111;
114
+ const ERR_INTEGER_TOO_LARGE = 112;
115
+ const ERR_UNEXPECTED_DATA = 113;
116
+ const ERR_OSON_FIELD_NAME_LIMITATION = 114;
117
+ const ERR_ORACLE_NUMBER_NO_REPR = 115;
118
+ const ERR_UNSUPPORTED_VERIFIER_TYPE = 116;
119
+ const ERR_INVALID_PRIVATE_KEY = 117;
120
+ const ERR_THIN_CONNECTION_ALREADY_CREATED = 118;
121
+ const ERR_UNSUPPORTED_CONVERSION = 119;
122
+ const ERR_FETCH_TYPE_HANDLER_RETURN_VALUE = 120;
123
+ const ERR_FETCH_TYPE_HANDLER_TYPE = 121;
124
+ const ERR_FETCH_TYPE_HANDLER_CONVERTER = 122;
125
+ const ERR_CALL_TIMEOUT_EXCEEDED = 123;
126
+ const ERR_EMPTY_CONNECT_STRING = 125;
127
+ const ERR_OSON_VERSION_NOT_SUPPORTED = 126;
128
+ const ERR_UNKOWN_SERVER_SIDE_PIGGYBACK = 127;
129
+ const ERR_UNKNOWN_COLUMN_TYPE_NAME = 128;
130
+ const ERR_INVALID_OBJECT_TYPE_NAME = 129;
131
+ const ERR_TDS_TYPE_NOT_SUPPORTED = 130;
132
+ const ERR_INVALID_COLL_INDEX_SET = 131;
133
+ const ERR_INVALID_COLL_INDEX_GET = 132;
134
+ const ERR_DELETE_ELEMENTS_OF_VARRAY = 133;
135
+ const ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR = 134;
136
+ const ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM = 135;
137
+ const ERR_WRONG_CRED_FOR_EXTAUTH = 136;
138
+ const ERR_MISSING_BIND_VALUE = 137;
139
+ const ERR_SERVER_VERSION_NOT_SUPPORTED = 138;
140
+
141
+ // Oracle Net layer errors start from 500
142
+ const ERR_CONNECTION_CLOSED = 500;
143
+ const ERR_CONNECTION_LOSTCONTACT = 501;
144
+ const ERR_CONNECTION_INCOMPLETE = 503;
145
+ const ERR_PROXY_CONNECTION_FAILURE = 504;
146
+ const ERR_TLS_INIT_FAILURE = 505;
147
+ const ERR_TLS_AUTH_FAILURE = 506;
148
+ const ERR_TLS_DNMATCH_FAILURE = 507;
149
+ const ERR_TLS_HOSTMATCH_FAILURE = 508;
150
+ const ERR_INVALID_PACKET = 509;
151
+ const ERR_CONNECTION_TIMEDOUT = 510;
152
+ const ERR_CONNECTION_REFUSED = 511;
153
+ const ERR_INVALID_CONNECT_STRING_PARAMETERS = 512;
154
+ const ERR_CONNECTION_INBAND = 513;
155
+ const ERR_INVALID_CONNECT_STRING_SYNTAX = 514;
156
+ const ERR_INVALID_EZCONNECT_SYNTAX = 515;
157
+ const ERR_NO_CONFIG_DIR = 516;
158
+ const ERR_TNS_ENTRY_NOT_FOUND = 517;
159
+ const ERR_INVALID_SERVICE_NAME = 518;
160
+ const ERR_INVALID_SID = 519;
161
+ const ERR_TNS_NAMES_FILE_MISSING = 520;
162
+ const ERR_CONNECTION_EOF = 521;
163
+
164
+ // define mapping for ODPI-C errors that need to be wrapped with NJS errors
165
+ const adjustErrorXref = new Map();
166
+ adjustErrorXref.set("DPI-1010", ERR_CONNECTION_CLOSED);
167
+ adjustErrorXref.set("DPI-1024", [ERR_INVALID_COLL_INDEX_GET, 'at index ([0-9]+) does']);
168
+ adjustErrorXref.set("DPI-1040", ERR_LOB_CLOSED);
169
+ adjustErrorXref.set("DPI-1044", ERR_ORACLE_NUMBER_NO_REPR);
170
+ adjustErrorXref.set("DPI-1055", ERR_NAN_VALUE);
171
+ adjustErrorXref.set("DPI-1063", ERR_EXEC_MODE_ONLY_FOR_DML);
172
+ adjustErrorXref.set("DPI-1067", [ERR_CALL_TIMEOUT_EXCEEDED, "call timeout of ([0-9]+) ms"]);
173
+ adjustErrorXref.set("DPI-1080", ERR_CONNECTION_CLOSED);
174
+ adjustErrorXref.set("OCI-22303", [ERR_INVALID_OBJECT_TYPE_NAME, 'type "([^"]*"."[^"]*)"']);
175
+ adjustErrorXref.set("OCI-22164", ERR_DELETE_ELEMENTS_OF_VARRAY);
176
+ adjustErrorXref.set("OCI-22165", [ERR_INVALID_COLL_INDEX_SET, /index \[([0-9]+)\] must be in the range of \[([0-9]+)\] to \[([0-9]+)\]/]);
177
+ adjustErrorXref.set("ORA-00028", ERR_CONNECTION_CLOSED);
178
+ adjustErrorXref.set("ORA-00600", ERR_CONNECTION_CLOSED);
179
+ adjustErrorXref.set("ORA-24338", ERR_INVALID_REF_CURSOR);
180
+ adjustErrorXref.set("ORA-24422", ERR_POOL_HAS_BUSY_CONNECTIONS);
181
+ adjustErrorXref.set("ORA-25708", ERR_TOKEN_HAS_EXPIRED);
182
+
183
+ // define mapping for error messages
184
+ const messages = new Map();
185
+ messages.set(ERR_INVALID_POOL, // NJS-002
186
+ 'invalid pool');
187
+ messages.set(ERR_INVALID_CONNECTION, // NJS-003
188
+ 'invalid connection');
189
+ messages.set(ERR_INVALID_PROPERTY_VALUE, // NJS-004
190
+ 'invalid value for property "%s"');
191
+ messages.set(ERR_INVALID_PARAMETER_VALUE, // NJS-005
192
+ 'invalid value for parameter %d');
193
+ messages.set(ERR_INVALID_PROPERTY_VALUE_IN_PARAM, // NJS-007
194
+ 'invalid value for "%s" in parameter %d');
195
+ messages.set(ERR_INVALID_NUMBER_OF_PARAMETERS, // NJS-009
196
+ 'invalid number of parameters');
197
+ // used in C -- keep synchronized!
198
+ messages.set(ERR_UNSUPPORTED_DATA_TYPE, // NJS-010
199
+ 'unsupported data type %d in column %d');
200
+ messages.set(ERR_BIND_VALUE_AND_TYPE_MISMATCH, // NJS-011
201
+ 'encountered bind value and type mismatch');
202
+ messages.set(ERR_INVALID_BIND_DATA_TYPE, // NJS-012
203
+ 'encountered invalid bind data type in parameter %d');
204
+ messages.set(ERR_INVALID_BIND_DIRECTION, // NJS-013
205
+ 'invalid bind direction');
206
+ messages.set(ERR_NO_TYPE_FOR_CONVERSION, // NJS-015
207
+ 'type was not specified for conversion');
208
+ // used in C -- keep synchronized!
209
+ messages.set(ERR_INSUFFICIENT_BUFFER_FOR_BINDS, // NJS-016
210
+ 'buffer is too small for OUT binds');
211
+ messages.set(ERR_BUSY_RS, // NJS-017
212
+ 'concurrent operations on ResultSet are not allowed');
213
+ messages.set(ERR_INVALID_RS, // NJS-018
214
+ 'invalid ResultSet');
215
+ messages.set(ERR_NOT_A_QUERY, // NJS-019
216
+ 'ResultSet cannot be returned for non-query statements');
217
+ messages.set(ERR_INVALID_TYPE_FOR_CONVERSION, // NJS-021
218
+ 'invalid type for conversion specified');
219
+ messages.set(ERR_INVALID_LOB, // NJS-022
220
+ 'invalid Lob');
221
+ messages.set(ERR_BUSY_LOB, // NJS-023
222
+ 'concurrent operations on a Lob are not allowed');
223
+ // used in C -- keep synchronized!
224
+ messages.set(ERR_INSUFFICIENT_MEMORY, // NJS-024
225
+ 'memory allocation failed');
226
+ messages.set(ERR_INVALID_TYPE_FOR_ARRAY_BIND, // NJS-034
227
+ 'data type is unsupported for array bind');
228
+ messages.set(ERR_REQUIRED_MAX_ARRAY_SIZE, // NJS-035
229
+ 'maxArraySize is required for IN OUT array bind');
230
+ messages.set(ERR_INVALID_ARRAY_SIZE, // NJS-036
231
+ 'length of given array is greater than "maxArraySize"');
232
+ messages.set(ERR_INCOMPATIBLE_TYPE_ARRAY_BIND, // NJS-037
233
+ 'invalid data type at array index %d for bind ":%s"');
234
+ messages.set(ERR_CONN_REQUEST_TIMEOUT, // NJS-040
235
+ 'connection request timeout. Request exceeded "queueTimeout" of %d');
236
+ messages.set(ERR_CANNOT_CONVERT_RS_TO_STREAM, // NJS-041
237
+ 'cannot convert ResultSet to QueryStream after invoking methods');
238
+ messages.set(ERR_CANNOT_INVOKE_RS_METHODS, // NJS-042
239
+ 'cannot invoke ResultSet methods after converting to QueryStream');
240
+ messages.set(ERR_RS_ALREADY_CONVERTED, // NJS-043
241
+ 'ResultSet already converted to QueryStream');
242
+ messages.set(ERR_INVALID_BIND_UNIT, // NJS-044
243
+ 'bind object must contain one of the following attributes: "dir", "type", "maxSize", or "val"');
244
+ messages.set(ERR_CANNOT_LOAD_BINARY, // NJS-045
245
+ 'cannot load a node-oracledb Thick mode binary for Node.js. Please try using Thin mode. %s');
246
+ messages.set(ERR_POOL_WITH_ALIAS_ALREADY_EXISTS, // NJS-046
247
+ 'pool alias "%s" already exists in the connection pool cache');
248
+ messages.set(ERR_POOL_WITH_ALIAS_NOT_FOUND, // NJS-047
249
+ 'pool alias "%s" not found in connection pool cache');
250
+ messages.set(ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND, // NJS-052
251
+ 'invalid data type at array index %d for bind position %d');
252
+ messages.set(ERR_MIXED_BIND, // NJS-055
253
+ 'binding by position and name cannot be mixed');
254
+ messages.set(ERR_MISSING_MAX_SIZE_BY_POS, // NJS-056
255
+ 'maxSize for bind position %d must be specified and be greater than zero');
256
+ messages.set(ERR_MISSING_MAX_SIZE_BY_NAME, // NJS-057
257
+ 'maxSize for bind "%s" must be specified and greater than zero');
258
+ messages.set(ERR_MAX_SIZE_TOO_SMALL, // NJS-058
259
+ 'maxSize of %d is too small for value of length %d in row %d');
260
+ messages.set(ERR_MISSING_TYPE_BY_POS, // NJS-059
261
+ 'type must be specified for bind position %d');
262
+ messages.set(ERR_MISSING_TYPE_BY_NAME, // NJS-060
263
+ 'type must be specified for bind "%s"');
264
+ messages.set(ERR_INVALID_SUBSCR, // NJS-061
265
+ 'invalid subscription');
266
+ messages.set(ERR_MISSING_SUBSCR_CALLBACK, // NJS-062
267
+ 'subscription notification callback missing');
268
+ messages.set(ERR_MISSING_SUBSCR_SQL, // NJS-063
269
+ 'subscription notification SQL missing');
270
+ messages.set(ERR_POOL_CLOSING, // NJS-064
271
+ 'connection pool is closing');
272
+ messages.set(ERR_POOL_CLOSED, // NJS-065
273
+ 'connection pool was closed');
274
+ messages.set(ERR_INVALID_SODA_DOC_CURSOR, // NJS-066
275
+ 'invalid SODA document cursor');
276
+ messages.set(ERR_NO_BINARY_AVAILABLE, // NJS-067
277
+ 'a pre-built node-oracledb Thick mode binary was not found for %s');
278
+ messages.set(ERR_INVALID_ERR_NUM, // NJS-068
279
+ 'invalid error number %d supplied');
280
+ messages.set(ERR_NODE_TOO_OLD, // NJS-069
281
+ 'node-oracledb %s requires Node.js %s or later');
282
+ messages.set(ERR_INVALID_AQ_MESSAGE, // NJS-070
283
+ 'message must be a string, buffer, database object or an object containing a payload property which itself is a string, buffer or database object');
284
+ messages.set(ERR_DBL_CONNECT_STRING, // NJS-075
285
+ 'only one of "connectString" and "connectionString" can be used');
286
+ messages.set(ERR_QUEUE_MAX_EXCEEDED, // NJS-076
287
+ 'connection request rejected. Pool queue length "queueMax" %d reached');
288
+ // used in C -- keep synchronized!
289
+ messages.set(ERR_UNSUPPORTED_DATA_TYPE_IN_JSON, // NJS-078
290
+ 'unsupported data type %d in JSON value');
291
+ messages.set(ERR_DBL_USER, // NJS-080
292
+ 'only one of "user" and "username" can be used');
293
+ messages.set(ERR_CONCURRENT_OPS, // NJS-081
294
+ 'concurrent operations on a connection are disabled');
295
+ messages.set(ERR_POOL_RECONFIGURING, // NJS-082
296
+ 'connection pool is being reconfigured');
297
+ messages.set(ERR_POOL_STATISTICS_DISABLED, // NJS-083
298
+ 'pool statistics are not enabled');
299
+ messages.set(ERR_TOKEN_BASED_AUTH, // NJS-084
300
+ 'invalid access token');
301
+ messages.set(ERR_POOL_TOKEN_BASED_AUTH, // NJS-085
302
+ 'invalid connection pool configuration with token-based authentication. The "homogeneous" and "externalAuth" attributes must be set to true');
303
+ messages.set(ERR_CONN_TOKEN_BASED_AUTH, // NJS-086
304
+ 'invalid standalone configuration with token-based authentication. The "externalAuth" attribute must be set to true');
305
+ messages.set(ERR_TOKEN_HAS_EXPIRED, // NJS-087
306
+ 'access token has expired');
307
+ messages.set(ERR_NOT_IMPLEMENTED, // NJS-089
308
+ '%s is not supported by node-oracledb in Thin mode');
309
+ messages.set(ERR_INIT_ORACLE_CLIENT_ARGS, // NJS-090
310
+ 'initOracleClient() was already called with different arguments');
311
+ messages.set(ERR_MISSING_FILE, // NJS-091
312
+ 'file %s is missing');
313
+ messages.set(ERR_INVALID_NUMBER_OF_CONNECTIONS, // NJS-092
314
+ '"poolMax" %d must be greater than or equal to "poolMin" %d');
315
+ messages.set(ERR_EXEC_MODE_ONLY_FOR_DML, // NJS-095
316
+ 'setting "batchErrors" or "dmlRowCounts" to true is only permitted for DML statements');
317
+ messages.set(ERR_INVALID_BIND_NAME, // NJS-097
318
+ 'no bind placeholder named ":%s" was found in the statement text');
319
+ messages.set(ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS, // NJS-098
320
+ '%s positional bind values are required but %s were provided');
321
+ messages.set(ERR_BUFFER_LENGTH_INSUFFICIENT, // NJS-099
322
+ 'internal error: buffer of length %s insufficient to hold %s bytes');
323
+ messages.set(ERR_NCHAR_CS_NOT_SUPPORTED, // NJS-100
324
+ 'national character set id %d is not supported by node-oracledb in Thin mode');
325
+ messages.set(ERR_MISSING_CREDENTIALS, // NJS-101
326
+ 'no credentials specified');
327
+ messages.set(ERR_UNEXPECTED_END_OF_DATA, // NJS-102
328
+ 'unexpected end of data: want %d bytes but only %d bytes are available');
329
+ messages.set(ERR_UNEXPECTED_MESSAGE_TYPE, // NJS-103
330
+ 'unexpected message type %d received');
331
+ messages.set(ERR_POOL_HAS_BUSY_CONNECTIONS, // NJS-104
332
+ 'connection pool cannot be closed because connections are busy');
333
+ messages.set(ERR_NAN_VALUE, // NJS-105
334
+ 'value is not a number (NaN) and cannot be used in Oracle Database numbers');
335
+ messages.set(ERR_INTERNAL, // NJS-106
336
+ 'internal error: %s');
337
+ messages.set(ERR_INVALID_REF_CURSOR, // NJS-107
338
+ 'invalid cursor');
339
+ messages.set(ERR_LOB_CLOSED, // NJS-108
340
+ 'LOB was already closed');
341
+ messages.set(ERR_INVALID_TYPE_NUM, // NJS-109
342
+ 'invalid type number %d');
343
+ messages.set(ERR_INVALID_ORACLE_TYPE_NUM, // NJS-110
344
+ 'invalid Oracle type number %d [csfrm: %d]');
345
+ messages.set(ERR_UNEXPECTED_NEGATIVE_INTEGER, // NJS-111
346
+ 'internal error: read a negative integer when expecting a positive integer');
347
+ messages.set(ERR_INTEGER_TOO_LARGE, // NJS-112
348
+ 'internal error: read integer of length %d when expecting integer of no more than length %d');
349
+ messages.set(ERR_UNEXPECTED_DATA, // NJS-113
350
+ 'unexpected data received: %s');
351
+ messages.set(ERR_OSON_FIELD_NAME_LIMITATION, // NJS-114
352
+ 'OSON field names may not exceed 255 UTF-8 encoded bytes');
353
+ messages.set(ERR_ORACLE_NUMBER_NO_REPR, // NJS-115
354
+ 'value cannot be represented as an Oracle Database number');
355
+ messages.set(ERR_UNSUPPORTED_VERIFIER_TYPE, // NJS-116
356
+ 'password verifier type 0x%s is not supported by node-oracledb in Thin mode');
357
+ messages.set(ERR_INVALID_PRIVATE_KEY, // NJS-117
358
+ 'invalid private key. Headers and footers are not allowed');
359
+ messages.set(ERR_THIN_CONNECTION_ALREADY_CREATED, // NJS-118
360
+ 'node-oracledb Thick mode cannot be enabled because a Thin mode connection has already been created');
361
+ messages.set(ERR_UNSUPPORTED_CONVERSION, // NJS-119
362
+ 'conversion from type %s to type %s is not supported');
363
+ messages.set(ERR_FETCH_TYPE_HANDLER_RETURN_VALUE, // NJS-120
364
+ 'fetchTypeHandler return value must be an object');
365
+ messages.set(ERR_FETCH_TYPE_HANDLER_TYPE, // NJS-121
366
+ 'fetchTypeHandler return value attribute "type" must be a valid database type');
367
+ messages.set(ERR_FETCH_TYPE_HANDLER_CONVERTER, // NJS-122
368
+ 'fetchTypeHandler return value attribute "converter" must be a function');
369
+ messages.set(ERR_CALL_TIMEOUT_EXCEEDED, // NJS-123
370
+ 'call timeout of %d ms exceeded');
371
+ messages.set(ERR_EMPTY_CONNECT_STRING, // NJS-125
372
+ '"connectString" cannot be empty or undefined. Bequeath connections are not supported in Thin mode');
373
+ messages.set(ERR_OSON_VERSION_NOT_SUPPORTED, // NJS-126
374
+ 'OSON version %s is not supported');
375
+ messages.set(ERR_UNKOWN_SERVER_SIDE_PIGGYBACK, // NJS-127
376
+ 'internal error: unknown server side piggyback opcode %s');
377
+ messages.set(ERR_UNKNOWN_COLUMN_TYPE_NAME, // NJS-128
378
+ 'internal error: unknown column type name "%s"');
379
+ messages.set(ERR_INVALID_OBJECT_TYPE_NAME, // NJS-129
380
+ 'invalid object type name: "%s"');
381
+ messages.set(ERR_TDS_TYPE_NOT_SUPPORTED, // NJS-130
382
+ 'Oracle TDS data type %d is not supported');
383
+ messages.set(ERR_INVALID_COLL_INDEX_SET, // NJS-131
384
+ 'given index %d must be in the range of %d to %d');
385
+ messages.set(ERR_INVALID_COLL_INDEX_GET, // NJS-132
386
+ 'element at index %d does not exist');
387
+ messages.set(ERR_DELETE_ELEMENTS_OF_VARRAY, // NJS-133
388
+ 'cannot delete elements of a VARRAY');
389
+ messages.set(ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR, // NJS-134
390
+ 'value is of wrong type for attribute %s of object %s');
391
+ messages.set(ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM, // NJS-135
392
+ 'value is of wrong type for an element of object %s');
393
+ messages.set(ERR_WRONG_CRED_FOR_EXTAUTH, // NJS-136
394
+ 'user name and password cannot be set when using external authentication');
395
+ messages.set(ERR_MISSING_BIND_VALUE, // NJS-137
396
+ 'a bind variable replacement value for placeholder ":%s" was not provided');
397
+ messages.set(ERR_SERVER_VERSION_NOT_SUPPORTED, // NJS-138
398
+ 'connections to this database server version are not supported by node-oracledb in Thin mode');
399
+
400
+ // Oracle Net layer errors
401
+
402
+ messages.set(ERR_CONNECTION_CLOSED, // NJS-500
403
+ 'connection to the Oracle Database was broken');
404
+ messages.set(ERR_CONNECTION_LOSTCONTACT, // NJS-501
405
+ 'connection to host %s port %d terminated unexpectedly. (CONNECTION_ID=%s)\n%s');
406
+ messages.set(ERR_CONNECTION_INCOMPLETE, // NJS-503
407
+ 'connection to host %s port %d could not be established. (CONNECTION_ID=%s)\n%s');
408
+ messages.set(ERR_PROXY_CONNECTION_FAILURE, // NJS-504
409
+ 'connection establishment through a web proxy at host %s port %d failed. (CONNECTION_ID=%s)\n%s');
410
+ messages.set(ERR_TLS_INIT_FAILURE, // NJS-505
411
+ 'unable to initiate TLS connection. Please check if wallet credentials are valid');
412
+ messages.set(ERR_TLS_AUTH_FAILURE, // NJS-506
413
+ 'connection to host %s port %d encountered TLS handshake failure. (CONNECTION_ID=%s)\n%s');
414
+ messages.set(ERR_TLS_DNMATCH_FAILURE, // NJS-507
415
+ 'TLS detected an invalid certificate. Server DN in certificate does not match the specified DN');
416
+ messages.set(ERR_TLS_HOSTMATCH_FAILURE, // NJS-508
417
+ 'TLS detected an invalid certificate. %s not present in certificate');
418
+ messages.set(ERR_INVALID_PACKET, // NJS-509
419
+ 'internal error: invalid packet type or malformed packet received');
420
+ messages.set(ERR_CONNECTION_TIMEDOUT, // NJS-510
421
+ 'connection to host %s port %d timed out. Request exceeded "%s" of %d seconds. (CONNECTION_ID=%s)');
422
+ messages.set(ERR_CONNECTION_REFUSED, // NJS-511
423
+ 'connection to listener at host %s port %d was refused. (CONNECTION_ID=%s)\nCause: %s');
424
+ messages.set(ERR_INVALID_CONNECT_STRING_PARAMETERS, // NJS-512
425
+ 'invalid connection string parameters.\n%s');
426
+ messages.set(ERR_CONNECTION_INBAND, // NJS-513
427
+ 'error received through in-band notification: %s');
428
+ messages.set(ERR_INVALID_CONNECT_STRING_SYNTAX, // NJS-514
429
+ 'syntax error in connection string');
430
+ messages.set(ERR_INVALID_EZCONNECT_SYNTAX, // NJS-515
431
+ 'error in Easy Connect connection string: %s: %s');
432
+ messages.set(ERR_NO_CONFIG_DIR, // NJS-516
433
+ 'no configuration directory set or available to search for tnsnames.ora');
434
+ messages.set(ERR_TNS_ENTRY_NOT_FOUND, // NJS-517
435
+ 'cannot connect to Oracle Database. Unable to find "%s" in "%s"');
436
+ messages.set(ERR_INVALID_SERVICE_NAME, // NJS-518
437
+ 'cannot connect to Oracle Database. Service "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');
438
+ messages.set(ERR_INVALID_SID, // NJS-519
439
+ 'cannot connect to Oracle Database. SID "%s" is not registered with the listener at host %s port %s. (CONNECTION_ID=%s)');
440
+ messages.set(ERR_TNS_NAMES_FILE_MISSING, // NJS-520
441
+ 'cannot connect to Oracle Database. File tnsnames.ora not found in %s');
442
+ messages.set(ERR_CONNECTION_EOF, // NJS-521
443
+ 'connection to host %s port %d received end-of-file on communication channel. (CONNECTION_ID=%s)');
444
+
445
+ //-----------------------------------------------------------------------------
446
+ // assert()
447
+ //
448
+ // Checks the condition, and if the condition is not true, throws an exception
449
+ // using the specified error number and arguments.
450
+ //-----------------------------------------------------------------------------
451
+ function assert(condition) {
452
+ if (!condition) {
453
+ const args = Array.prototype.slice.call(arguments, 1);
454
+ throwErr(...args);
455
+ }
456
+ }
457
+
458
+ //-----------------------------------------------------------------------------
459
+ // assertArgCount()
460
+ //
461
+ // Asserts that the argument count falls between the minimum and maximum number
462
+ // of arguments.
463
+ //-----------------------------------------------------------------------------
464
+ function assertArgCount(args, minArgCount, maxArgCount) {
465
+ assert(args.length >= minArgCount && args.length <= maxArgCount,
466
+ ERR_INVALID_NUMBER_OF_PARAMETERS);
467
+ }
468
+
469
+ //-----------------------------------------------------------------------------
470
+ // assertParamPropBool()
471
+ //
472
+ // Asserts that the property value of a parmeter is a boolean value (or
473
+ // undefined).
474
+ //-----------------------------------------------------------------------------
475
+ function assertParamPropBool(obj, parameterNum, propName) {
476
+ if (obj[propName] !== undefined) {
477
+ assertParamPropValue(typeof obj[propName] === 'boolean', parameterNum,
478
+ propName);
479
+ }
480
+ }
481
+
482
+ //-----------------------------------------------------------------------------
483
+ // assertParamPropFunction()
484
+ //
485
+ // Asserts that the property value of a parmeter is a function (or undefined).
486
+ //-----------------------------------------------------------------------------
487
+ function assertParamPropFunction(obj, parameterNum, propName) {
488
+ if (obj[propName] !== undefined) {
489
+ assertParamPropValue(typeof obj[propName] === 'function', parameterNum,
490
+ propName);
491
+ }
492
+ }
493
+
494
+ //-----------------------------------------------------------------------------
495
+ // assertParamPropInt()
496
+ //
497
+ // Asserts that the property value of a parmeter is an integer value (or
498
+ // undefined).
499
+ //-----------------------------------------------------------------------------
500
+ function assertParamPropInt(obj, parameterNum, propName) {
501
+ if (obj[propName] !== undefined) {
502
+ assertParamPropValue(Number.isInteger(obj[propName]), parameterNum,
503
+ propName);
504
+ }
505
+ }
506
+
507
+ //-----------------------------------------------------------------------------
508
+ // assertParamPropUnsignedInt()
509
+ //
510
+ // Asserts that the property value of a parmeter is a positive integer value
511
+ // (or undefined).
512
+ //-----------------------------------------------------------------------------
513
+ function assertParamPropUnsignedInt(obj, parameterNum, propName) {
514
+ if (obj[propName] !== undefined) {
515
+ assertParamPropValue(Number.isInteger(obj[propName]) && obj[propName] >= 0,
516
+ parameterNum, propName);
517
+ }
518
+ }
519
+
520
+ //-----------------------------------------------------------------------------
521
+ // assertParamPropString()
522
+ //
523
+ // Asserts that the property value of a parmeter is a function (or undefined).
524
+ //-----------------------------------------------------------------------------
525
+ function assertParamPropString(obj, parameterNum, propName) {
526
+ if (obj[propName] !== undefined) {
527
+ assertParamPropValue(typeof obj[propName] === 'string', parameterNum,
528
+ propName);
529
+ }
530
+ }
531
+
532
+ //-----------------------------------------------------------------------------
533
+ // assertParamPropValue()
534
+ //
535
+ // Asserts that the property value of a parmeter passes the specified
536
+ // condition.
537
+ //-----------------------------------------------------------------------------
538
+ function assertParamPropValue(condition, parameterNum, propName) {
539
+ assert(condition, ERR_INVALID_PROPERTY_VALUE_IN_PARAM, propName,
540
+ parameterNum);
541
+ }
542
+
543
+ //-----------------------------------------------------------------------------
544
+ // assertParamValue()
545
+ //
546
+ // Asserts that the parmeter value passes the specified condition.
547
+ //-----------------------------------------------------------------------------
548
+ function assertParamValue(condition, parameterNum) {
549
+ assert(condition, ERR_INVALID_PARAMETER_VALUE, parameterNum);
550
+ }
551
+
552
+ //-----------------------------------------------------------------------------
553
+ // assertPropValue()
554
+ //
555
+ // Asserts that the property value passes the specified condition.
556
+ //-----------------------------------------------------------------------------
557
+ function assertPropValue(condition, propName) {
558
+ assert(condition, ERR_INVALID_PROPERTY_VALUE, propName);
559
+ }
560
+
561
+ //-----------------------------------------------------------------------------
562
+ // getErr()
563
+ //
564
+ // Returns an error object with the given error number after formatting it with
565
+ // the given arguments.
566
+ //-----------------------------------------------------------------------------
567
+ function getErr(errorNum) {
568
+ let baseText = messages.get(errorNum);
569
+ let args = [...arguments];
570
+ if (!baseText) {
571
+ args = [undefined, errorNum];
572
+ errorNum = ERR_INVALID_ERR_NUM;
573
+ baseText = messages.get(errorNum);
574
+ }
575
+ const errorNumStr = errorNum.toString().padStart(3, '0');
576
+ const code = `${ERR_PREFIX}-${errorNumStr}`;
577
+ args[0] = `${code}: ${baseText}`;
578
+ const err = new Error(util.format(...args));
579
+ err.code = code;
580
+ Error.captureStackTrace(err, getErr);
581
+ return err;
582
+ }
583
+
584
+ //-----------------------------------------------------------------------------
585
+ // throwErr()
586
+ //
587
+ // Throws an error with the given error number after formatting it with the
588
+ // given arguments.
589
+ //-----------------------------------------------------------------------------
590
+ function throwErr() {
591
+ throw (getErr(...arguments));
592
+ }
593
+
594
+ //-----------------------------------------------------------------------------
595
+ // throwNotImplemented()
596
+ //
597
+ // Throws an error that the feature is not supported in Thin mode
598
+ //-----------------------------------------------------------------------------
599
+ function throwNotImplemented(feature) {
600
+ throwErr(ERR_NOT_IMPLEMENTED, feature);
601
+ }
602
+
603
+ //-----------------------------------------------------------------------------
604
+ // transformErr()
605
+ //
606
+ // Adjusts the supplied error, if necessary, by looking for specific ODPI-C and
607
+ // Oracle errors and replacing them with driver specific errors.
608
+ //-----------------------------------------------------------------------------
609
+ function transformErr(err, fnOpt) {
610
+ if (!err.code) {
611
+ const pos = err.message.indexOf(":");
612
+ if (pos > 0) {
613
+ err.code = err.message.substr(0, pos);
614
+ if (adjustErrorXref.has(err.code)) {
615
+ let args = [];
616
+ let driverErrorNum;
617
+ let driverErrorInfo = adjustErrorXref.get(err.code);
618
+ if (typeof driverErrorInfo === 'number') {
619
+ driverErrorNum = driverErrorInfo;
620
+ } else {
621
+ driverErrorNum = driverErrorInfo[0];
622
+ const pattern = driverErrorInfo[1];
623
+ const results = err.message.match(pattern);
624
+ if (results) {
625
+ args = results.slice(1);
626
+ }
627
+ }
628
+ const newErr = getErr(driverErrorNum, ...args);
629
+ err.code = newErr.code;
630
+ err.message = newErr.message + "\n" + err.message;
631
+ }
632
+ }
633
+ }
634
+
635
+ if (err.requiresStackCapture) {
636
+ delete err.requiresStackCapture;
637
+ Error.captureStackTrace(err, fnOpt);
638
+ }
639
+ return err;
640
+ }
641
+
642
+ // define exports
643
+ module.exports = {
644
+ ERR_INVALID_POOL,
645
+ ERR_INVALID_CONNECTION,
646
+ ERR_INVALID_PROPERTY_VALUE,
647
+ ERR_INVALID_PARAMETER_VALUE,
648
+ ERR_INVALID_PROPERTY_VALUE_IN_PARAM,
649
+ ERR_INVALID_NUMBER_OF_PARAMETERS,
650
+ ERR_UNSUPPORTED_DATA_TYPE,
651
+ ERR_BIND_VALUE_AND_TYPE_MISMATCH,
652
+ ERR_INVALID_BIND_DATA_TYPE,
653
+ ERR_INVALID_BIND_DIRECTION,
654
+ ERR_NO_TYPE_FOR_CONVERSION,
655
+ ERR_INSUFFICIENT_BUFFER_FOR_BINDS,
656
+ ERR_BUSY_RS,
657
+ ERR_INVALID_RS,
658
+ ERR_NOT_A_QUERY,
659
+ ERR_INVALID_TYPE_FOR_CONVERSION,
660
+ ERR_INVALID_LOB,
661
+ ERR_BUSY_LOB,
662
+ ERR_INSUFFICIENT_MEMORY,
663
+ ERR_INVALID_TYPE_FOR_ARRAY_BIND,
664
+ ERR_REQUIRED_MAX_ARRAY_SIZE,
665
+ ERR_INVALID_ARRAY_SIZE,
666
+ ERR_INCOMPATIBLE_TYPE_ARRAY_BIND,
667
+ ERR_CONN_REQUEST_TIMEOUT,
668
+ ERR_CANNOT_CONVERT_RS_TO_STREAM,
669
+ ERR_CANNOT_INVOKE_RS_METHODS,
670
+ ERR_RS_ALREADY_CONVERTED,
671
+ ERR_INVALID_BIND_UNIT,
672
+ ERR_CANNOT_LOAD_BINARY,
673
+ ERR_POOL_WITH_ALIAS_ALREADY_EXISTS,
674
+ ERR_POOL_WITH_ALIAS_NOT_FOUND,
675
+ ERR_INCOMPATIBLE_TYPE_ARRAY_INDEX_BIND,
676
+ ERR_MIXED_BIND,
677
+ ERR_MISSING_MAX_SIZE_BY_POS,
678
+ ERR_MISSING_MAX_SIZE_BY_NAME,
679
+ ERR_MAX_SIZE_TOO_SMALL,
680
+ ERR_MISSING_TYPE_BY_POS,
681
+ ERR_MISSING_TYPE_BY_NAME,
682
+ ERR_INVALID_SUBSCR,
683
+ ERR_MISSING_SUBSCR_CALLBACK,
684
+ ERR_MISSING_SUBSCR_SQL,
685
+ ERR_POOL_CLOSING,
686
+ ERR_POOL_CLOSED,
687
+ ERR_INVALID_SODA_DOC_CURSOR,
688
+ ERR_NO_BINARY_AVAILABLE,
689
+ ERR_INVALID_ERR_NUM,
690
+ ERR_NODE_TOO_OLD,
691
+ ERR_INVALID_AQ_MESSAGE,
692
+ ERR_DBL_CONNECT_STRING,
693
+ ERR_QUEUE_MAX_EXCEEDED,
694
+ ERR_UNSUPPORTED_DATA_TYPE_IN_JSON,
695
+ ERR_DBL_USER,
696
+ ERR_CONCURRENT_OPS,
697
+ ERR_POOL_RECONFIGURING,
698
+ ERR_POOL_STATISTICS_DISABLED,
699
+ ERR_TOKEN_BASED_AUTH,
700
+ ERR_POOL_TOKEN_BASED_AUTH,
701
+ ERR_CONN_TOKEN_BASED_AUTH,
702
+ ERR_TOKEN_HAS_EXPIRED,
703
+ ERR_NOT_IMPLEMENTED,
704
+ ERR_INIT_ORACLE_CLIENT_ARGS,
705
+ ERR_MISSING_FILE,
706
+ ERR_INVALID_NUMBER_OF_CONNECTIONS,
707
+ ERR_EXEC_MODE_ONLY_FOR_DML,
708
+ ERR_CONNECTION_CLOSED,
709
+ ERR_CONNECTION_LOSTCONTACT,
710
+ ERR_CONNECTION_INCOMPLETE,
711
+ ERR_PROXY_CONNECTION_FAILURE,
712
+ ERR_TLS_INIT_FAILURE,
713
+ ERR_TLS_AUTH_FAILURE,
714
+ ERR_TLS_DNMATCH_FAILURE,
715
+ ERR_TLS_HOSTMATCH_FAILURE,
716
+ ERR_INVALID_PACKET,
717
+ ERR_CONNECTION_TIMEDOUT,
718
+ ERR_CONNECTION_REFUSED,
719
+ ERR_INVALID_CONNECT_STRING_PARAMETERS,
720
+ ERR_CONNECTION_INBAND,
721
+ ERR_INVALID_CONNECT_STRING_SYNTAX,
722
+ ERR_INVALID_EZCONNECT_SYNTAX,
723
+ ERR_NO_CONFIG_DIR,
724
+ ERR_TNS_ENTRY_NOT_FOUND,
725
+ ERR_CONNECTION_EOF,
726
+ ERR_INVALID_BIND_NAME,
727
+ ERR_WRONG_NUMBER_OF_POSITIONAL_BINDS,
728
+ ERR_BUFFER_LENGTH_INSUFFICIENT,
729
+ ERR_NCHAR_CS_NOT_SUPPORTED,
730
+ ERR_MISSING_CREDENTIALS,
731
+ ERR_UNEXPECTED_END_OF_DATA,
732
+ ERR_UNEXPECTED_MESSAGE_TYPE,
733
+ ERR_POOL_HAS_BUSY_CONNECTIONS,
734
+ ERR_INTERNAL,
735
+ ERR_INVALID_REF_CURSOR,
736
+ ERR_UNSUPPORTED_VERIFIER_TYPE,
737
+ ERR_NAN_VALUE,
738
+ ERR_LOB_CLOSED,
739
+ ERR_ORACLE_NUMBER_NO_REPR,
740
+ ERR_INVALID_SERVICE_NAME,
741
+ ERR_INVALID_SID,
742
+ ERR_TNS_NAMES_FILE_MISSING,
743
+ ERR_INVALID_TYPE_NUM,
744
+ ERR_INVALID_ORACLE_TYPE_NUM,
745
+ ERR_UNEXPECTED_NEGATIVE_INTEGER,
746
+ ERR_INTEGER_TOO_LARGE,
747
+ ERR_UNEXPECTED_DATA,
748
+ ERR_OSON_FIELD_NAME_LIMITATION,
749
+ ERR_OSON_VERSION_NOT_SUPPORTED,
750
+ ERR_INVALID_PRIVATE_KEY,
751
+ ERR_THIN_CONNECTION_ALREADY_CREATED,
752
+ ERR_UNSUPPORTED_CONVERSION,
753
+ ERR_FETCH_TYPE_HANDLER_RETURN_VALUE,
754
+ ERR_FETCH_TYPE_HANDLER_TYPE,
755
+ ERR_FETCH_TYPE_HANDLER_CONVERTER,
756
+ ERR_CALL_TIMEOUT_EXCEEDED,
757
+ ERR_EMPTY_CONNECT_STRING,
758
+ ERR_UNKOWN_SERVER_SIDE_PIGGYBACK,
759
+ ERR_UNKNOWN_COLUMN_TYPE_NAME,
760
+ ERR_INVALID_OBJECT_TYPE_NAME,
761
+ ERR_TDS_TYPE_NOT_SUPPORTED,
762
+ ERR_INVALID_COLL_INDEX_SET,
763
+ ERR_INVALID_COLL_INDEX_GET,
764
+ ERR_DELETE_ELEMENTS_OF_VARRAY,
765
+ ERR_WRONG_VALUE_FOR_DBOBJECT_ATTR,
766
+ ERR_WRONG_VALUE_FOR_DBOBJECT_ELEM,
767
+ ERR_WRONG_CRED_FOR_EXTAUTH,
768
+ ERR_MISSING_BIND_VALUE,
769
+ ERR_SERVER_VERSION_NOT_SUPPORTED,
770
+ ERR_CONNECTION_CLOSED_CODE: `${ERR_PREFIX}-${ERR_CONNECTION_CLOSED}`,
771
+ assert,
772
+ assertArgCount,
773
+ assertParamPropBool,
774
+ assertParamPropFunction,
775
+ assertParamPropInt,
776
+ assertParamPropString,
777
+ assertParamPropUnsignedInt,
778
+ assertParamPropValue,
779
+ assertParamValue,
780
+ assertPropValue,
781
+ getErr,
782
+ throwErr,
783
+ throwNotImplemented,
784
+ transformErr
785
+ };