Use Drizzle ORM with DaloyJS
Drizzle ORM is a lightweight, TypeScript-native ORM with a SQL-like API. It runs everywhere DaloyJS does, including Cloudflare Workers and Vercel, and infers result types directly from your schema.
- 01clientHTTP requestGET /users/:id
- 02zodValidated inputparams.id is a uuid
- 03drizzleTyped queryselect().from(users).where(eq(...))
- 04responseTyped body200 UserSchema | 404
1. Install
2. Define your schema
3. Create a Drizzle plugin
4. Augment app state types
5. Use it in routes
Transactions
Edge runtimes
Drizzle is the easiest path to running DaloyJS against a real database on the edge. Pick a driver:
- Cloudflare Workers + D1:
drizzle-orm/d1 - Neon (Postgres) on any edge:
drizzle-orm/neon-http - PlanetScale (MySQL):
drizzle-orm/planetscale-serverless
Compare with Prisma, TypeORM, MikroORM, Sequelize, or the ODM overview if you are working with document databases.
Drizzle pairs cleanly with every host in the database hosting overview, including Neon, PlanetScale, Turso, and Cloudflare D1.