Dispatch
1.x
Docs/Dispatch/SQLite Store
Open

Reading1 min
Updated31 Jul 2026
Sourcev1/stores/sqlite.mdx

The store/sqlite package implements Dispatch's store interfaces using the grove ORM with the SQLite driver. It requires no external database process, making it suitable for embedded deployments, CLI tools, and standalone applications.

Usage01

import (
    "github.com/xraph/grove"
    "github.com/xraph/grove/drivers/sqlitedriver"
    "github.com/xraph/dispatch/store/sqlite"
)

db, err := grove.Open(sqlitedriver.Open("dispatch.db"))
if err != nil {
    log.Fatal(err)
}

s := sqlite.New(db)
if err := s.Migrate(ctx); err != nil {
    log.Fatal(err)
}

d, err := dispatch.New(dispatch.WithStore(s))

Internals02

AspectDetail
Drivergrove ORM + sqlitedriver
Migrationsgrove orchestrator with programmatic migrations
TransactionsSQLite-level transactions
ConcurrencyMultiple readers, single writer (WAL mode)
Pingdb.Ping(ctx)
CloseNo-op -- caller owns the *grove.DB lifecycle

When to use03

  • Embedded or edge deployments where running PostgreSQL is impractical.

  • Local development and integration tests.

  • Single-process applications with moderate throughput.