{"id":13659766,"url":"https://github.com/neumino/thinky","last_synced_at":"2025-05-15T05:07:34.308Z","repository":{"id":9093464,"uuid":"10870999","full_name":"neumino/thinky","owner":"neumino","description":"JavaScript ORM for RethinkDB","archived":false,"fork":false,"pushed_at":"2021-11-21T19:39:17.000Z","size":2554,"stargazers_count":1120,"open_issues_count":106,"forks_count":128,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-04-14T08:11:24.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://justonepixel.com/thinky/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neumino.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-22T19:11:04.000Z","updated_at":"2025-03-20T12:50:55.000Z","dependencies_parsed_at":"2022-08-07T05:00:30.941Z","dependency_job_id":null,"html_url":"https://github.com/neumino/thinky","commit_stats":null,"previous_names":[],"tags_count":126,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neumino%2Fthinky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neumino%2Fthinky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neumino%2Fthinky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neumino%2Fthinky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neumino","download_url":"https://codeload.github.com/neumino/thinky/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254276447,"owners_count":22043867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T05:01:12.059Z","updated_at":"2025-05-15T05:07:29.276Z","avatar_url":"https://github.com/neumino.png","language":"JavaScript","readme":"# Thinky\n===============================\n\u003ca href=\"https://app.wercker.com/project/bykey/e5ab679f3412f8f86ef6488b31004fed\"\u003e\u003cimg alt=\"Wercker status\" src=\"https://app.wercker.com/status/e5ab679f3412f8f86ef6488b31004fed/m/master\" align=\"right\"\u003e\u003c/a\u003e\nLight Node.js ORM for RethinkDB.  \n\n### Quick start \n\nInstall:\n\n```\nnpm install thinky\n```\n\nUse:\n\n```javascript\nvar thinky = require('thinky')();\nvar type   = thinky.type;\n\n// Create a model - the table is automatically created\nvar Post = thinky.createModel(\"Post\", {\n  id: String,\n  title: String,\n  content: String,\n  idAuthor: String\n}); \n\n// You can also add constraints on the schema\nvar Author = thinky.createModel(\"Author\", {\n  id: type.string(),      // a normal string\n  name: type.string().min(2),  // a string of at least two characters\n  email: type.string().email()  // a string that is a valid email\n});\n\n// Join the models\nPost.belongsTo(Author, \"author\", \"idAuthor\", \"id\");\n```\n\nSave a new post with its author.\n\n```js\n// Create a new post\nvar post = new Post({\n  title: \"Hello World!\",\n  content: \"This is an example.\"\n});\n\n// Create a new author\nvar author = new Author({\n  name: \"Michel\",\n  email: \"orphee@gmail.com\"\n});\n\n// Join the documents\npost.author = author;\n\n\npost.saveAll().then(function(result) {\n  /*\n  post = result = {\n    id: \"0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a\",\n    title: \"Hello World!\",\n    content: \"This is an example.\",\n    idAuthor: \"3851d8b4-5358-43f2-ba23-f4d481358901\",\n    author: {\n      id: \"3851d8b4-5358-43f2-ba23-f4d481358901\",\n      name: \"Michel\",\n      email: \"orphee@gmail.com\"\n    }\n  }\n  */\n});\n```\n\nRetrieve the post with its author.\n\n```js\nPost.get(\"0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a\").getJoin().run().then(function(result) {\n  /*\n  result = {\n    id: \"0e4a6f6f-cc0c-4aa5-951a-fcfc480dd05a\",\n    title: \"Hello World!\",\n    content: \"This is an example.\",\n    idAuthor: \"3851d8b4-5358-43f2-ba23-f4d481358901\",\n    author: {\n      id: \"3851d8b4-5358-43f2-ba23-f4d481358901\",\n      name: \"Michel\",\n      email: \"orphee@gmail.com\"\n    }\n  }\n  */\n});\n```\n\n\n\n### Documentation\n\n[https://www.justonepixel.com/thinky](https://www.justonepixel.com/thinky) (branch `gh-pages).\n\n### Help\n\nNo SLA, but a few developers hang out there and may be able to help:\n\n- [irc://irc.freenode.org/rethinkdb](irc://irc.freenode.org/rethinkdb)\n- [https://gitter.im/neumino/thinky](https://gitter.im/neumino/thinky)\n\n### Run the tests\n\n```\nnpm test\n```\n\n### Contribute\n\nYou are welcome to do a pull request.\n\n\n### Roadmap\n\nThe roadmap is defined with the issues/feedback on GitHub. Checkout:  \n[https://github.com/neumino/thinky/issues](https://github.com/neumino/thinky/issues)\n\n\n### Author\n- Michel Tu -- orphee@gmail.com -- [blog](http://blog.justonepixel.com) -- [twitter](https://twitter.com/neumino)\n\n### Contributors\n\n- [chrisfosterelli](https://github.com/chrisfosterelli)\n- [colprog](https://github.com/colprog)\n- [dulichan](https://github.com/dulichan)\n- [flienteen](https://github.com/flienteen)\n- [marshall007](https://github.com/marshall007)\n- [mindjuice](https://github.com/mindjuice)\n- [Morhaus](https://github.com/Morhaus)\n- [primitive-type](https://github.com/primitive-type)\n- [nikaspran](https://github.com/nikaspran)\n- [rasapetter](https://github.com/rasapetter)\n- [simonratner](https://github.com/simonratner)\n- [wezs](https://github.com/wezs)\n \n\n### License\n\nMIT, see the [LICENSE](https://github.com/neumino/thinky/blob/master/LICENSE) file\n","funding_links":[],"categories":["JavaScript","Libraries","Awesome RethinkDB [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["ORM","Table of Contents"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneumino%2Fthinky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneumino%2Fthinky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneumino%2Fthinky/lists"}