VibORM

Database Drivers

Overview of available database drivers for VibORM

VibORM supports multiple database drivers across three dialects: PostgreSQL, MySQL, and SQLite.

PostgreSQL Drivers

DriverPackageBest For
pgpgTraditional Node.js apps with connection pooling
postgrespostgresModern apps using postgres.js
pglite@electric-sql/pgliteLocal/embedded PostgreSQL (WASM)
neon-http@neondatabase/serverlessServerless/edge deployments
bun-sqlbun:sqlBun runtime applications

MySQL Drivers

DriverPackageBest For
mysql2mysql2Traditional Node.js MySQL apps
planetscale@planetscale/databasePlanetScale serverless MySQL

SQLite Drivers

DriverPackageBest For
sqlite3better-sqlite3Node.js apps with local SQLite
libsql@libsql/clientTurso cloud or local libSQL
bun-sqlitebun:sqliteBun runtime with SQLite
d1Cloudflare WorkersCloudflare D1 in Workers
d1-httpHTTP APICloudflare D1 from any environment

Feature Matrix

DriverDynamic TransactionsBatch ModeMigration AtomicityEnvironment
pg✅ Full✅ Full✅ FullNode.js
postgres✅ Full✅ Full✅ FullNode.js
pglite✅ Full✅ Full✅ FullAny (WASM)
neon-http⚠️ Sequential✅ Full✅ FullAny
bun-sql✅ Full✅ Full✅ FullBun
mysql2✅ Full✅ Full✅ FullNode.js
planetscale✅ Full✅ Full✅ FullAny
sqlite3✅ Full✅ Full✅ FullNode.js
libsql✅ Full✅ Full✅ FullAny
bun-sqlite✅ Full✅ Full✅ FullBun
d1⚠️ Sequential✅ Full✅ FullWorkers
d1-http⚠️ Sequential✅ Full✅ FullAny

Dynamic Transactions use the callback API: $transaction(async (tx) => { ... })

Batch Mode uses the array API: $transaction([op1, op2, ...])

Drivers marked "Sequential" for dynamic transactions will execute operations one-by-one without isolation. Use batch mode for atomic operations on these drivers.

Choosing a Driver

  • Node.js traditional: Use pg, mysql2, or sqlite3
  • Serverless/Edge: Use neon-http, planetscale, libsql, or d1
  • Bun runtime: Use bun-sql or bun-sqlite
  • Cloudflare Workers: Use d1 (bindings) or d1-http
  • Local development: Use pglite, sqlite3, or bun-sqlite

On this page