MCPcopy
hub / github.com/drizzle-team/drizzle-orm

github.com/drizzle-team/drizzle-orm @0.45.2 sqlite

repository ↗ · DeepWiki ↗ · release 0.45.2 ↗
6,155 symbols 19,375 edges 966 files 387 documented · 6%
README

Headless ORM for NodeJS, TypeScript and JavaScript 🚀

WebsiteDocumentationTwitterDiscord

What's Drizzle?

Drizzle is a modern TypeScript ORM developers wanna use in their next project. It is lightweight at only ~7.4kb minified+gzipped, and it's tree shakeable with exactly 0 dependencies.

Drizzle supports every PostgreSQL, MySQL and SQLite database, including serverless ones like Turso, Neon, Xata, PlanetScale, Cloudflare D1, FlyIO LiteFS, Vercel Postgres, Supabase and AWS Data API. No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.

Drizzle is serverless-ready by design. It works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime, and even in browsers.
With Drizzle you can be fast out of the box and save time and costs while never introducing any data proxies into your infrastructure.

While you can use Drizzle as a JavaScript library, it shines with TypeScript. It lets you declare SQL schemas and build both relational and SQL-like queries, while keeping the balance between type-safety and extensibility for toolmakers to build on top.

Ecosystem

While Drizzle ORM remains a thin typed layer on top of SQL, we made a set of tools for people to have best possible developer experience.

Drizzle comes with a powerful Drizzle Kit CLI companion for you to have hassle-free migrations. It can generate SQL migration files for you or apply schema changes directly to the database.

We also have Drizzle Studio for you to effortlessly browse and manipulate data in your database of choice.

Documentation

Check out the full documentation on the website.

Our sponsors ❤️

Extension points exported contracts — how you extend this code

RunnableQuery (Interface)
(no doc) [20 implementers]
drizzle-orm/src/runnable-query.ts
TablesHandler (Interface)
(no doc) [6 implementers]
drizzle-kit/src/simulator.ts
Context (Interface)
(no doc)
integration-tests/tests/mysql-returning.test.ts
Conditions (Interface)
(no doc)
drizzle-valibot/src/schema.types.internal.ts
Conditions (Interface)
(no doc)
drizzle-zod/src/schema.types.internal.ts
Database (Interface)
(no doc)
drizzle-orm/type-tests/kysely/index.ts
GenericSchema (Interface)
(no doc)
drizzle-typebox/src/column.types.ts
Conditions (Interface)
(no doc)
drizzle-arktype/src/schema.types.internal.ts

Core symbols most depended-on inside this repo

sql
called by 4776
drizzle-orm/src/sql/sql.ts
from
called by 4176
drizzle-orm/src/pg-core/query-builders/update.ts
select
called by 3818
drizzle-orm/src/pg-core/db.ts
values
called by 3633
drizzle-orm/src/d1/session.ts
insert
called by 3177
drizzle-orm/src/pg-core/db.ts
execute
called by 2192
drizzle-orm/src/pg-core/db.ts
eq
called by 1759
drizzle-orm/src/sql/expressions/conditions.ts
double
called by 1593
drizzle-orm/src/mysql-core/columns/double.ts

Shape

Method 2,316
Class 1,694
Function 1,675
Interface 455
Enum 15

Languages

TypeScript100%

Modules by API surface

drizzle-kit/src/sqlgenerator.ts540 symbols
drizzle-seed/src/services/Generators.ts213 symbols
drizzle-kit/src/jsonStatements.ts150 symbols
integration-tests/tests/sqlite/durable-objects/index.ts118 symbols
drizzle-orm/src/sql/sql.ts67 symbols
drizzle-kit/src/cli/views.ts53 symbols
drizzle-orm/src/pg-core/view.ts39 symbols
drizzle-orm/src/gel-core/view.ts39 symbols
drizzle-kit/src/cli/commands/migrate.ts37 symbols
drizzle-kit/src/simulator.ts34 symbols
drizzle-kit/tests/schemaDiffer.ts33 symbols
drizzle-orm/src/sqlite-core/db.ts31 symbols

Dependencies from manifests, versioned

@arethetypeswrong/cli0.15.3 · 1×
@ark/attest0.45.8 · 1×
@aws-sdk/client-rds-data3.549.0 · 1×
@aws-sdk/credential-providers3.549.0 · 1×
@cloudflare/workers-types4.20241004.0 · 1×
@drizzle-team/brocli0.10.2 · 1×
@esbuild-kit/esm-loader2.5.5 · 1×
@hono/node-server1.9.0 · 1×
@hono/zod-validator0.2.1 · 1×
@libsql/client0.10.0 · 1×
@libsql/client-wasm0.10.0 · 1×

Datastores touched

(mysql)Database · 1 repos
dbDatabase · 1 repos
postgresDatabase · 1 repos

For agents

$ claude mcp add drizzle-orm \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact