PostgresORM is a minimalistic ORM for PostgreSQL, version 5.1.1. It provides basic CRUD operations, pagination, transactions, and custom query support with parameterized queries. Designed for simplicity, it uses a connection pool and requires manual release of database contexts. The library has low activity and is not actively maintained. It differentiates by offering a lightweight alternative to full-featured ORMs like Sequelize or TypeORM, but lacks advanced features like migrations, model definitions, or TypeScript support.
npm install postgresormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initialization, CRUD operations, custom query, pagination, and manual client release with PostgresORM.
Always call await db.release() after finishing operations, especially when using a manually acquired client from pool.connect().
Call initializeDatabase(config) at application startup.
Update imports to use named exports: const { initializeDatabase, pool, db } = require('postgresorm');Use 'list' with conditions or customQuery instead.
Always use parameterized customQuery instead of constructing conditions strings.
Use const { initializeDatabase } = require('postgresorm');Ensure you call db() or db(client) before using CRUD methods.
Call initializeDatabase(config) at the start of your application.
Check if the context is already released or use a try/finally block to release only once.