Thinky
===============================
Light Node.js ORM for RethinkDB.
Quick start
Install:
npm install thinky
Use:
var thinky = require('thinky')();
var type = thinky.type;
var Post = thinky.createModel("Post", {
id: String,
title: String,
content: String,
idAuthor: String
});
var Author = thinky.createModel("Author", {
id: type.string(),
name: type.string().min(2),
email: type.string().email()
});
Post.belongsTo(Author, "author", "idAuthor", "id");
Save a new post with its author.
var post = new Post({
title: "Hello World!",
content: "This is an example."
});
var author = new Author({
name: "Michel",
email: "orphee@gmail.com"
});
post.author = author;
post.saveAll().then(function(result) {
});
Retrieve the post with its author.
Post.get("0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a").getJoin().run().then(function(result) {
});
Documentation
https://thinky.io
Help
No SLA, but a few developers hang out there and may be able to help:
Run the tests
npm test
Contribute
You are welcome to do a pull request.
Roadmap
The roadmap is defined with the issues/feedback on GitHub. Checkout:
https://github.com/neumino/thinky/issues
Author
Contributors
License
MIT, see the LICENSE file