sql-render
JSON →Type-safe {{variable}} templating for .sql files with built-in SQL injection protection. Current stable version is 0.3.4, released under MIT license. Zero runtime dependencies, ships TypeScript types. Supports schema-based validation with type inference, custom schema types (identifier, enum, ISO date, UUID, S3 path, arrays, nullable), and compatibility with SQL engines that treat backslash as literal in strings (Athena, Trino, PostgreSQL). Differentiates from other SQL template libraries by focusing on safety and validation, not just interpolation.
Resources
packagesql-render ↗