Database client for Postgres SQL that simplifies common DB operations. Current stable version is 6.0.0. Provides a high-level wrapper around the pg library with built-in connection pooling, query building, and migration support. Designed for Node.js applications needing a streamlined Postgres interface without heavy ORM overhead. Published as an ESM-only package with TypeScript definitions included.
npm install ba-db-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to PostgreSQL, creates a table, inserts a row with parameterized query, and selects all users.
Use import syntax and ensure your project is configured for ES modules.
Pass explicit connection string or config object when creating a Client or Pool instance.
Update code to use result.rows instead of result.rows (previously result).
Replace calls to execute() with query().
Replace result.raw with result.rows.
Use $1, $2, etc. for positional parameters.
Use import syntax or set type: module in package.json.
Use import { Client } from 'ba-db-postgres'.Always await or .then() the query() call.