Package Exports
- drizzle-orm
- drizzle-orm/alias
- drizzle-orm/alias.js
- drizzle-orm/column-builder
- drizzle-orm/column-builder.js
- drizzle-orm/expressions
- drizzle-orm/expressions.js
- drizzle-orm/index.js
- drizzle-orm/migrator
- drizzle-orm/migrator.js
- drizzle-orm/query-promise
- drizzle-orm/query-promise.js
- drizzle-orm/sql
- drizzle-orm/sql/index.js
- drizzle-orm/table
- drizzle-orm/table.js
- drizzle-orm/utils
- drizzle-orm/utils.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (drizzle-orm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
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.
Feature list
- 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 | ⏳ | |
SQLite | ✅ | Docs |
DynamoDB | ⏳ | |
MS SQL | ⏳ | |
CockroachDB | ⏳ |
Installation
# postgresql
npm install drizzle-orm drizzle-orm-pg
npm install -D drizzle-kit
# mysql
npm install drizzle-orm drizzle-orm-mysql
npm install -D drizzle-kit
# sqlite
npm install drizzle-orm drizzle-orm-sqlite
npm install -D drizzle-kit