Expand description
Storage abstraction layer supporting dual backends.
This module provides graph-based storage for ForgeKit with support for both SQLite and Native V3 backends. Users choose the backend based on their needs.
§Backend Selection
| Feature | SQLite Backend | Native V3 Backend |
|---|---|---|
| ACID Transactions | ✅ Full | ✅ WAL-based |
| Raw SQL Access | ✅ Yes | ❌ No |
| Dependencies | libsqlite3 | Pure Rust |
| Startup Time | Fast | Faster |
| Tool Compatibility | magellan, llmgrep, mirage, splice (current) | Updated tools |
§Examples
use forge_core::storage::{UnifiedGraphStore, BackendKind};
// Use SQLite backend (default, stable)
let store = UnifiedGraphStore::open("./codebase", BackendKind::SQLite).await?;
// Or use Native V3 backend (updated tools required)
let store = UnifiedGraphStore::open("./codebase", BackendKind::NativeV3).await?;Structs§
- Edge
Spec - Edge specification for insertion operations.
- Graph
Config - Complete configuration for graph construction.
- Graph
Entity - Node
Spec - Node specification for insertion operations.
- Sqlite
Graph - Embedded SQLite-backed graph database.
- Unified
Graph Store - Unified graph store supporting dual backends.
Enums§
- Backend
Kind - Backend kind selection for UnifiedGraphStore.
- Sqlite
Graph Backend Kind - Backend selection enum for choosing between storage implementations.
Functions§
- open_
graph - Open a graph with the specified configuration.