By cj on Apr 18, 2016
Top features: Promise support
node-oracledb 1.9.0-Development is now available only as a development-only branch on GitHub. It adds Promise support and some other goodies mentioned below. The plan is to incorporate any user feedback, stabilize the features, improve documentation, improve test covereage, and run stress tests. Once this is all done, then a production release to npm will be made. Personally I think this will take 2-4 weeks, but it is totally dependent on what is uncovered by you, the user.
Since this is a development branch, features are subject to change. Use GitHub Issue #410 to ask design questions and discuss the branch.
Install by setting
OCI_INC_DIR as normal, and running
npm install oracle/node-oracledb.git#dev-1.9. Or install from GitHub by cloning the repository,
checking out the dev-1.9 branch, setting
OCI_INC_DIR, and install with
Anyone is welcome to report test results, contribute new tests or update documentation (or code!) to help us get a production release out faster. You do need to have your OCA accepted first before we can look at any pull requests.
As you can see, most of the doc is ready, and there are a solid number of tests for new functionality. You can help us by testing your own favorite Promise library, as we are only planning on testing the default Promise implementation in Node 0.12, 4 and 5. Also check out how connections are handled as you may like a different style - let us know.
In node-oracledb 1.9-dev:
Promise support was added. All asynchronous functions can now return promises. The default Promise library is used for Node 0.12, 4 and 5. It can be easily overridden if you wish to incorporate your own implementation.
The current implemention typically requires two promise chains. Let us know what you think. There are solutions that could be made. What do you want?
toQueryStream()method was added. It is for ResultSets. It lets REF CURSORS be transformed into Readable Streams. It can also be used to convert ResultSets from top-level queries to streams, however the existing
connection.queryStream()method will probably be easier to use for these queries.
An experimental query Stream
_close()method was added. It allows query streams to be closed without needing to fetch all the data. It is marked experimental because there isn't good information about whether the current Node Streams implementation really allows interruptions.
Open question: Should _close() invoke pause() internally?
connection.close()have been added for
connection.release()respectively. This should make it easier to remember which method to use for releasing a connection, terminating a connection pool, or closing a ResultSet: you can just use
Some method parameter validation checks, such as the number or types of parameters, will now throw errors synchronously instead of returning errors via the callback.
Removed an extra call to
Some annoying, seemingly random crashes caused by connections being garbage collected while still in use should no longer occur. These were more common in smaller scripts that finished quickly, but could be seen in systems under load.
Issues and questions about node-oracledb can be posted on GitHub. We value your input to help prioritize work on the add-on. Drop us a line!
node-oracledb installation instructions are here.
Node-oracledb documentation is here.