@theoven/db-drizzle
v0.6.1
Published
Drizzle ORM for Oven — SQLite via bun:sqlite, Postgres, MySQL
Maintainers
Readme
@theoven/db-drizzle
Drizzle ORM for Oven — bun:sqlite, Postgres and MySQL.
Part of Oven — the batteries-included framework for Bun. Add a brick, get a feature, fully typed.
Install
bun add @theoven/db @theoven/db-drizzle drizzle-ormUsage
import { drizzleSqlite, drizzlePostgres } from '@theoven/db-drizzle'
db(drizzleSqlite({ url: './data.db', schema })) // development
db(drizzlePostgres({ url: env.string('DATABASE_URL'), schema })) // productionSwitching databases is that one line. Every query you have written stays the same.
The SQLite provider issues begin/commit/rollback itself, because Drizzle's own bun-sqlite
transaction does not roll back an async failure — a test asserts that difference stays visible.
Documentation
https://theoven.app/docs/bricks/db-drizzle/
Reading this with a coding agent? llms.txt is a model-readable
index of the whole documentation set, generated from it at build time.
License
MIT
