A dynamic SQL query helper library (v0.3.7) built on top of pg-sql, providing a lodash-like toolkit for constructing INSERT, UPDATE, WHERE, ORDER BY, and other SQL clauses programmatically without string concatenation. Released by Ian Storm Taylor, with low release cadence (last update 2016). Key differentiator: allows SQL-native template syntax via pg-sql while adding helpers for dynamic clauses, unlike ORMs or full query builders.
npm install pg-sql-helpersNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows dynamic WHERE and ORDER BY using pg-sql-helpers with pg-sql template tag and pg pool.
Run: npm install pg-sql
Consider alternatives like Slonik or Kysely for active development.
Ensure all objects in array have identical keys.
Use hyphen directly; check whitespace (e.g., '- column' will not work).
Install pg-sql: npm install pg-sql, and import { sql } from 'pg-sql'Provide valid connection string or environment variables: DATABASE_URL
Wrap helper calls inside sql`...` template literals only.
Add import: import { INSERT } from 'pg-sql-helpers'