{"name":"Drizzle ORM: A Headless TypeScript ORM for Modern Web Development","description":"Drizzle ORM is a modern, lightweight, and headless TypeScript ORM designed for NodeJS, TypeScript, and JavaScript environments. It offers robust support for various SQL databases, including serverless options, and emphasizes type-safety and extensibility. With over 31,000 stars, Drizzle ORM is a popular choice for developers seeking a performant and flexible solution for their data interactions.","github":"https://github.com/drizzle-team/drizzle-orm","url":"https://osrepos.com/repo/drizzle-team-drizzle-orm","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/drizzle-team-drizzle-orm","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/drizzle-team-drizzle-orm.md","json":"https://osrepos.com/repo/drizzle-team-drizzle-orm.json","topics":["TypeScript","ORM","Node.js","PostgreSQL","MySQL","SQLite","Bun.js","Serverless"],"keywords":["TypeScript","ORM","Node.js","PostgreSQL","MySQL","SQLite","Bun.js","Serverless"],"stars":null,"summary":"Drizzle ORM is a modern, lightweight, and headless TypeScript ORM designed for NodeJS, TypeScript, and JavaScript environments. It offers robust support for various SQL databases, including serverless options, and emphasizes type-safety and extensibility. With over 31,000 stars, Drizzle ORM is a popular choice for developers seeking a performant and flexible solution for their data interactions.","content":"## Introduction\nDrizzle ORM is a powerful and lightweight headless ORM built for TypeScript and JavaScript. It provides a modern approach to interacting with SQL databases, focusing on performance, type-safety, and developer experience. Supporting PostgreSQL, MySQL, and SQLite, Drizzle ORM is designed to work seamlessly across various environments, including serverless functions and edge runtimes. Its zero-dependency architecture and tree-shakeable design make it an efficient choice for any project.\n\n## Installation\nGetting started with Drizzle ORM is straightforward. You can install the core package using npm or yarn:\n\nbash\nnpm install drizzle-orm\n# or\nyarn add drizzle-orm\n\n\nFor database migrations and schema management, it's recommended to also install `drizzle-kit`:\n\nbash\nnpm install drizzle-kit\n# or\nyarn add drizzle-kit\n\n\n## Examples\nDrizzle ORM allows you to define your SQL schemas using TypeScript and build both relational and SQL-like queries. Here's a basic example of defining a schema and performing a simple select query:\n\ntypescript\n// schema.ts\nimport { pgTable, serial, text, varchar } from 'drizzle-orm/pg-core';\n\nexport const users = pgTable('users', {\n  id: serial('id').primaryKey(),\n  fullName: text('full_name'),\n  phone: varchar('phone', { length: 256 }),\n});\n\n// query.ts\nimport { eq } from 'drizzle-orm';\nimport { db } from './db'; // Assume db is an initialized Drizzle client\nimport { users } from './schema';\n\nasync function getUserById(userId: number) {\n  const result = await db.select().from(users).where(eq(users.id, userId));\n  console.log(result);\n}\n\ngetUserById(1);\n\n\n## Why use Drizzle ORM?\nDrizzle ORM stands out for several reasons:\n*   **Lightweight and Zero Dependencies**: At only ~7.4kb minified+gzipped, it's highly efficient with no external dependencies.\n*   **Serverless-Ready**: Designed to work in all major JavaScript runtimes, including NodeJS, Bun, Deno, and Cloudflare Workers, making it ideal for serverless architectures.\n*   **Broad Database Support**: Compatible with every PostgreSQL, MySQL, and SQLite database, including popular serverless providers like Turso, Neon, PlanetScale, and Vercel Postgres.\n*   **Type-Safe and Extensible**: Offers a robust TypeScript experience for declaring SQL schemas and building queries, balancing type-safety with flexibility.\n*   **Powerful Ecosystem**: Comes with `Drizzle Kit` for hassle-free migrations and `Drizzle Studio` for effortless data browsing and manipulation.\n*   **Performance**: Engineered for speed, allowing developers to build fast applications without introducing data proxies.\n\n## Links\n*   [Website](https://orm.drizzle.team){:target=\"_blank\"}\n*   [Documentation](https://orm.drizzle.team/docs/overview){:target=\"_blank\"}\n*   [Twitter](https://x.com/drizzleorm){:target=\"_blank\"}\n*   [Discord](https://driz.link/discord){:target=\"_blank\"}","metrics":{"detailViews":7,"githubClicks":13},"dates":{"published":null,"modified":"2025-11-25T16:00:31.000Z"}}