Thinky 是一个轻量级的 Node.js 的 ORM 框架,用于支持 RethinkDB 分布式数据库.
示例代码:
var thinky = require('thinky')(); // Create a model - the table is automatically created var Post = thinky.createModel("Post", { id: String, title: String, content: String, idAuthor: String }); var Author = thinky.createModel("Author", { id: String, name: String }); // Join the models Post.belongsTo(Author, "author", "idAuthor", "id");