oracledb 3.0.0 → 3.1.2

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 (112) hide show
  1. package/CHANGELOG.md +135 -8
  2. package/README.md +6 -4
  3. package/build/Release/oracledb-abi48-darwin-x64.node +0 -0
  4. package/build/Release/oracledb-abi48-darwin-x64.node-buildinfo.txt +1 -0
  5. package/build/Release/oracledb-abi48-linux-x64.node +0 -0
  6. package/build/Release/oracledb-abi48-linux-x64.node-buildinfo.txt +1 -0
  7. package/build/Release/oracledb-abi48-win32-x64.node +0 -0
  8. package/build/Release/oracledb-abi48-win32-x64.node-buildinfo.txt +1 -0
  9. package/build/Release/oracledb-abi57-darwin-x64.node +0 -0
  10. package/build/Release/oracledb-abi57-darwin-x64.node-buildinfo.txt +1 -0
  11. package/build/Release/oracledb-abi57-linux-x64.node +0 -0
  12. package/build/Release/oracledb-abi57-linux-x64.node-buildinfo.txt +1 -0
  13. package/build/Release/oracledb-abi57-win32-x64.node +0 -0
  14. package/build/Release/oracledb-abi57-win32-x64.node-buildinfo.txt +1 -0
  15. package/build/Release/oracledb-abi64-darwin-x64.node +0 -0
  16. package/build/Release/oracledb-abi64-darwin-x64.node-buildinfo.txt +1 -0
  17. package/build/Release/oracledb-abi64-linux-x64.node +0 -0
  18. package/build/Release/oracledb-abi64-linux-x64.node-buildinfo.txt +1 -0
  19. package/build/Release/oracledb-abi64-win32-x64.node +0 -0
  20. package/build/Release/oracledb-abi64-win32-x64.node-buildinfo.txt +1 -0
  21. package/build/Release/oracledb-abi67-darwin-x64.node +0 -0
  22. package/build/Release/oracledb-abi67-darwin-x64.node-buildinfo.txt +1 -0
  23. package/build/Release/oracledb-abi67-linux-x64.node +0 -0
  24. package/build/Release/oracledb-abi67-linux-x64.node-buildinfo.txt +1 -0
  25. package/build/Release/oracledb-abi67-win32-x64.node +0 -0
  26. package/build/Release/oracledb-abi67-win32-x64.node-buildinfo.txt +1 -0
  27. package/lib/connection.js +18 -4
  28. package/lib/oracledb.js +44 -92
  29. package/lib/pool.js +36 -2
  30. package/lib/sodaCollection.js +1 -1
  31. package/lib/sodaDatabase.js +1 -1
  32. package/lib/util.js +82 -5
  33. package/package/README.md +32 -101
  34. package/package/install.js +139 -0
  35. package/package/prunebinaries.js +51 -0
  36. package/package.json +4 -11
  37. package/binding.gyp +0 -162
  38. package/lib/rel.txt +0 -1
  39. package/odpi/.npmignore +0 -4
  40. package/odpi/LICENSE.md +0 -218
  41. package/odpi/README.md +0 -61
  42. package/odpi/embed/README.md +0 -4
  43. package/odpi/embed/dpi.c +0 -50
  44. package/odpi/include/dpi.h +0 -1748
  45. package/odpi/src/dpiConn.c +0 -2089
  46. package/odpi/src/dpiContext.c +0 -296
  47. package/odpi/src/dpiData.c +0 -797
  48. package/odpi/src/dpiDebug.c +0 -184
  49. package/odpi/src/dpiDeqOptions.c +0 -370
  50. package/odpi/src/dpiEnqOptions.c +0 -174
  51. package/odpi/src/dpiEnv.c +0 -189
  52. package/odpi/src/dpiError.c +0 -204
  53. package/odpi/src/dpiErrorMessages.h +0 -86
  54. package/odpi/src/dpiGen.c +0 -303
  55. package/odpi/src/dpiGlobal.c +0 -292
  56. package/odpi/src/dpiHandleList.c +0 -117
  57. package/odpi/src/dpiHandlePool.c +0 -118
  58. package/odpi/src/dpiImpl.h +0 -1707
  59. package/odpi/src/dpiLob.c +0 -506
  60. package/odpi/src/dpiMsgProps.c +0 -386
  61. package/odpi/src/dpiObject.c +0 -897
  62. package/odpi/src/dpiObjectAttr.c +0 -115
  63. package/odpi/src/dpiObjectType.c +0 -326
  64. package/odpi/src/dpiOci.c +0 -3527
  65. package/odpi/src/dpiOracleType.c +0 -492
  66. package/odpi/src/dpiPool.c +0 -549
  67. package/odpi/src/dpiRowid.c +0 -136
  68. package/odpi/src/dpiSodaColl.c +0 -685
  69. package/odpi/src/dpiSodaCollCursor.c +0 -143
  70. package/odpi/src/dpiSodaDb.c +0 -432
  71. package/odpi/src/dpiSodaDoc.c +0 -230
  72. package/odpi/src/dpiSodaDocCursor.c +0 -143
  73. package/odpi/src/dpiStmt.c +0 -1797
  74. package/odpi/src/dpiSubscr.c +0 -674
  75. package/odpi/src/dpiUtils.c +0 -410
  76. package/odpi/src/dpiVar.c +0 -1794
  77. package/package/MAKEPKG.BAT +0 -156
  78. package/package/Makefile +0 -85
  79. package/package/createpackage.js +0 -186
  80. package/package/extractpackage.js +0 -76
  81. package/package/getversion.js +0 -37
  82. package/package/oracledbinstall.js +0 -497
  83. package/package/package.json +0 -54
  84. package/package/util.js +0 -286
  85. package/src/njsCommon.cpp +0 -1055
  86. package/src/njsCommon.h +0 -484
  87. package/src/njsConnection.cpp +0 -2926
  88. package/src/njsConnection.h +0 -227
  89. package/src/njsIntLob.cpp +0 -618
  90. package/src/njsIntLob.h +0 -179
  91. package/src/njsMessages.cpp +0 -122
  92. package/src/njsMessages.h +0 -118
  93. package/src/njsOracle.cpp +0 -1274
  94. package/src/njsOracle.h +0 -237
  95. package/src/njsPool.cpp +0 -482
  96. package/src/njsPool.h +0 -132
  97. package/src/njsResultSet.cpp +0 -478
  98. package/src/njsResultSet.h +0 -120
  99. package/src/njsSodaCollection.cpp +0 -507
  100. package/src/njsSodaCollection.h +0 -128
  101. package/src/njsSodaDatabase.cpp +0 -335
  102. package/src/njsSodaDatabase.h +0 -108
  103. package/src/njsSodaDocCursor.cpp +0 -203
  104. package/src/njsSodaDocCursor.h +0 -94
  105. package/src/njsSodaDocument.cpp +0 -412
  106. package/src/njsSodaDocument.h +0 -105
  107. package/src/njsSodaOperation.cpp +0 -557
  108. package/src/njsSodaOperation.h +0 -123
  109. package/src/njsSubscription.cpp +0 -388
  110. package/src/njsSubscription.h +0 -111
  111. package/src/njsUtils.cpp +0 -158
  112. package/src/njsUtils.h +0 -68
@@ -1,296 +0,0 @@
1
- //-----------------------------------------------------------------------------
2
- // Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
3
- // This program is free software: you can modify it and/or redistribute it
4
- // under the terms of:
5
- //
6
- // (i) the Universal Permissive License v 1.0 or at your option, any
7
- // later version (http://oss.oracle.com/licenses/upl); and/or
8
- //
9
- // (ii) the Apache License v 2.0. (http://www.apache.org/licenses/LICENSE-2.0)
10
- //-----------------------------------------------------------------------------
11
-
12
- //-----------------------------------------------------------------------------
13
- // dpiContext.c
14
- // Implementation of context. Each context uses a specific version of the
15
- // ODPI-C library, which is checked for compatibility before allowing its use.
16
- //-----------------------------------------------------------------------------
17
-
18
- #include "dpiImpl.h"
19
-
20
- // maintain major and minor versions compiled into the library
21
- static const unsigned int dpiMajorVersion = DPI_MAJOR_VERSION;
22
- static const unsigned int dpiMinorVersion = DPI_MINOR_VERSION;
23
-
24
-
25
- //-----------------------------------------------------------------------------
26
- // dpiContext__create() [INTERNAL]
27
- // Create a new context for interaction with the library. The major versions
28
- // must match and the minor version of the caller must be less than or equal to
29
- // the minor version compiled into the library.
30
- //-----------------------------------------------------------------------------
31
- static int dpiContext__create(const char *fnName, unsigned int majorVersion,
32
- unsigned int minorVersion, dpiContext **context, dpiError *error)
33
- {
34
- dpiContext *tempContext;
35
-
36
- // get error structure first (populates global environment if needed)
37
- if (dpiGlobal__initError(fnName, error) < 0)
38
- return DPI_FAILURE;
39
-
40
- // validate context handle
41
- if (!context)
42
- return dpiError__set(error, "check context handle",
43
- DPI_ERR_NULL_POINTER_PARAMETER, "context");
44
-
45
- // verify that the supplied version is supported by the library
46
- if (dpiMajorVersion != majorVersion || minorVersion > dpiMinorVersion)
47
- return dpiError__set(error, "check version",
48
- DPI_ERR_VERSION_NOT_SUPPORTED, majorVersion, minorVersion,
49
- dpiMajorVersion, dpiMinorVersion);
50
-
51
- // allocate context and initialize it
52
- if (dpiGen__allocate(DPI_HTYPE_CONTEXT, NULL, (void**) &tempContext,
53
- error) < 0)
54
- return DPI_FAILURE;
55
- tempContext->dpiMinorVersion = (uint8_t) minorVersion;
56
- dpiOci__clientVersion(tempContext);
57
-
58
- *context = tempContext;
59
- return DPI_SUCCESS;
60
- }
61
-
62
-
63
- //-----------------------------------------------------------------------------
64
- // dpiContext__initCommonCreateParams() [INTERNAL]
65
- // Initialize the common connection/pool creation parameters to default
66
- // values.
67
- //-----------------------------------------------------------------------------
68
- void dpiContext__initCommonCreateParams(dpiCommonCreateParams *params)
69
- {
70
- memset(params, 0, sizeof(dpiCommonCreateParams));
71
- }
72
-
73
-
74
- //-----------------------------------------------------------------------------
75
- // dpiContext__initConnCreateParams() [INTERNAL]
76
- // Initialize the connection creation parameters to default values. Return
77
- // the structure size as a convenience for calling functions which may have to
78
- // differentiate between different ODPI-C application versions.
79
- //-----------------------------------------------------------------------------
80
- void dpiContext__initConnCreateParams(dpiConnCreateParams *params)
81
- {
82
- memset(params, 0, sizeof(dpiConnCreateParams));
83
- }
84
-
85
-
86
- //-----------------------------------------------------------------------------
87
- // dpiContext__initPoolCreateParams() [INTERNAL]
88
- // Initialize the pool creation parameters to default values.
89
- //-----------------------------------------------------------------------------
90
- void dpiContext__initPoolCreateParams(dpiPoolCreateParams *params)
91
- {
92
- memset(params, 0, sizeof(dpiPoolCreateParams));
93
- params->minSessions = 1;
94
- params->maxSessions = 1;
95
- params->sessionIncrement = 0;
96
- params->homogeneous = 1;
97
- params->getMode = DPI_MODE_POOL_GET_NOWAIT;
98
- params->pingInterval = DPI_DEFAULT_PING_INTERVAL;
99
- params->pingTimeout = DPI_DEFAULT_PING_TIMEOUT;
100
- }
101
-
102
-
103
- //-----------------------------------------------------------------------------
104
- // dpiContext__initSodaOperOptions() [INTERNAL]
105
- // Initialize the SODA operation options to default values.
106
- //-----------------------------------------------------------------------------
107
- void dpiContext__initSodaOperOptions(dpiSodaOperOptions *options)
108
- {
109
- memset(options, 0, sizeof(dpiSodaOperOptions));
110
- }
111
-
112
-
113
- //-----------------------------------------------------------------------------
114
- // dpiContext__initSubscrCreateParams() [INTERNAL]
115
- // Initialize the subscription creation parameters to default values.
116
- //-----------------------------------------------------------------------------
117
- void dpiContext__initSubscrCreateParams(dpiSubscrCreateParams *params)
118
- {
119
- memset(params, 0, sizeof(dpiSubscrCreateParams));
120
- params->subscrNamespace = DPI_SUBSCR_NAMESPACE_DBCHANGE;
121
- params->groupingType = DPI_SUBSCR_GROUPING_TYPE_SUMMARY;
122
- }
123
-
124
-
125
- //-----------------------------------------------------------------------------
126
- // dpiContext_create() [PUBLIC]
127
- // Create a new context for interaction with the library. The major versions
128
- // must match and the minor version of the caller must be less than or equal to
129
- // the minor version compiled into the library.
130
- //-----------------------------------------------------------------------------
131
- int dpiContext_create(unsigned int majorVersion, unsigned int minorVersion,
132
- dpiContext **context, dpiErrorInfo *errorInfo)
133
- {
134
- dpiError error;
135
- int status;
136
-
137
- if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS)
138
- dpiDebug__print("fn start %s\n", __func__);
139
- status = dpiContext__create(__func__, majorVersion, minorVersion, context,
140
- &error);
141
- if (status < 0)
142
- dpiError__getInfo(&error, errorInfo);
143
- if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS)
144
- dpiDebug__print("fn end %s -> %d\n", __func__, status);
145
- return status;
146
- }
147
-
148
-
149
- //-----------------------------------------------------------------------------
150
- // dpiContext_destroy() [PUBLIC]
151
- // Destroy an existing context. The structure will be checked for validity
152
- // first.
153
- //-----------------------------------------------------------------------------
154
- int dpiContext_destroy(dpiContext *context)
155
- {
156
- char message[80];
157
- dpiError error;
158
-
159
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
160
- &error) < 0)
161
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
162
- dpiUtils__clearMemory(&context->checkInt, sizeof(context->checkInt));
163
- if (dpiDebugLevel & DPI_DEBUG_LEVEL_REFS)
164
- dpiDebug__print("ref %p (%s) -> 0\n", context, context->typeDef->name);
165
- if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS)
166
- (void) sprintf(message, "fn end %s(%p) -> %d", __func__, context,
167
- DPI_SUCCESS);
168
- dpiUtils__freeMemory(context);
169
- if (dpiDebugLevel & DPI_DEBUG_LEVEL_FNS)
170
- dpiDebug__print("%s\n", message);
171
- return DPI_SUCCESS;
172
- }
173
-
174
-
175
- //-----------------------------------------------------------------------------
176
- // dpiContext_getClientVersion() [PUBLIC]
177
- // Return the version of the Oracle client that is in use.
178
- //-----------------------------------------------------------------------------
179
- int dpiContext_getClientVersion(const dpiContext *context,
180
- dpiVersionInfo *versionInfo)
181
- {
182
- dpiError error;
183
-
184
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
185
- &error) < 0)
186
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
187
- DPI_CHECK_PTR_NOT_NULL(context, versionInfo)
188
- memcpy(versionInfo, context->versionInfo, sizeof(dpiVersionInfo));
189
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
190
- }
191
-
192
-
193
- //-----------------------------------------------------------------------------
194
- // dpiContext_getError() [PUBLIC]
195
- // Return information about the error that was last populated.
196
- //-----------------------------------------------------------------------------
197
- void dpiContext_getError(const dpiContext *context, dpiErrorInfo *info)
198
- {
199
- dpiError error;
200
-
201
- dpiGlobal__initError(NULL, &error);
202
- dpiGen__checkHandle(context, DPI_HTYPE_CONTEXT, "check handle", &error);
203
- dpiError__getInfo(&error, info);
204
- }
205
-
206
-
207
- //-----------------------------------------------------------------------------
208
- // dpiContext_initCommonCreateParams() [PUBLIC]
209
- // Initialize the common connection/pool creation parameters to default
210
- // values.
211
- //-----------------------------------------------------------------------------
212
- int dpiContext_initCommonCreateParams(const dpiContext *context,
213
- dpiCommonCreateParams *params)
214
- {
215
- dpiError error;
216
-
217
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
218
- &error) < 0)
219
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
220
- DPI_CHECK_PTR_NOT_NULL(context, params)
221
- dpiContext__initCommonCreateParams(params);
222
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
223
- }
224
-
225
-
226
- //-----------------------------------------------------------------------------
227
- // dpiContext_initConnCreateParams() [PUBLIC]
228
- // Initialize the connection creation parameters to default values.
229
- //-----------------------------------------------------------------------------
230
- int dpiContext_initConnCreateParams(const dpiContext *context,
231
- dpiConnCreateParams *params)
232
- {
233
- dpiError error;
234
-
235
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
236
- &error) < 0)
237
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
238
- DPI_CHECK_PTR_NOT_NULL(context, params)
239
- dpiContext__initConnCreateParams(params);
240
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
241
- }
242
-
243
-
244
- //-----------------------------------------------------------------------------
245
- // dpiContext_initPoolCreateParams() [PUBLIC]
246
- // Initialize the pool creation parameters to default values.
247
- //-----------------------------------------------------------------------------
248
- int dpiContext_initPoolCreateParams(const dpiContext *context,
249
- dpiPoolCreateParams *params)
250
- {
251
- dpiError error;
252
-
253
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
254
- &error) < 0)
255
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
256
- DPI_CHECK_PTR_NOT_NULL(context, params)
257
- dpiContext__initPoolCreateParams(params);
258
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
259
- }
260
-
261
-
262
- //-----------------------------------------------------------------------------
263
- // dpiContext_initSodaOperOptions() [PUBLIC]
264
- // Initialize the SODA operation options to default values.
265
- //-----------------------------------------------------------------------------
266
- int dpiContext_initSodaOperOptions(const dpiContext *context,
267
- dpiSodaOperOptions *options)
268
- {
269
- dpiError error;
270
-
271
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
272
- &error) < 0)
273
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
274
- DPI_CHECK_PTR_NOT_NULL(context, options)
275
- dpiContext__initSodaOperOptions(options);
276
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
277
- }
278
-
279
-
280
- //-----------------------------------------------------------------------------
281
- // dpiContext_initSubscrCreateParams() [PUBLIC]
282
- // Initialize the subscription creation parameters to default values.
283
- //-----------------------------------------------------------------------------
284
- int dpiContext_initSubscrCreateParams(const dpiContext *context,
285
- dpiSubscrCreateParams *params)
286
- {
287
- dpiError error;
288
-
289
- if (dpiGen__startPublicFn(context, DPI_HTYPE_CONTEXT, __func__, 0,
290
- &error) < 0)
291
- return dpiGen__endPublicFn(context, DPI_FAILURE, &error);
292
- DPI_CHECK_PTR_NOT_NULL(context, params)
293
- dpiContext__initSubscrCreateParams(params);
294
- return dpiGen__endPublicFn(context, DPI_SUCCESS, &error);
295
- }
296
-