@neondatabase/serverless
PostgreSQL driver for serverless and edge using HTTP/WebSocket, compatible with node-postgres query interface.
Official Documentation ↗v1.2.0. Check the official docs for the latest API surface.Installation
npm install @neondatabase/serverlessMethods
No methods match this filter.
@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:
- 官方 README 声明模板插值对 SQL 注入安全 — “Note: interpolating
${postId}here is safe from SQL injection.” (source: https://raw.githubusercontent.com/neondatabase/serverless/main/README.md, fetched 2026-11-08T20:13:00+08:00)
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.