sql-statement is a tiny, tree-shakeable SQL statement builder (v1.1.0, last updated 2025) that safely escapes identifiers and values using placeholders (? for values, ?? for identifiers). Unlike ORMs or full query builders, it provides minimal abstraction: you write raw SQL fragments and use append, appendList, and appendPairs to compose queries. Ships TypeScript definitions and supports MySQL, PostgreSQL, and SQLite quoting styles via named exports (mysql, Pg, Sqlite). No database connectivity — generates final SQL strings for use with any driver. Release cadence is low; package is stable and lightweight (no dependencies).
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
The package exports dialect-specific builders. `mysql` is a function that constructs a SQL instance with MySQL quoting. The default export does not exist.
For PostgreSQL quoting, use the named export Pg. CommonJS require works but is not preferred with ESM.
Sqlite is the correct named export for SQLite quoting. The generic SQL name is not exported.
Shows basic usage: instantiating a MySQL-dialect SQL builder, appending a query with placeholders, and converting to final string.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.