An ES7 wrapper for node-postgres that provides a simplified, promise-based API for common PostgreSQL operations including select, insert, update, delete, and transaction management with savepoint support. Current stable version is 2.1.6. The library is minimal (< 150 lines) and relies on async/await. It supports nested transactions via savepoints and works with template string engines like sql-template. Key differentiators: very thin abstraction over node-postgres, no ORM features, pure async/await pattern.
npm install pg-aaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to PostgreSQL using pg-aa, query a row, insert a log, select all active users.
Use default import or require directly: import pg from 'pg-aa'
Use a full connection string like 'postgres://user:pass@localhost/db'
Always call client.end() after finishing queries.
Use import pg from 'pg-aa' instead of import { pg } from 'pg-aa'Ensure you create an instance: const client = new pg(conString)