Back to Rivet

Drizzle Integration

examples/sqlite-drizzle/README.md

2.2.11.1 KB
Original Source

Drizzle Integration

Demonstrates Drizzle ORM integration with Rivet Actors for type-safe database operations.

Getting Started

sh
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/sqlite-drizzle
npm install
npm run dev

Features

  • Drizzle ORM integration: Use Drizzle for type-safe database operations within actors
  • Automatic migrations: Database schema migrations managed automatically
  • Type-safe queries: Full TypeScript type safety from schema to queries
  • Actor-scoped database: Each actor can have its own isolated database instance

Implementation

This example demonstrates database integration with Rivet Actors using Drizzle ORM:

  • Actor Definition (src/backend/registry.ts): Shows how to integrate Drizzle ORM for type-safe database operations within actors

Resources

Read more about database integration, actions, and state.

License

MIT