Drizzle ORM is a TypeScript-first ORM that provides type-safe database access with a SQL-like API. It generates zero runtime overhead, supports Postgres, MySQL, and SQLite, and includes a migration toolkit (Drizzle Kit). Its relational query API offers Prisma-like ergonomics while staying closer to raw SQL performance.
Use Drizzle's lightweight runtime in serverless functions where cold-start time matters, benefiting from zero dependencies and minimal bundle size.
Define schemas as TypeScript code and get full autocomplete and type checking for all queries, inserts, and updates across your entire codebase.
Generate SQL migration files automatically from schema changes using Drizzle Kit, with support for custom migration scripts and dry-run previews.
import { drizzle } from "drizzle-orm/neon-http";import { neon } from "@neondatabase/serverless";import { pgTable, text, timestamp, integer } from "drizzle-orm/pg-core";import { eq, desc } from "drizzle-orm";export const posts = pgTable("posts", {id: text("id").primaryKey(),title: text("title").notNull(),views: integer("views").default(0),createdAt: timestamp("created_at").defaultNow(),});const sql = neon(process.env.DATABASE_URL!);const db = drizzle(sql);export async function getTopPosts(limit = 10) {return db.select().from(posts).orderBy(desc(posts.views)).limit(limit);}
Seamless integration, great documentation. Set up in under 10 minutes.
2 days ago
Works well for our use case. Would love to see more webhook event types.
1 week ago
Excellent compliance coverage. HIPAA audit trail works perfectly.
2 weeks ago
| Key | Description | Example |
|---|---|---|
| DATABASE_URL | Connection string for your database | postgresql://user:pass@host:5432/dbname |
Drizzle ORM is a lightweight, TypeScript-first ORM with zero runtime dependencies and a SQL-like query API. It provides excellent type safety, minimal bundle size for serverless, and a migration toolkit. Ideal for projects that want close-to-SQL ergonomics with full TypeScript inference and support for Neon, PlanetScale, and other modern database platforms.