BunPostgreSQLProviderclass

new BunPostgreSQLProvider<I, T>(sql: SQL)
ParamType
sqlSQL
The Bun.SQL instance to execute queries against. required
Return
BunPostgreSQLProvider<I, T>
PostgreSQL database provider backed by Bun's built-in Bun.SQL driver.

PostgreSQL database provider backed by Bun's built-in Bun.SQL driver.

Implements the PostgreSQLProvider SQL abstraction by executing tagged-template queries against a Bun.SQL connection.

  • Identifiers are escaped through Bun.SQL's own sql() helper rather than naive string quoting, which is more secure.
  • Requires the bun peer dependency and a running Bun environment.

Examples

import { SQL } from "bun";
const provider = new BunPostgreSQLProvider(new SQL(process.env.DATABASE_URL));