Drizzle ORM is a TypeScript ORM for SQL databases designed with maximum type safety in mind. It comes with a drizzle-kit CLI companion for automatic SQL migrations generation. Drizzle ORM is meant to be a library, not a framework. It stays as an opt-in solution all the time at any levels.
The ORM main philosophy is "If you know SQL, you know Drizzle ORM". We follow the SQL-like syntax whenever possible, are strongly typed ground top and fail at compile time, not in runtime.
Drizzle ORM is being battle-tested on production projects by multiple teams π Give it a try and let us know if you have any questions or feedback on Discord.
- Full type safety
- Smart automated migrations generation
- No ORM learning curve
- SQL-like syntax for table definitions and queries
- Best in class fully typed joins
- Fully typed partial and non-partial selects of any complexity
- Auto-inferring of TS types for DB models for selections and insertions separately
- Zero dependencies
Database | Support | |
---|---|---|
PostgreSQL | β | Docs |
MySQL | β | Docs |
SQLite | β | Docs |
DynamoDB | β³ | |
MS SQL | β³ | |
CockroachDB | β³ |
npm install drizzle-orm
npm install -D drizzle-kit
See dialect-specific docs for more details.