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