All topics
Database · Learning hub

Drizzle cheat sheet & developer notes

Drizzle cheat sheet and 6 curated developer notes — core concepts, patterns, and interview prep. Maintained by the DevRecall team.

Save this stack to your DevRecallTest yourself — Drizzle quizMore Database notes
01 · Drizzle

Drizzle ORM

Drizzle ORM. Schema Definition. // db/schema.ts import { pgTable, text, integer, boolean, timestamp, uuid, varchar, jsonb, pgEnum, index, uniqueIndex, } from 'drizzle-orm/pg-core'; import { relations } from 'drizzle-orm'…

Read
02 · Drizzle

Schema Definition & Table Design

Drizzle ORM: Schema Definition & Table Design. Drizzle is a TypeScript-first ORM that keeps you close to SQL while providing type safety. Your schema is the single source of truth for both the database and TypeScript typ…

Read
03 · Drizzle

Queries: Select, Insert, Update, Delete

Drizzle: Queries — Select, Insert, Update, Delete. SELECT Queries. import { db } from '@/db'; import { users, folders, pages } from '@/db/schema'; import { eq, and, or, not, lt, gt, lte, gte, like, ilike, inArray, isNull…

Read
04 · Drizzle

Relations, Joins & Transactions

Drizzle: Relations, Joins & Transactions. Defining Relations. // src/db/schema.ts — define relations for the relational query API import { relations } from 'drizzle-orm'; export const usersRelations = relations(users, ({…

Read
05 · Drizzle

Migrations & Database Management

Drizzle: Migrations & Database Management. drizzle.config.ts. // drizzle.config.ts (project root) import { defineConfig } from 'drizzle-kit'; export default defineConfig({ schema: './src/db/schema.ts', out: './src/db/mig…

Read
06 · Drizzle

Advanced Patterns & Type Safety

Drizzle: Advanced Patterns & Type Safety. Drizzle with Zod (drizzle-zod). import { createInsertSchema, createSelectSchema, createUpdateSchema } from 'drizzle-zod'; import { z } from 'zod'; import { pages } from '@/db/sch…

Read

Keep your Drizzle knowledge sharp.

Save this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.

Get started — free forever