API Reference

@neondatabase/serverless

PostgreSQL driver for serverless and edge using HTTP/WebSocket, compatible with node-postgres query interface.

Official Documentation ↗
CompatibilityThis documentation covers version v1.2.0. Check the official docs for the latest API surface.

Installation

npmnpm install @neondatabase/serverless

Methods

@neondatabase/serverless is postgresql driver for serverless and edge using http/websocket, compatible with node-postgres query interface. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install @neondatabase/serverless with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v0.10 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about @neondatabase/serverless, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

Security

Official security statements captured from the package documentation:

FAQ

Is it a drop-in for pg?
It implements the node-postgres query interface; most pg-compatible ORMs work with the Pool client.
HTTP or WebSocket?
Single queries use HTTP; the Pool client opens a WebSocket for multiplexing multiple queries.
Does it support transactions?
Yes, via the Pool client with BEGIN/COMMIT; the HTTP sql function is autocommit per query.