Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    maverickpublic

    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...

    Keywords

    none

    install

    npm i maverick

    Downloadsweekly downloads

    3

    version

    0.0.1

    license

    none

    repository

    githubgithub

    last publish

    collaborators

    • avatar