oracledb 2.1.0 → 2.3.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/CHANGELOG.md +174 -54
- package/LICENSE.md +52 -18
- package/README.md +35 -68
- package/binding.gyp +5 -4
- package/lib/connection.js +164 -14
- package/lib/oracledb.js +160 -11
- package/lib/pool.js +33 -22
- package/lib/querystream.js +3 -2
- package/lib/rel.txt +1 -1
- package/odpi/LICENSE.md +1 -1
- package/odpi/README.md +25 -84
- package/odpi/embed/README.md +1 -1
- package/odpi/include/dpi.h +51 -7
- package/odpi/src/dpiConn.c +78 -9
- package/odpi/src/dpiContext.c +24 -10
- package/odpi/src/dpiEnv.c +5 -1
- package/odpi/src/dpiError.c +4 -0
- package/odpi/src/dpiErrorMessages.h +6 -4
- package/odpi/src/dpiImpl.h +125 -68
- package/odpi/src/dpiMsgProps.c +33 -0
- package/odpi/src/dpiObject.c +17 -10
- package/odpi/src/dpiObjectType.c +1 -1
- package/odpi/src/dpiOci.c +55 -40
- package/odpi/src/dpiOracleType.c +2 -2
- package/odpi/src/dpiPool.c +88 -18
- package/odpi/src/dpiStmt.c +57 -36
- package/odpi/src/dpiSubscr.c +117 -9
- package/odpi/src/dpiUtils.c +20 -9
- package/odpi/src/dpiVar.c +504 -430
- package/package/MAKEPKG.BAT +64 -1
- package/package/README.md +9 -5
- package/package/createpackage.js +2 -2
- package/package/extractpackage.js +2 -1
- package/package/oracledbinstall.js +19 -19
- package/package/package.json +4 -4
- package/package.json +4 -4
- package/src/njsCommon.cpp +94 -10
- package/src/njsCommon.h +73 -21
- package/src/njsConnection.cpp +1425 -458
- package/src/njsConnection.h +68 -19
- package/src/njsIntLob.cpp +5 -1
- package/src/njsIntLob.h +1 -1
- package/src/njsMessages.cpp +9 -2
- package/src/njsMessages.h +9 -2
- package/src/njsOracle.cpp +213 -23
- package/src/njsOracle.h +18 -2
- package/src/njsPool.cpp +32 -14
- package/src/njsPool.h +4 -4
- package/src/njsResultSet.cpp +4 -3
- package/src/njsResultSet.h +1 -1
- package/src/njsSubscription.cpp +388 -0
- package/src/njsSubscription.h +111 -0
package/odpi/src/dpiUtils.c
CHANGED
|
@@ -266,15 +266,6 @@ int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative,
|
|
|
266
266
|
source = (uint8_t*) oracleValue;
|
|
267
267
|
length = *source++ - 1;
|
|
268
268
|
|
|
269
|
-
// a mantissa length of 0 implies a value of 0
|
|
270
|
-
if (length == 0) {
|
|
271
|
-
*isNegative = 0;
|
|
272
|
-
*decimalPointIndex = 1;
|
|
273
|
-
*numDigits = 1;
|
|
274
|
-
*digits = 0;
|
|
275
|
-
return DPI_SUCCESS;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
269
|
// a mantissa length longer than 20 signals corruption of some kind
|
|
279
270
|
if (length > 20)
|
|
280
271
|
return dpiError__set(error, "check mantissa length",
|
|
@@ -290,6 +281,21 @@ int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative,
|
|
|
290
281
|
ociExponent -= 193;
|
|
291
282
|
*decimalPointIndex = ociExponent * 2 + 2;
|
|
292
283
|
|
|
284
|
+
// a mantissa length of 0 implies a value of 0 (if positive)
|
|
285
|
+
// or -1e126 (if negative)
|
|
286
|
+
if (length == 0) {
|
|
287
|
+
if (*isNegative) {
|
|
288
|
+
*digits = 1;
|
|
289
|
+
*decimalPointIndex = 127;
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
*decimalPointIndex = 1;
|
|
293
|
+
*digits = 0;
|
|
294
|
+
}
|
|
295
|
+
*numDigits = 1;
|
|
296
|
+
return DPI_SUCCESS;
|
|
297
|
+
}
|
|
298
|
+
|
|
293
299
|
// check for the trailing 102 byte for negative numbers and if present,
|
|
294
300
|
// reduce the number of mantissa digits
|
|
295
301
|
if (*isNegative && source[length - 1] == 102)
|
|
@@ -312,6 +318,11 @@ int dpiUtils__parseOracleNumber(void *oracleValue, int *isNegative,
|
|
|
312
318
|
if (digit == 0 && i == 0) {
|
|
313
319
|
(*numDigits)--;
|
|
314
320
|
(*decimalPointIndex)--;
|
|
321
|
+
} else if (digit == 10) {
|
|
322
|
+
(*numDigits)++;
|
|
323
|
+
(*decimalPointIndex)++;
|
|
324
|
+
*digits++ = 1;
|
|
325
|
+
*digits++ = 0;
|
|
315
326
|
} else *digits++ = digit;
|
|
316
327
|
|
|
317
328
|
// process the second digit; trailing zeroes are ignored
|