A lightweight, schemaless SQL generation library for PostgreSQL, built on top of sql-bricks. It adds PostgreSQL-specific features such as LIMIT/OFFSET, RETURNING, UPDATE...FROM, DELETE...USING, ON CONFLICT (UPSERT), and FROM VALUES. Version 0.6.0 is stable but sees infrequent releases. Key differentiator: provides a fluent API for generating parameterized SQL with PostgreSQL syntax, using $1, $2 placeholders for safe execution via database libraries. Designed for use with pg-bricks for query execution, but can be used standalone.
npm install sql-bricks-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates select, insert with RETURNING, and upsert (ON CONFLICT DO UPDATE) using parameterized queries.
Always call .toParams() and pass the {text, values} to your database driver.Provide an array of columns to .doUpdate(columns) to avoid implicit behavior.
Use: const sql = require('sql-bricks-postgres'); or import sql from 'sql-bricks-postgres';Run: npm install sql-bricks sql-bricks-postgres