Drizzle ORM is a lightweight (~7.4kb gzipped), headless TypeScript ORM for SQL databases (PostgreSQL, MySQL, SQLite) with zero dependencies. Version 0.44.4 is the current beta release. It supports serverless and edge runtimes (Node.js, Bun, Deno, Cloudflare Workers) without any data proxies. Key differentiators include tree-shakeability, full type safety without code generation, relational and SQL-like query builders, and seamless integration with Drizzle Kit for migrations. Compared to Prisma or TypeORM, Drizzle offers finer control, lower overhead, and no lock-in.
npm install drizzle-orm-betaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic usage of Drizzle ORM with PostgreSQL: connect, define a table, insert, select with eq filter, and execute raw SQL.
Use correct subpath: for PostgreSQL use 'drizzle-orm-beta/pg-core', for SQLite use 'drizzle-orm-beta/sqlite-core', for MySQL use 'drizzle-orm-beta/mysql-core'.
Use `@planetscale/database` as the driver or continue with `mysql2` but consider migrating.
Pass a client instance (e.g., `new Pool()`) to `drizzle()` instead of a callback.
Use `import` statements or dynamic `import()`; if using TypeScript, set `"module": "ESNext"` (or similar) and `"moduleResolution": "bundler"`.
Install `pg@>=8` as a peer dependency.
Switch to `@libsql/client` for remote and local SQLite, or continue using `better-sqlite3` with potential future breakage.
Use `npm install drizzle-kit-beta` and ensure version aligns with `drizzle-orm-beta`.
Change to `import { pgTable } from 'drizzle-orm-beta/pg-core'`.Switch to ES module syntax: `import { drizzle } from 'drizzle-orm-beta'`.Update Node.js to v14+ and use ES modules (`.mjs` or `"type": "module"` in package.json).
Pass a client instance (e.g., `new Pool()` for pg, `new Database()` for better-sqlite3).
No dependency data recorded yet.