14 March 2012



I’ve renamed the respository for this software package, it’s now available here. Links in this post have been updated accordingly.

Today I’m releasing a nifty helper library I wrote to ease the pain of aync database queries in node.js. It provides the following features on top of node-db drivers:

  • Configurable connection pooling.
  • Issue multiple simultaneous queries, and get all results back in a callback when the last query completes.
  • Issue queries in series, getting the results for each previous query back before executing the next one.

At this point it only supports the db-mysql driver, as I haven’t abstracted the code to make the other drivers pluggable. Would be a simple thing to do though, feel free to submit a pull request!

It’s also possible that this could be abstracted further to provide functionality across different node-based database drivers.

This library was pretty easy to code up thanks to the awesome async and generic-pool modules.



Available on github. No npm package yet, when the API is fully hardened it will be packaged.



See the README.