starpod-db 0.1.3

Unified SQLite database (core.db) for Starpod — sessions, cron, auth
Documentation

Unified SQLite database for Starpod's transactional data.

All transactional data (sessions, cron scheduling, authentication) lives in a single core.db file. A shared connection pool (WAL mode, foreign keys enabled) serves all three domains.

Architecture

┌──────────┐
│  CoreDb   │  owns SqlitePool (max 10 conns, WAL, FK ON)
└────┬─────┘
     │ pool.clone()
     ├──────────────► SessionManager::from_pool(pool)
     ├──────────────► CronStore::from_pool(pool)
     └──────────────► AuthStore::from_pool(pool)

Databases kept separate

  • memory.db — FTS5 + vector blobs, bulk reindex I/O, different access pattern
  • vault.db — AES-256-GCM encrypted, optional (needs .vault_key), isolated security boundary

Usage

# async fn example() -> starpod_core::Result<()> {
use starpod_db::CoreDb;

let db = CoreDb::new(std::path::Path::new(".starpod/db")).await?;
// Pass db.pool().clone() to SessionManager, CronStore, AuthStore
# Ok(())
# }