Quackatos is an extremely well-typed query builder for Postgres, built on top of Zapatos (v6.0.1+). Current stable version is 1.8.0, with active development. It prioritizes type safety: query results are fully typed based on the database schema generated by Zapatos, and any code without type errors should generate a valid SQL query. Unlike Knex (weakly typed, multi-dialect) or Prisma (strongly typed, ORM-heavy), Quackatos stays close to SQL and is Postgres-only. It provides intuitive methods like select, where, join, limit, etc., and returns typed tuples or objects. Release cadence is sparse but maintained.
npm install quackatosNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates a typed query with left joins, select, where, limit, and execution with pg Pool.
Replace .order('column', 'ASC') with .orderBy('column', 'ASC').Use default import: import q from 'quackatos'.
Run 'npx zapatos' to generate types before using Quackatos. See Zapatos docs for setup.
Access properties directly on the result rows; avoid destructuring unknown columns. Use .select() to specify exact columns.
Upgrade to Node.js 18+ (LTS).
Add '"type": "module"' to your package.json and ensure tsconfig.json has 'esModuleInterop': true.
Ensure you call .run(pool) at the end. If using v0.x, use .execute(pool) instead. Upgrade to v1+.
Run 'npx zapatos' to generate types. Then import Zapatos types in your project. Quackatos exports QueryBuilder but it's rarely needed; use default import instead.