Minimal wrapper on top of the pg (node-postgres) library, providing a simplified database abstraction layer for PostgreSQL in Node.js. Version 1.0.0-alpha.5 is the latest alpha release with TypeScript type definitions. The package is designed for simple query patterns with automatic connection handling and basic result mapping. It is lightly maintained and not recommended for production use due to alpha status and limited feature set compared to alternatives like knex or pg-promise.
npm install dbalNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a connection pool, run a simple query, and cleanly shut down.
Pin to exact version and review changelog before upgrading.
Migrate to a more actively maintained library.
Use @types/pg alongside if type granularity is needed.
Run npm install dbal and check the package is installed in node_modules.
Use import { createPool } from 'dbal'.Assert type or use DbalTypes.QueryResult.