Prisma 7 driver adapter
SQLite for Prisma, on the driver Bun already ships.
Prisma 7 needs a driver adapter for every datasource, and both official SQLite adapters depend on native modules Bun cannot load. This one uses bun:sqlite, so there is nothing to compile.
$
bun add prisma-sqlite-bun-adapterdeclared type→Prisma column type
- INTEGER · INT · SMALLINT
- Int32
- BIGINT · INT8
- Int64
- REAL · DOUBLE · NUMERIC
- Double
- FLOAT
- Float
- DECIMAL
- Numeric
- TEXT · VARCHAR · CLOB
- Text
- BLOB
- Bytes
- BOOLEAN
- Boolean
- DATETIME · TIMESTAMP
- DateTime
- JSONB
- Json
src/conversion.ts — see the API reference for the full set.No native module
Uses the SQLite driver Bun already ships. Nothing to compile, no postinstall, one runtime dependency.
Checked against the official adapter
A shared corpus runs through this adapter and @prisma/adapter-better-sqlite3, comparing full result sets. Every divergence is declared and justified.
Statements are cached
Prepared statements are reused per connection, keyed by SQL text. The official adapter re-prepares on every query.
Requirements
- Bun
- 1.2.17 or newer —
Statement.declaredTypeslanded there, and the mapping above cannot work without it. - @prisma/client
- 7.x