Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doug-martin/moose
sequel port to work with nodejs
https://github.com/doug-martin/moose
Last synced: 29 days ago
JSON representation
sequel port to work with nodejs
- Host: GitHub
- URL: https://github.com/doug-martin/moose
- Owner: doug-martin
- License: mit
- Created: 2011-02-24T19:41:12.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-12-28T07:00:52.000Z (almost 13 years ago)
- Last Synced: 2024-04-09T15:22:32.115Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.53 MB
- Stars: 1
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: History.md
- License: LICENSE
Awesome Lists containing this project
README
#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```javascript
/*
* 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);
});
}));
}
}
});
```
## Installationnpm install moose
##Usage
* [Moose](http://pollenware.github.com/moose/symbols/moose.html)
* [Connecting to a database.](http://pollenware.github.com/moose/symbols/moose.html#createConnection)
* Models
* [Define a model](http://pollenware.github.com/moose/symbols/moose.html#addModel)
* [Model Class](http://pollenware.github.com/moose/symbols/Model.html) returned from defining a model
* [Associations](http://pollenware.github.com/moose/symbols/moose.plugins.AssociationPlugin.html)
* [Querying](http://pollenware.github.com/moose/symbols/moose.plugins.QueryPlugin.html)
* [Caching](http://pollenware.github.com/moose/symbols/moose.plugins.CachePlugin.html)
* [Timestamp](http://pollenware.github.com/moose/symbols/moose.plugins.TimeStampPlugin.html)
* [Migrations](http://pollenware.github.com/moose/symbols/Migrations.html)
* Adapters
* [mysql](http://pollenware.github.com/moose/symbols/moose.adapters.mysql.html)
* [Types](http://pollenware.github.com/moose/symbols/moose.adapters.mysql.types.html)##License
MIT
##Meta
* Code: `git clone git://github.com/pollenware/moose.git`
* JsDoc:
* Website: - Twitter: - 877.465.4045