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.
Files changed (52) hide show
  1. package/CHANGELOG.md +174 -54
  2. package/LICENSE.md +52 -18
  3. package/README.md +35 -68
  4. package/binding.gyp +5 -4
  5. package/lib/connection.js +164 -14
  6. package/lib/oracledb.js +160 -11
  7. package/lib/pool.js +33 -22
  8. package/lib/querystream.js +3 -2
  9. package/lib/rel.txt +1 -1
  10. package/odpi/LICENSE.md +1 -1
  11. package/odpi/README.md +25 -84
  12. package/odpi/embed/README.md +1 -1
  13. package/odpi/include/dpi.h +51 -7
  14. package/odpi/src/dpiConn.c +78 -9
  15. package/odpi/src/dpiContext.c +24 -10
  16. package/odpi/src/dpiEnv.c +5 -1
  17. package/odpi/src/dpiError.c +4 -0
  18. package/odpi/src/dpiErrorMessages.h +6 -4
  19. package/odpi/src/dpiImpl.h +125 -68
  20. package/odpi/src/dpiMsgProps.c +33 -0
  21. package/odpi/src/dpiObject.c +17 -10
  22. package/odpi/src/dpiObjectType.c +1 -1
  23. package/odpi/src/dpiOci.c +55 -40
  24. package/odpi/src/dpiOracleType.c +2 -2
  25. package/odpi/src/dpiPool.c +88 -18
  26. package/odpi/src/dpiStmt.c +57 -36
  27. package/odpi/src/dpiSubscr.c +117 -9
  28. package/odpi/src/dpiUtils.c +20 -9
  29. package/odpi/src/dpiVar.c +504 -430
  30. package/package/MAKEPKG.BAT +64 -1
  31. package/package/README.md +9 -5
  32. package/package/createpackage.js +2 -2
  33. package/package/extractpackage.js +2 -1
  34. package/package/oracledbinstall.js +19 -19
  35. package/package/package.json +4 -4
  36. package/package.json +4 -4
  37. package/src/njsCommon.cpp +94 -10
  38. package/src/njsCommon.h +73 -21
  39. package/src/njsConnection.cpp +1425 -458
  40. package/src/njsConnection.h +68 -19
  41. package/src/njsIntLob.cpp +5 -1
  42. package/src/njsIntLob.h +1 -1
  43. package/src/njsMessages.cpp +9 -2
  44. package/src/njsMessages.h +9 -2
  45. package/src/njsOracle.cpp +213 -23
  46. package/src/njsOracle.h +18 -2
  47. package/src/njsPool.cpp +32 -14
  48. package/src/njsPool.h +4 -4
  49. package/src/njsResultSet.cpp +4 -3
  50. package/src/njsResultSet.h +1 -1
  51. package/src/njsSubscription.cpp +388 -0
  52. package/src/njsSubscription.h +111 -0
@@ -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