SQigiL is an ESM-only Postgres SQL template string library (v0.4.0) that leverages ES2015 tagged template literals for safe, fast SQL construction without runtime parsing overhead. It provides auto-escaping for values, booleans, dates, identifiers, lists, and raw SQL, with full TypeScript types and 100% test coverage. Unlike pg-promise, it avoids string parsing overhead. Current status: maintenance – still in early stages (beta), with infrequent releases.
npm install sqigilNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic sql tagged template usage with automatic escaping, csv list, bool conversion, identifier quoting, and dynamic column insertion.
Ensure only strings, numbers, booleans, null, undefined, arrays, Dates, Buffers, or objects are passed as template expressions.
Use sql.csv() for simple lists instead of relying on default array conversion, or wrap with sql.value() explicitly.
Consistently use either default Date conversion (UTC) or sql.utc()/sql.tz() for explicit timezone handling.
Use import { sql } from 'sqigil'; or configure bundler/tester to handle ESM.Do not use Symbol values inside sql tagged templates.
Switch to import syntax or use dynamic import(): const { sql } = await import('sqigil');Use import { sql } from 'sqigil'; (named export).No dependency data recorded yet.