
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
postgresql-client
Advanced tools
Professional PostgreSQL client written in TypeScript.
$ npm install postgresql-client --save
Please read :small_orange_diamond: DOCUMENTATION :small_orange_diamond: for detailed usage.
import {Connection} from 'postgresql-client';
const connection = new Connection('postgres://localhost');
await connection.connect();
const result = await connection.query(
'select * from cities where name like $1',
{params: ['%york%']});
const rows = result.rows;
await connection.close(); // Disconnect
import {Pool} from 'postgresql-client';
const db = new Pool({
host: 'postgres://localhost',
pool: {
min: 1,
max: 10,
idleTimeoutMillis: 5000
}
});
const result = await db.query(
'select * from cities where name like $1',
{params: ['%york%'], cursor: true});
const cursor = result.cursor;
let row;
while ((row = cursor.next())) {
console.log(row);
}
await db.close(); // Disconnect all connections and shutdown pool
You can report bugs and discuss features on the GitHub issues page When you open an issue please provide version of NodeJS and PostgreSQL server.
node >= 14.x
postgresql-client is available under MIT license.
FAQs
Enterprise level PostgreSQL client for JavaScript
The npm package postgresql-client receives a total of 10,908 weekly downloads. As such, postgresql-client popularity was classified as popular.
We found that postgresql-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.