Navigate:
Drizzle ORM
~$DRIZ0.6%

Drizzle ORM: TypeScript ORM for SQL databases

Lightweight type-safe SQL query builder for TypeScript.

LIVE RANKINGS • 11:29 AM • STEADY
TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100TOP 100
OVERALL
#95
22
BACKEND & APIS
#5
30 DAY RANKING TREND
ovr#95
·Backe#5
STARS
33.0K
FORKS
1.2K
7D STARS
+184
7D FORKS
+17
See Repo:
Share:

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.

Drizzle ORM

1

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.

2

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.

3

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'));

vdrizzle-kit@0.31.9

Improved drizzle-kit API for D1 connections.

  • drizzle-kit api improvements for D1 connections
vv1.0.0-beta.15

Consolidated validator packages into drizzle-orm repo, moving drizzle-zod, drizzle-valibot, and other validators.

  • drizzle-zod -> drizzle-orm/zod
  • drizzle-valibot -> drizzle-orm/valibot
  • drizzle-typebox -> drizzle-orm/typebox-legacy (using @sinclair/typebox)
  • drizzle-typebox -> drizzle-orm/typebox (using typebox)
  • drizzle-arktype -> drizzle-orm/arktype
vv1.0.0-beta.14

Improved migrator to apply all missing database changes and fixed various bugs in generate, pull commands, and cache invalidation.

  • Fixed generate and pull commands to display the SQL file instead of the folder path in the migration output message
  • Fixed cache not being invalidated after table updates
  • Fixed composite index with sort outputs a malformed SQL
  • Fixed db introspection generates broken schema.ts syntax

See how people are using Drizzle ORM

Loading tweets...


[ EXPLORE MORE ]

Related Repositories

Discover similar tools and frameworks used by developers