rate-sql is a lightweight SQL query builder for Node.js and the browser, currently at version 0.2.0. It provides a programmatic way to construct SQL queries with support for parameterization, joins, and subqueries. Different from ORMs like Sequelize or Knex, rate-sql focuses on minimal overhead and zero dependencies. Its release cadence is irregular as it is still in early development. Ideal for developers who want direct SQL control with a clean API and TypeScript types included.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM-only; CommonJS require will fail in Node < 22 or without proper configuration.
Named export is PascalCase; common mistake is using camelCase.
SQLFragment is a type, prefer TypeScript type-only import to avoid runtime overhead.
Shows how to create a simple SELECT query with parameterized WHERE clause and retrieve the generated SQL text and values.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.