drizzle-orm README

The project's README from github.com/drizzle-team/drizzle-orm. As one markdown file: README.md.


Headless ORM for NodeJS, TypeScript and JavaScript 🚀

Website • Documentation • Twitter • Discord


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 ❤️

drizzle-orm (drizzle-team/drizzle-orm)

Searching Database…

What is this?Drizzle ORM is a modern, lightweight TypeScript ORM for working with SQL databases from Node.js, Bun, Deno, or edge/browser runtimes.
Is it a library or does it come with extra tooling?It's primarily a library you import into your code, but it ships with a companion CLI (Drizzle Kit) for migrations and a GUI (Drizzle Studio) for browsing data.
How do I add it to a project?Install drizzle-orm as a dependency, declare your SQL schema in TypeScript, and start writing relational or SQL-like queries against it. Use Drizzle Kit to generate and run migrations.
Do I need Rust binaries or extra adapters to use it?No — it has zero dependencies and no Rust binaries; everything works out of the box without separate serverless adapters.
Which databases and runtimes does it actually support?It supports PostgreSQL, MySQL and SQLite (including serverless variants like Turso, Neon, Xata, PlanetScale, Cloudflare D1, Vercel Postgres, Supabase and AWS Data API), and runs in Node.js, Bun, Deno, Cloudflare Workers, Edge runtimes and even browsers.
Can I use it with plain JavaScript or does it require TypeScript?You can use it as a plain JavaScript library, but it's designed to shine with TypeScript, offering type-safe schemas and queries.
Does Drizzle introduce a data proxy between my app and database?No, it avoids adding any data proxy layer, keeping your infrastructure simple and serverless-ready.
How big is the library footprint?Drizzle ORM is extremely lightweight at about 7.4kb minified and gzipped, and it's tree-shakeable.
What does Drizzle Kit do?Drizzle Kit is the companion CLI that generates SQL migration files from your schema or applies schema changes directly to the database.
What is Drizzle Studio?Drizzle Studio is a tool bundled with the ecosystem that lets you browse and manipulate your database data through a GUI.
Why would I pick this over a heavier ORM?Drizzle stays a thin typed layer directly on top of SQL with zero dependencies and no hidden runtime overhead, letting it run anywhere from servers to edge functions to browsers without extra adapters.
What are similar projects?orm, directus, ent, sequelize, typeorm, crystal, sqlit, sqlx
Size
61.1 MB
Stars
36.1K
Age
5y
Commits · 90 Days