@tank/drizzle-cheatsheet
1.0.0Description
Drizzle ORM cheat sheet covering schema syntax, relations, query builder patterns, drizzle-kit commands, and type inference for fast recall..
Download
Verified
tank install @tank/drizzle-cheatsheetDrizzle Cheat Sheet
Core Philosophy
- Optimize for syntax recall — Cheat sheets should help you write the right schema or query shape quickly.
- Keep schema and query sections distinct — Engineers often need one or the other fast.
- Include workflow commands — Drizzle use is not only code syntax;
drizzle-kitcommands matter too. - Prefer concise examples over explanation — This is reference material, not ORM theory.
- Show TypeScript-friendly patterns — Drizzle’s value comes from explicit schema and strong typing.
Quick-Start: Common Problems
"How do I define a table?"
- import table/column helpers
- define columns
- add indexes/relations as needed
-> See
references/syntax.md
"What are the core drizzle-kit commands?"
| Need | Command |
|---|---|
| generate migration | drizzle-kit generate |
| push schema | drizzle-kit push |
| run studio | drizzle-kit studio |
-> See references/syntax.md |
Decision Trees
| Signal | Focus area |
|---|---|
| defining schema | tables, columns, relations, indexes |
| writing queries | select/insert/update/delete/joins |
| changing schema | drizzle-kit workflow |
| working with types | inferred select/insert models |
Reference Index
| File | Contents |
|---|---|
references/syntax.md | Drizzle schema syntax, relation patterns, query builder examples, drizzle-kit commands, type inference, and common ORM snippets |