data-mapper-js is a little bit more than massive-js, but not so much that it gets in your way. Initially I was going to try and just extend massive-js to meet my needs, but my approach seemed different enough from that of massive-js that I gave birth to data-mapper-js. Currently it supports MySql and Postgres, but you should find it easily extensible, if you are so inclined.
I wasn't going to, but I went ahead and registered the package so installation is as easy as:
npm install data-mapper-js
Then just this to start using it:
var mapper = ;
The important part, if you are trying to wire up any relational data queries, is to define the schema.
var schemaBuilder = mapper;schemaBuilder;
And lastly tell it what engine you want to use and how to connect to the database:
var db = mapper;
The query syntax is borrowed almost exactly from massive-js, but we don't build the tables for you.
A quick query to pull all the records in the customers table.
You can also pass in one or more parameters.
You can also tell it to load up the addresses for records matching your query.
Nothing really special here.
Yeah, you can update stuff as well.
And just in case you have to get rid of some things you can do that too.