pg-query-string is a small library (v0.1.7, stable) for building PostgreSQL query strings with parameterized values. It is a fork of squel, hardcoded to PostgreSQL, with type coercion and ES6 class-based schema/table constructs. Current version is 0.1.7, no recent updates. Key differentiator: produces both SQL text and parameter arrays for safe execution.
npm install pg-query-stringNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a schema and table with typed columns, then builds an UPDATE query with parameterized values.
Use import syntax or configure bundler to handle ESM.
Consider using 'pg' or 'knex' for more maintained query building.
Use Map or arrays to guarantee order.
Use snake_case for schema/table names to avoid quoting issues.
Change to: import { Table } from 'pg-query-string'Add 'type': 'module' to package.json or use dynamic import().
Correct import: import { Schema } from 'pg-query-string'No dependency data recorded yet.