Active record like ORM for nodejs
A hackable, ActiveRecord-like ORM for nodejs
There are currently a hand full of nodejs ORMs available - but there is no one with a nice syntax similar to ActiveRecord (Ruby). OpenRecord has a nice syntax, a ton of features, over 1000 unit tests and could be extended easily!
npm install openrecord
var OpenRecord = require'openrecord';var sqlite =type: 'sqlite3'file: 'test.sqlite';sqliteModel'User'thishasMany'posts';thisscope'active'thiswhereactive: true;;;sqliteModel'Post'thisbelongsTo'user';;sqlreadyvar User = sqlModel'User';Useractivewhereposts: title_like:'openrecord' include'posts'execconsole.logrecords;;;
If you've found a bug please report it via the issues page. Please make sure to add a unit test with the bug report! Before submit pull request make sure all tests still passed.