{"id":42093,"library":"thinky","title":"Thinky","description":"Thinky is a lightweight Node.js ORM for RethinkDB, version 2.3.9. It provides a schema-based model layer with automatic table creation, validation (string lengths, email format), and relationship methods like belongsTo. Key differentiators: minimalistic API, built-in join support via getJoin(), and promise-based operations. Active but last release was in 2016; community has moved to other RethinkDB ORMs or the rethinkdbdash driver.","status":"maintenance","version":"2.3.9","language":"javascript","source_language":"en","source_url":"git://github.com/neumino/thinky","tags":["javascript","rethinkdb","orm"],"install":[{"cmd":"npm install thinky","lang":"bash","label":"npm"},{"cmd":"yarn add thinky","lang":"bash","label":"yarn"},{"cmd":"pnpm add thinky","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"thinky needs to be invoked as a function (with optional config) to create an instance.","wrong":"const thinky = require('thinky');","symbol":"thinky","correct":"const thinky = require('thinky')();"},{"note":"type is accessed from the thinky instance, not the module directly.","wrong":"const type = require('thinky').type;","symbol":"type","correct":"const type = require('thinky')().type;"},{"note":"thinky exposes its own reql instance via .r; using the rethinkdb driver directly can cause conflicts.","wrong":"const r = require('rethinkdb');","symbol":"r","correct":"const r = require('thinky')().r;"}],"quickstart":{"code":"const thinky = require('thinky')();\nconst type = thinky.type;\n\nconst Author = thinky.createModel('Author', {\n  id: type.string(),\n  name: type.string().min(2),\n  email: type.string().email()\n});\n\nconst Post = thinky.createModel('Post', {\n  id: String,\n  title: String,\n  content: String,\n  idAuthor: String\n});\n\nPost.belongsTo(Author, 'author', 'idAuthor', 'id');\n\nconst author = new Author({\n  name: 'Michel',\n  email: 'orphee@gmail.com'\n});\n\nconst post = new Post({\n  title: 'Hello World!',\n  content: 'This is an example.'\n});\n\npost.author = author;\n\npost.saveAll().then(result => console.log(result));\nPost.get(result.id).getJoin().run().then(doc => console.log(doc));","lang":"javascript","description":"Shows model creation, validation, relationship definition, and saving/retrieving joined documents."},"warnings":[{"fix":"npm install rethinkdbdash or npm install rethinkdb","message":"thinky v2.x requires rethinkdbdash or rethinkdb driver - ensure one is installed","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Consider migrating to alternatives like thinky-mongo or rethinkdbdash directly","message":"The author has indicated project is in maintenance mode - no new features","severity":"deprecated","affected_versions":">=2.3.9"},{"fix":"Pass config object: thinky({host: 'localhost', port: 28015})","message":"Invoking thinky() without config uses default rethinkdb host/port - ensure RethinkDB is running","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Always call .getJoin() on retrieved documents after saving","message":"getJoin() only works after saving the document; it does not auto-populate","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'2.3.9':11 '2016':56 'activ':50 'api':37 'automat':21 'base':17,48 'belongsto':33 'built':39 'built-in':38 'communiti':57 'creation':23 'differenti':35 'driver':67 'email':27 'format':28 'getjoin':44 'javascript':68 'join':41 'key':34 'last':52 'layer':19 'length':26 'lightweight':5 'like':32 'method':31 'minimalist':36 'model':18 'move':59 'node.js':6 'oper':49 'orm':7,63,70 'promis':47 'promise-bas':46 'provid':13 'relationship':30 'releas':53 'rethinkdb':9,62,69 'rethinkdbdash':66 'schema':16 'schema-bas':15 'string':25 'support':42 'tabl':22 'thinki':1,2 'valid':24 'version':10 'via':43","created_at":"2026-06-04T18:55:35.234190+00:00","updated_at":"2026-06-04T18:55:35.234190+00:00","problems":[{"fix":"npm install rethinkdb (or rethinkdbdash)","cause":"thinky requires rethinkdb driver but it's not installed","error":"Error: Cannot find module 'rethinkdb'"},{"fix":"const thinky = require('thinky')();","cause":"thinky was not invoked with () after require","error":"TypeError: thinky is not a function"},{"fix":"const type = require('thinky')().type;","cause":"type accessed from wrong object (module level instead of instance)","error":"Error: type.string is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/neumino/thinky#readme","github":"git://github.com/neumino/thinky","docs":null,"changelog":null,"pypi":null,"npm":"thinky","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}