Drizzle ORM: TypeScript ORM for SQL databases
Lightweight type-safe SQL query builder for TypeScript.
Learn more about drizzle-orm
Drizzle ORM is a TypeScript-first object-relational mapping library designed for server-side JavaScript environments. It operates as a thin typed layer above SQL, allowing developers to define database schemas and construct queries using either relational or SQL-like syntax while maintaining type safety. The library ships at approximately 7.4kb minified and gzipped with no external dependencies, and supports multiple database engines including PostgreSQL, MySQL, SQLite, and various serverless database platforms. It runs across different JavaScript runtimes including Node.js, Bun, Deno, Cloudflare Workers, and edge computing environments.

Zero dependencies
The library includes no external dependencies and maintains a small bundle size of roughly 7.4kb minified and gzipped. Code is tree-shakeable, allowing unused portions to be removed during bundling.
Multi-runtime support
Drizzle runs in Node.js, Bun, Deno, Cloudflare Workers, Supabase functions, and browser environments without requiring serverless adapters or proxy layers. It works directly with both traditional and serverless database platforms.
Type-safe schema definition
Schemas are declared in TypeScript with full type inference for queries. The ORM supports both relational query builders and SQL-like query syntax while maintaining end-to-end type safety.
import { drizzle } from 'drizzle-orm/node-postgres';
import { users } from './schema';
import { eq } from 'drizzle-orm';
const db = drizzle(pool);
// Query users by email
const result = await db
.select()
.from(users)
.where(eq(users.email, 'john@example.com'));Fixes ESM module import failure for drizzle-kit/api; no breaking changes or new requirements noted.
- –Upgrade to resolve import errors when using drizzle-kit/api in ESM projects.
- –Release notes do not specify other changes, migrations, or deprecations.
Fixes transaction return value handling in durable SQLite connections.
- –Update if you rely on return values from SQLite transactions in durable mode.
- –Release notes do not specify breaking changes or migration steps.
Adds $replicas reference for read replica support; no breaking changes or migrations required.
- –Use the new $replicas reference to direct queries to read replicas in your connection configuration.
- –Release notes do not specify breaking changes, version requirements, or deprecations.
See how people are using drizzle-orm
Top in Data Engineering
Related Repositories
Discover similar tools and frameworks used by developers
flyway
Version-controlled SQL migrations with automated execution tracking.
patroni
Automates PostgreSQL failover using distributed consensus systems.
n8n
Node-based automation platform with JavaScript and Python scripting.
superset
Flask-based BI platform for SQL database visualization.
docling
Fast document parser for RAG and AI workflows.