Skip to content

@tank/drizzle-cheatsheet

1.0.0

Description

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-cheatsheet

Drizzle Cheat Sheet

Core Philosophy

  1. Optimize for syntax recall — Cheat sheets should help you write the right schema or query shape quickly.
  2. Keep schema and query sections distinct — Engineers often need one or the other fast.
  3. Include workflow commands — Drizzle use is not only code syntax; drizzle-kit commands matter too.
  4. Prefer concise examples over explanation — This is reference material, not ORM theory.
  5. Show TypeScript-friendly patterns — Drizzle’s value comes from explicit schema and strong typing.

Quick-Start: Common Problems

"How do I define a table?"

  1. import table/column helpers
  2. define columns
  3. add indexes/relations as needed -> See references/syntax.md

"What are the core drizzle-kit commands?"

NeedCommand
generate migrationdrizzle-kit generate
push schemadrizzle-kit push
run studiodrizzle-kit studio
-> See references/syntax.md

Decision Trees

SignalFocus area
defining schematables, columns, relations, indexes
writing queriesselect/insert/update/delete/joins
changing schemadrizzle-kit workflow
working with typesinferred select/insert models

Reference Index

FileContents
references/syntax.mdDrizzle schema syntax, relation patterns, query builder examples, drizzle-kit commands, type inference, and common ORM snippets

Command Palette

Search skills, docs, and navigate Tank