Skip to content

withManualTransactions

withManualTransactions(adapter, exec): DatabaseAdapter

Defined in: packages/db-sqlite/src/drizzle-factory.ts:27

Wrap an adapter with manual BEGIN/COMMIT transactions for synchronous SQLite drivers (better-sqlite3, bun:sqlite), whose transaction() rejects async callbacks. Statements run on the adapter’s own connection, so the open transaction covers them; rollback runs on throw.

DatabaseAdapter

Adapter built by createDrizzleAdapter.

(sql) => void

Synchronous statement runner on the same connection.

DatabaseAdapter

The adapter with transact replaced.