Skip to main content

Module storage

Module storage 

Source
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

FeatureSQLite BackendNative V3 Backend
ACID Transactions✅ Full✅ WAL-based
Raw SQL Access✅ Yes❌ No
Dependencieslibsqlite3Pure Rust
Startup TimeFastFaster
Tool Compatibilitymagellan, 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§

EdgeSpec
Edge specification for insertion operations.
GraphConfig
Complete configuration for graph construction.
GraphEntity
NodeSpec
Node specification for insertion operations.
SqliteGraph
Embedded SQLite-backed graph database.
UnifiedGraphStore
Unified graph store supporting dual backends.

Enums§

BackendKind
Backend kind selection for UnifiedGraphStore.
SqliteGraphBackendKind
Backend selection enum for choosing between storage implementations.

Functions§

open_graph
Open a graph with the specified configuration.