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.
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.0-darwin-x64.node +0 -0
  7. package/build/Release/oracledb-6.0.0-darwin-x64.node-buildinfo.txt +1 -0
  8. package/build/Release/oracledb-6.0.0-js-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-6.0.0-linux-arm64.node +0 -0
  10. package/build/Release/oracledb-6.0.0-linux-arm64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-6.0.0-linux-x64.node +0 -0
  12. package/build/Release/oracledb-6.0.0-linux-x64.node-buildinfo.txt +1 -0
  13. package/build/Release/oracledb-6.0.0-win32-x64.node +0 -0
  14. package/build/Release/oracledb-6.0.0-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 +146 -7
  20. package/lib/aqEnqOptions.js +59 -7
  21. package/lib/aqMessage.js +118 -7
  22. package/lib/aqQueue.js +242 -53
  23. package/lib/connection.js +1324 -465
  24. package/lib/constants.js +203 -0
  25. package/lib/dbObject.js +346 -32
  26. package/lib/errors.js +781 -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 +156 -68
  43. package/lib/oracledb.js +1047 -345
  44. package/lib/pool.js +654 -465
  45. package/lib/poolStatistics.js +23 -9
  46. package/lib/queryStream.js +14 -7
  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 +107 -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 +1038 -0
  55. package/lib/thin/dbObject.js +629 -0
  56. package/lib/thin/index.js +40 -0
  57. package/lib/thin/lob.js +188 -0
  58. package/lib/thin/pool.js +481 -0
  59. package/lib/thin/protocol/buffer.js +1040 -0
  60. package/lib/thin/protocol/capabilities.js +116 -0
  61. package/lib/thin/protocol/constants.js +764 -0
  62. package/lib/thin/protocol/encryptDecrypt.js +185 -0
  63. package/lib/thin/protocol/messages/auth.js +348 -0
  64. package/lib/thin/protocol/messages/base.js +475 -0
  65. package/lib/thin/protocol/messages/commit.js +56 -0
  66. package/lib/thin/protocol/messages/dataType.js +382 -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 +200 -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 +811 -0
  77. package/lib/thin/protocol/oson.js +660 -0
  78. package/lib/thin/protocol/packet.js +520 -0
  79. package/lib/thin/protocol/protocol.js +202 -0
  80. package/lib/thin/protocol/utils.js +88 -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 +620 -0
  87. package/lib/thin/sqlnet/ntTcp.js +525 -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 +205 -0
  91. package/lib/thin/sqlnet/sessionAtts.js +160 -0
  92. package/lib/thin/statement.js +301 -0
  93. package/lib/thin/util.js +289 -0
  94. package/lib/transformer.js +250 -0
  95. package/lib/types.js +357 -0
  96. package/lib/util.js +194 -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
@@ -0,0 +1,116 @@
1
+ // Copyright (c) 2022, 2023, Oracle and/or its affiliates.
2
+
3
+ //-----------------------------------------------------------------------------
4
+ //
5
+ // This software is dual-licensed to you under the Universal Permissive License
6
+ // (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
7
+ // 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose
8
+ // either license.
9
+ //
10
+ // If you elect to accept the software under the Apache License, Version 2.0,
11
+ // the following applies:
12
+ //
13
+ // Licensed under the Apache License, Version 2.0 (the "License");
14
+ // you may not use this file except in compliance with the License.
15
+ // You may obtain a copy of the License at
16
+ //
17
+ // https://www.apache.org/licenses/LICENSE-2.0
18
+ //
19
+ // Unless required by applicable law or agreed to in writing, software
20
+ // distributed under the License is distributed on an "AS IS" BASIS,
21
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
+ // See the License for the specific language governing permissions and
23
+ // limitations under the License.
24
+ //
25
+ //-----------------------------------------------------------------------------
26
+
27
+ 'use strict';
28
+
29
+ const Buffer = require("buffer").Buffer;
30
+ const constants = require("./constants.js");
31
+ const errors = require('../../errors');
32
+
33
+ /**
34
+ * Negotiates Compiletime and Runtime capabilities
35
+ *
36
+ */
37
+ class Capabilities {
38
+
39
+ constructor(protocolVersion) {
40
+ this.protocolVersion = protocolVersion;
41
+ this.ttcFieldVersion = constants.TNS_CCAP_FIELD_VERSION_MAX;
42
+ this.supports12cLogon = true;
43
+ this.supportsOob = false;
44
+ this.nCharsetId = constants.TNS_CHARSET_UTF16;
45
+ this.compileCaps = Buffer.alloc(constants.TNS_CCAP_MAX);
46
+ this.runtimeCaps = Buffer.alloc(constants.TNS_RCAP_MAX);
47
+ this.initCompileCaps();
48
+ this.initRuntimeCaps();
49
+ }
50
+
51
+ adjustForServerCompileCaps(serverCaps) {
52
+ if (serverCaps[constants.TNS_CCAP_FIELD_VERSION] < this.ttcFieldVersion) {
53
+ this.ttcFieldVersion = serverCaps[constants.TNS_CCAP_FIELD_VERSION];
54
+ this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] =
55
+ this.ttcFieldVersion;
56
+ }
57
+ }
58
+
59
+ adjustForServerRuntimeCaps() {
60
+ // nothing to do currently
61
+ }
62
+
63
+ initCompileCaps() {
64
+ this.compileCaps[constants.TNS_CCAP_SQL_VERSION] =
65
+ constants.TNS_CCAP_SQL_VERSION_MAX;
66
+ this.compileCaps[constants.TNS_CCAP_LOGON_TYPES] =
67
+ constants.TNS_CCAP_O5LOGON | constants.TNS_CCAP_O5LOGON_NP |
68
+ constants.TNS_CCAP_O7LOGON | constants.TNS_CCAP_O8LOGON_LONG_IDENTIFIER |
69
+ constants.TNS_CCAP_O9LOGON_LONG_PASSWORD;
70
+ this.compileCaps[constants.TNS_CCAP_FIELD_VERSION] = this.ttcFieldVersion;
71
+ this.compileCaps[constants.TNS_CCAP_SERVER_DEFINE_CONV] = 1;
72
+ this.compileCaps[constants.TNS_CCAP_TTC1] =
73
+ constants.TNS_CCAP_FAST_BVEC | constants.TNS_CCAP_END_OF_CALL_STATUS |
74
+ constants.TNS_CCAP_IND_RCD;
75
+ this.compileCaps[constants.TNS_CCAP_OCI1] =
76
+ constants.TNS_CCAP_FAST_SESSION_PROPAGATE |
77
+ constants.TNS_CCAP_APP_CTX_PIGGYBACK;
78
+ this.compileCaps[constants.TNS_CCAP_TDS_VERSION] =
79
+ constants.TNS_CCAP_TDS_VERSION_MAX;
80
+ this.compileCaps[constants.TNS_CCAP_RPC_VERSION] =
81
+ constants.TNS_CCAP_RPC_VERSION_MAX;
82
+ this.compileCaps[constants.TNS_CCAP_RPC_SIG] =
83
+ constants.TNS_CCAP_RPC_SIG_VALUE;
84
+ this.compileCaps[constants.TNS_CCAP_DBF_VERSION] =
85
+ constants.TNS_CCAP_DBF_VERSION_MAX;
86
+ this.compileCaps[constants.TNS_CCAP_LOB] =
87
+ constants.TNS_CCAP_LOB_UB8_SIZE | constants.TNS_CCAP_LOB_ENCS | constants.TNS_CCAP_LOB_PREFETCH;
88
+ this.compileCaps[constants.TNS_CCAP_UB2_DTY] = 1;
89
+ this.compileCaps[constants.TNS_CCAP_LOB2] =
90
+ constants.TNS_CCAP_LOB2_QUASI | constants.TNS_CCAP_LOB2_2GB_PREFETCH;
91
+ this.compileCaps[constants.TNS_CCAP_TTC3] =
92
+ constants.TNS_CCAP_IMPLICIT_RESULTS | constants.TNS_CCAP_BIG_CHUNK_CLR |
93
+ constants.TNS_CCAP_KEEP_OUT_ORDER;
94
+ this.compileCaps[constants.TNS_CCAP_TTC2] = constants.TNS_CCAP_ZLNP;
95
+ this.compileCaps[constants.TNS_CCAP_OCI2] = constants.TNS_CCAP_DRCP;
96
+ this.compileCaps[constants.TNS_CCAP_CLIENT_FN] =
97
+ constants.TNS_CCAP_CLIENT_FN_MAX;
98
+ this.compileCaps[constants.TNS_CCAP_TTC4] =
99
+ constants.TNS_CCAP_INBAND_NOTIFICATION;
100
+ }
101
+
102
+ initRuntimeCaps() {
103
+ this.runtimeCaps[constants.TNS_RCAP_COMPAT] = constants.TNS_RCAP_COMPAT_81;
104
+ this.runtimeCaps[constants.TNS_RCAP_TTC] =
105
+ constants.TNS_RCAP_TTC_ZERO_COPY | constants.TNS_RCAP_TTC_32K;
106
+ }
107
+
108
+ checkNCharsetId() {
109
+ if (this.nCharsetId !== constants.TNS_CHARSET_UTF16) {
110
+ errors.throwErr(errors.ERR_NCHAR_CS_NOT_SUPPORTED, this.nCharsetId);
111
+ }
112
+ }
113
+
114
+ }
115
+
116
+ module.exports = Capabilities;