maverick

lightweight pluggable ORM

npm install maverick
1 downloads in the last week
4 downloads in the last month

Maverick

Maverick is an extendible lightweight ORM for javascript and postgres.

Getting Started

var maverick = require('maverick');

var Dog = maverick.createModel('Dog', {
  color: 'string',
  paws: {type: 'smallint', default: 4},
  age: 'smallint'
});

Dog.prototype.speak = function() {
  console.log("burp...");
}

var dog = new Dog({color: 'orange'});

dog.save(function (error) {
    console.log(dog.id);
});

TODO

  • what returns an iterator?
  • inheritance
  • has (n) through
  • singular vs plural table names? The great debate...
npm loves you