Node-oracledb 6.4 offers improved LOB and OSON support
Release announcement: A new release of node-oracledb, the Node.js and TypeScript module for accessing Oracle Database, is available from npm.
Top features: Improved LOB and OSON support
The node-oracledb 6.4 brings in more capabilities to existing APIs with enhanced LOB and OSON support.
LOB’s getData()
method now accepts offset and amount arguments to enable the user to refine and fine-tune their data fetching.
The new toMap()
method returns a map object for the database object collection types indexed by PLS_INTEGER. This unpacks associative arrays in database objects efficiently and makes it easy for the developer to work with collection types.
OSON is Oracle Database’s optimized native binary storage format for JSON. The latest node-oracledb release enables user to work with BLOB columns that have the IS JSON FORMAT OSON
constraint enabled in the same way as columns of type JSON. The OSON capabilities have been further enhanced with new encodeOSON
and decodeOSON
methods to fetch and insert into columns which have the IS JSON FORMAT OSON
constraint enabled. A new metadata information attribute isOson
has been introduced which indicates whether the fetched column contains binary encoded OSON data.
The execute()
method of the connection object now accepts an SQL object as an input parameter. This SQL object is returned from the third-party sql-template-tag module and exposes statement and values properties to retrieve SQL string and bind values. The connection object can now capture warnings with the executeMany()
method as well.
The new oracledb.poolPingTimeout
and pool.poolPingTimeout
properties allows users to limit the connection.ping()
call time.
In addition, we have added asynchronous iteration with SODA document cursors and fixed multiple internal and external issues raised by our GitHub users.
See the latest Release Notes for all the changes.
Installing or Upgrading node-oracledb
You can install or upgrade node-oracledb by updating your package.json requirements:
"dependencies": {
"oracledb": "^6.4"
},
Resources
- Node-oracledb installation instructions are here.
- Node-oracledb documentation is here.
- Node-oracledb change log is here.
- Issues and questions about node-oracledb can be posted on GitHub or Slack (link to join Slack).
- Follow us on Twitter or Facebook.
Finally, contributions to node-oracledb are more than welcome, see CONTRIBUTING.