Skip to main content

@latimer-woods-tech/neon

Thin wrapper around @neondatabase/serverless scoped to Cloudflare’s Hyperdrive binding. Depends on @latimer-woods-tech/errors and @latimer-woods-tech/logger.

Installation

Bindings required

API

createDb(binding)

Creates a database client from the Hyperdrive binding.

withDbRetry(fn, opts?)

Wraps a database operation and retries on transient failures (connection reset, pool exhaustion).

DbError

Thrown when a database operation fails after all retries.

Example