BunPostgresProviderclass
new BunPostgresProvider<I, T>(sql: SQL)
| Param | Type | |
|---|---|---|
sql | SQL | required |
| Return | |
|---|---|
BunPostgresProvider<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 PostgresProvider SQL abstraction by executing tagged-template queries against a Bun.SQL connection.
- Identifiers are escaped through
Bun.SQL's ownsql()helper rather than naive string quoting, which is more secure. - Supports transactions via
transact()— the callback runs in aSERIALIZABLEPostgres transaction, and contention aborts are retried automatically. - Requires the
bunpeer dependency and a running Bun environment.