pg-batch-query v1.4.5 is a lightweight PostgreSQL batch query library that uses the Extended Query Protocol to triple query throughput by batching multiple parameter sets into a single parse-bind-execute sync cycle. It is a thin wrapper around the popular 'pg' driver, requiring Node 22+. Unlike naive Promise.all or individual queries, it sends multiple binds/exeutes over one connection without waiting for results until Sync. Ships TypeScript types. Infrequent releases, maintained by iamkhush. Differentiator: performance gains through wire protocol batching vs. sequential or concurrent pg queries.
npm install pg-batch-queryNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Batch insert three items using extended query protocol; prints inserted rows.
Upgrade Node to 22 or later.
Create a new BatchQuery instance for each batch execution.
Run 'npm install pg' or 'yarn add pg'.
Use 'const BatchQuery = require('pg-batch-query').default'.Use 'const BatchQuery = require('pg-batch-query').default'Use 'import BatchQuery from 'pg-batch-query'' (default import)
Create a new BatchQuery instance for each batch.
No dependency data recorded yet.