Version 5.4 of node-oracledb, the Node.js and TypeScript module for accessing the Oracle Database, has been released and is available from npm.
Last month in “New Database Drivers for Oracle and PostgreSQL Released” w looked at another recent driver release for the Oracle database, but for another language – Python. That driver had a major name change from cx_Oracle to python-oracledb to signal the change that the new driver is a thin driver and therefore makes no use of the Oracle Client libraries. As such it was aligned with the rest of the language*-oracledb naming schemes as node-oracledb does.
The highlights of the 5.4 release are:
- Support for token based authentication when establishing pool based connections and standalone connections. Token based authentication allows Oracle Cloud Infrastruction users to authenticate to Oracle Database with Oracle Identity Access Manager (IAM) tokens. Token authentication can be performed when node-oracledb uses Oracle Client libraries 19.14 (or later), or 21.5 (or later).
- The introduction of connection. isHealthy(), a synchronous function which returns a Boolean indicating the health status of a connection. Connections may become unusable in several cases, such as if the network socket is broken, if an Oracle error indicates the connection is unusable or after receiving a planned down notification from the database. If this function returns false, the connection should be closed by the application and a new connection should be established instead.
Of course, the release comes with the usual bug fixes and performance improvements.
If you install it for the first time, the following stack comes along :
1. Install Oracle Database
2. Create a Database User
3. Install Node.js
4. Install node-oracledb
Using your favorite editor, create a new file package.json in a directory of your choice. It should look something like this :
"description": "Demo app",
Install node-oracledb with: npm install
But by far the easiest way however is to use a Pre Built VirtualBox image available from OTN which contains an Oracle Database and the required client libraries. Then add Node.js and the node-oracledb package to this VM and start developing.
Then brush up your Oracle SQL with Analytic SQL for Developers,a free, self-paced, quick and official Oracle course, about the concepts and syntax behind SQL’s Analytic functions.
or email your comment to: firstname.lastname@example.org