Relq is a type-safe TypeScript ORM supporting 14 SQL dialects including PostgreSQL, MySQL, MariaDB, Supabase, Neon, PlanetScale, and CockroachDB. Current stable version is 1.0.127, with active development and release cadence of ~weekly patches. Key differentiator: fully inferred types without code generation — schema defined in TypeScript yields compile-time column names, join shapes, and return types. Requires Node.js >=22.0.0 and a database driver like pg or mysql2. Works across Node.js, Bun, Deno, and edge runtimes with zero runtime dependencies beyond the driver. Companion packages @relq/kit (migrations, CLI) and @relq/zod (Zod validators) are available separately.
npm install relqNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quickstart: initialize a PostgreSQL database, define a users table, insert a row, and select all rows.
Update Node.js to 22+ or use an older version of the package if available.
Set the 'dialect' option to one of: 'postgresql', 'mysql', 'mariadb', 'supabase', 'neon', 'planetscale', etc.
Migrate to @relq/orm and follow the new API in the docs.
Run npm install @relq/zod zod to use Zod validators from schema.
Configure connection pooling via the driver (e.g., pg.Pool) and pass pool config to createDatabase.
Run npm install @relq/orm
Use import { createDatabase } from '@relq/orm'Set dialect: 'postgresql' or another supported dialect.