0.0.4 • Published 10 years ago

remodel v0.0.4

Weekly downloads
7
License
-
Repository
github
Last release
10 years ago

Remodel

Generator-based Models for rethinkdb.

A simple wrapper around the excellent rethinkdb, with generator support.

Installation

$ npm install remodel

Example

var remodel = require('remodel');
var reql = require('reql-then')({
  host: 'localhost',
  port: 28015,
  db: 'test',
  maxPoolSize: 10
});

// 'Users' here is the name of your table
var User = remodel(reql, 'Users');

User.findByEmail = function *(email) {
  return yield User.findOne(this.r.filter({email: email}));
}

License

MIT

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago