Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A simple database abstraction layer
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

A simple Database Abstraction Layer

To use you must call the setup method with an object containing at least:

{ host:"...", // Database hostname username:"...", // Database username password:"...", // Database password database:"..." // Database database (yo dawg) }

Optionally it may include:

{ port:0, // The database host port, defaults to backend default maxConnections:20, // The number of max connections in the pool, default 20 maxTimeout:10000, // The idle timeout for pool connections, default 10s }

Other options may be available per backend.

Once the setup is complete you can begin queries using:

dal.query(sql, binds, function(error, rows) { ... });

SQL is raw sql with ? supported for bound parameters that are found in the binds array. The binds array is not optional and [] must be passed if there are no binds.

Something went wrong with that request. Please try again.