Mabolo
Just a simple ORM of MongoDB API.
这个东西还是非常好的嘛!—— Master Yeechan
和 Mongoose 各有千秋。—— orzFly
Features
Define Schema and validate document
User = mabolomodel 'User' username: type: String required: true age: type: Number default: 18 password: String
Define model methods and document methods
= return @findOne name: nameoptions... = -> return @username
Support embedded document or array
Token = mabolomodel 'Token' code: String User = mabolomodel 'User' tokens: Token
Promise style and callback style API
Usercreate name: 'jysperm'then Usercreate name: 'jysperm'
Modify document atomically
jyspermmodify Qdelay1000then -> jysperm.age = 19then ->