Nexus
1.x
Docs/Nexus/SQLite Store
Open

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

The store/sqlite package implements Nexus's store.Store interface using the grove ORM with the SQLite driver. It requires no external database process, making it ideal for development, integration tests, and single-node deployments.

Usage01

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

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

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

gw := nexus.New(
    nexus.WithDatabase(s),
)

Pass ":memory:" for a fully in-process, zero-persistence store useful in tests:

db, err := grove.Open(sqlitedriver.Open(":memory:"))

Internals02

AspectDetail
Drivergrove ORM + sqlitedriver
Migrationsgrove orchestrator with programmatic migrations
TransactionsSQLite-level transactions
ConcurrencyMultiple readers, single writer (WAL mode)

When to use03

  • Development and local testing without external dependencies.

  • Single-process or embedded deployments.

  • CI pipelines where spinning up PostgreSQL is impractical.