dmitrig01 / CoffeeRecord

A CoffeeScript implementation of ActiveRecord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ActiveRecord in CoffeeScript. Under very heavy development.

Examples:

require('CoffeeRecord')({ db: 'sqlite', file: 'test.sqlite' }, __dirname + '/models', function(models) {
    models.Post.find(1, function(post) {
        post.comments.all(function(comments) {
            // Do something here with these...
        });
    });
});

models/Post.coffee

class Post extends Model
    @has_many 'comment'

About

A CoffeeScript implementation of ActiveRecord


Languages

Language:CoffeeScript 99.5%Language:JavaScript 0.5%