User Tools

Site Tools


orm

Models

Models are handled by the record-macros library.

This library was formerly named “SPOD”, you may find some references to this old name.

Record-macros is a very easy to use ORM and is strongly inspired by the active record pattern.

//so simple ...
var user = new db.User();
user.name = “Joe”;
user.age = 31;
user.insert();
 
//Generate compile-time checked and typed SQL !
var users = db.User.manager.search($age > 30 && $name==”Joe”);

Please read the full documentation of record-macros for more details and code recipes.