Preparing for system design interviews?  Try bugzed.com →

pg-sql

JSON →
library 1.1.0 ·javascript
verified Jun 5, 2026

A safe and composable SQL string builder for Postgres using template strings. Current stable version: 1.1.0. The library exposes a `sql` template tag and helper functions (`sql.ident`, `sql.raw`, `sql.join`) that produce `{ text, values }` objects compatible with the `pg` npm package. It prevents SQL injection by treating all interpolated values as parameters unless explicitly escaped via `sql.ident` or `sql.raw`. Unlike ORMs or raw query building, `pg-sql` keeps full control of SQL while ensuring safety and composability. It is released on an as-needed basis and ships TypeScript definitions.

total hits 7
actors 2 distinct systems
last hit 21d ago human
GPTBot
3
Humans
3

top countries 🇸🇬 Singapore · 🇺🇸 United States · 🇫🇷 France