{"id":44022,"library":"tabel","title":"Tabel","description":"A simple ORM for PostgreSQL built over knex.js that works with plain JavaScript objects and arrays. v3.0.1 (latest) is the current stable version, with v2 maintained via `tabel@2`. It differentiates from other ORMs by its minimal abstraction, direct use of objects/arrays, and optional Redis/mysql support. Active development includes async scoper and dynamic query chains. Breaking changes in v3 include the replacement of `autoId` with `uuid` flag.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/fractaltech/tabel","tags":["javascript","object-relational-mapper","orm","postgresql","postgres","redis","mysql"],"install":[{"cmd":"npm install tabel","lang":"bash","label":"npm"},{"cmd":"yarn add tabel","lang":"bash","label":"yarn"},{"cmd":"pnpm add tabel","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"core query builder dependency","package":"knex","optional":false}],"imports":[{"note":"CJS only, no ESM support","wrong":"import orm from 'tabel';","symbol":"orm","correct":"const orm = require('tabel');"},{"note":"Model is a named export","wrong":"const Model = require('tabel').Model;","symbol":"Model","correct":"const { Model } = require('tabel');"},{"note":"CJS only, scoperAsync added in v3","wrong":"import { scoperAsync } from 'tabel';","symbol":"scoperAsync","correct":"const { scoperAsync } = require('tabel');"}],"quickstart":{"code":"const tabel = require('tabel');\nconst knex = require('knex')({ client: 'pg', connection: process.env.DB_URL || 'postgres://localhost/mydb' });\nconst orm = tabel(knex);\nconst user = orm.define('users', {\n  id: { type: 'uuid', auto: true },\n  name: { type: 'string' }\n});\n\nasync function main() {\n  await user.create({ name: 'Alice' });\n  const users = await user.find({});\n  console.log(users);\n}\nmain().catch(console.error);","lang":"javascript","description":"Connect to PostgreSQL via knex, define a model, and perform a create + find operation."},"warnings":[{"fix":"Change column definition from `autoId: true` to `uuid: true`.","message":"`autoId` flag replaced with `uuid` in v3","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Upgrade to v3 via `npm install tabel@3` and update module imports accordingly.","message":"v3 is the active major version; v2 is only for existing users","severity":"deprecated","affected_versions":"=2.x"},{"fix":"Use `require()` instead of `import`.","message":"No ESM (ES module) support; package uses CommonJS only","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Install knex separately: `npm install knex`.","message":"Requires knex as a peer dependency; not bundled","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2':30 'abstract':39 'activ':48 'array':17 'async':51 'autoid':65 'break':57 'built':7 'chain':56 'chang':58 'current':22 'develop':49 'differenti':32 'direct':40 'dynam':54 'flag':68 'includ':50,61 'javascript':14,69 'knex.js':9 'latest':19 'maintain':27 'mapper':73 'minim':38 'mysql':78 'object':15,71 'object-relational-mapp':70 'objects/arrays':43 'option':45 'orm':4,35,74 'plain':13 'postgr':76 'postgresql':6,75 'queri':55 'redi':77 'redis/mysql':46 'relat':72 'replac':63 'scoper':52 'simpl':3 'stabl':23 'support':47 'tabel':1,29 'use':41 'uuid':67 'v2':26 'v3':60 'v3.0.1':18 'version':24 'via':28 'work':11","created_at":"2026-06-05T17:02:35.868109+00:00","updated_at":"2026-06-05T17:02:35.868109+00:00","problems":[{"fix":"Use `const tabel = require('tabel');` or configure bundler for CJS.","cause":"Tabel is CJS-only; using `import` in an ESM project","error":"Module not found: Can't resolve 'tabel'"},{"fix":"Ensure you call `tabel(knex);` to initialize the ORM.","cause":"Imported 'tabel' but forgot to call it with knex instance","error":"TypeError: tabel is not a function"},{"fix":"Install pg: `npm install pg` and configure knex properly.","cause":"Missing PostgreSQL driver (pg) or knex client configuration","error":"Error: knex: Unknown client: pg"}],"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/fractaltech/tabel","github":"https://github.com/fractaltech/tabel","docs":null,"changelog":null,"pypi":null,"npm":"tabel","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-05","next_check":"2026-09-03","install_tag":null}}