Skip to content

v5.0.0

Choose a tag to compare

@romanbalayan romanbalayan released this 08 Feb 01:40
· 29 commits to master since this release

Based from node-oracledb v5.0.0

v5.0.0 Release Notes

  • Stated compatibility is now for Node.js 10.16+, 12 and 14.
  • Installation Changes:
    • Added an oracledb.initOracleClient() function to specify the directories that the Oracle Client libraries and optional Oracle configuration files are in, and to specify other configuration values, see Initializing Node-oracledb.
    • macOS Instant Client installation instructions have necessarily changed to work with recent Node.js versions. Instant Client libraries in ~/lib will no longer be used. See INSTALL.
    • Fixed how the module binary is found when using Webpack.
    • Webpack users should copy the node-oracledb binary into a sub-directory of the output directory. For example if the output directory is dist, then the binary should be in dist/node_modules/oracledb/build/Release/oracledb-5.0.0-linux-x64.node. A copy plugin in webpack.config.js can do this by copying node_modules/oracledb/build to a directory of that same name. See Issue 1156.
    • Updated Docker installation documentation for changes to the Node.js image (Issue #1201).
    • Removed use of git in package/buildpackage.js making offline builds cleaner for self-hosting node-oracledb.
  • Connection Pool changes:
    • Added oracledb.queueMax and equivalent createPool() option attribute queueMax to limit the number of pending pool.getConnection() calls in the pool queue (Issue #514).
    • Made an internal change to use an Oracle Client 20 Session Pool feature allowing node-oracledb connection pools to shrink to poolMin even when there is no pool activity.
  • Added oracledb.prefetchRows and equivalent execute() option attribute prefetchRows for query row fetch tuning to optimize round-trips, or disable prefetching altogether. See Tuning Fetch Performance.
  • Added support for queries containing cursor expressions that return nested cursors.
  • Added database instance startup and shutdown functions oracledb.startup(), oracledb.shutdown(), connection.startup(), and connection.shutdown().
  • Added a new constant oracledb.SYSPRELIM to allow preliminary database connections, such as required when starting a database.
  • Added support for ResultSet IN binds to PL/SQL REF CURSOR parameters.
  • Added support for PL/SQL Collection Associative Arrays "index-by tables" of the following types: oracledb.DB_TYPE_NVARCHAR, oracledb.DB_TYPE_CHAR, oracledb.DB_TYPE_NCHAR, oracledb.DB_TYPE_BINARY_FLOAT, oracledb.DB_TYPE_BINARY_DOUBLE, oracledb.DB_TYPE_DATE, oracledb.DB_TYPE_TIMESTAMP, oracledb.DB_TYPE_TIMESTAMP_LTZ, oracledb.DB_TYPE_TIMESTAMP_TZ and oracledb.DB_TYPE_RAW.
  • Refactored the module's JavaScript code layer to use async/await.
  • Removed support for custom Promise libraries. Use the native Node.js Promise implementation instead. This change was necessitated by the refactored JavaScript implementation.
  • NJS-005 and NJS-009 are now passed through the callback (if one is used).
  • Fixed a segfault that occurred when binding a database object IN/OUT without providing the database object class.
  • Fixed OUT binds of type oracledb.DB_TYPE_DATE, oracledb.DB_TYPE_TIMESTAMP and oracledb.DB_TYPE_TIMESTAMP_TZ to correctly return Dates.
  • SODA changes:
    • The value of oracledb.fetchArraySize now tunes SODA getCursor() and getDocuments() performance when using Oracle Client 19.5. Added the SODA find() non-terminal function fetchArraySize() to tune individual find() operations.
      -Added Oracle Database 20c SODA 'upsert' functions sodaCollection.save() and sodaCollection.saveAndGet().
      -Added Oracle Database 20c SODA function sodaCollection.truncate().
  • Lob Changes:
    -Fixed Lob class lob.type and metaData.fetchType when streaming NCLOB data. They are now oracledb.NCLOB instead of oracledb.CLOB.
    • Fixed Lob.destroy() so it does not call the old Lob.close() method, which emits a duplicate close event.
    • Lobs being streamed to are now correctly destroyed on error.
  • Made an internal change to use an Oracle Client 20 feature to avoid a round-trip when accessing oracledb.version for the first time.
  • Updated examples and documentation to make more use of Node.js 8's Stream destroy() method, allowing resources to be freed early.
  • Test and documentation improvements.