#Moose
##Overview
An ORM for node with these features:
- Migrations
- Associations
- Connection pooling
- Support for multiple databases
- A plugin api, e.g., from examples/plugins/ExpressPlugin.js
/*
* Very simple express routing for a model
* */
var moose = require("../../lib"), comb = require("comb");
module.exports = exports = comb.define(null, {
static : {
route : function(app){
app.get("/" + this.tableName + "/:id", comb.hitch(this, function(req, res){
var id = req.params.id;
this.findById(id).then(function(model){
var response;
if(model){
response = model.toObject();
}else{
response = {error : "Could not find a model with id " + id};
}
res.send(response);
});
}));
}
}
});
npm install moose
##Usage
- Moose
- Connecting to a database.
- Models
- Define a model
- Model Class returned from defining a model
- Associations
- Querying
- Caching
- Timestamp
- Define a model
- Migrations
- Adapters
##License
MIT https://github.com/Pollenware/moose/raw/master/LICENSE
##Meta
- Code:
git clone git://github.com/pollenware/moose.git
- JsDoc: http://pollenware.github.com/moose
- Website: http://pollenware.com - Twitter: http://twitter.com/pollenware - 877.465.4045