tagged-sql
JSON →tagged-sql is a lightweight JavaScript/TypeScript library (v0.9.0, stable) that leverages ES6 tagged template literals for writing SQL statements. It supports table name prefixes, separate field and table references via TaggedSql.Table and TaggedSql.Field, and flexible placeholder building for PostgreSQL and MySQL. Unlike other template SQL libraries, it provides a build() method that lets you control placeholder syntax (e.g., $1 for Postgres, ? for MySQL) and a transform() method for prefixing table names. The package ships with TypeScript definitions and has minimal dependencies.