Skip to main content

Crate flow_db

Crate flow_db 

Source
Expand description

SQLite database layer for Agent Flow feature management.

Provides thread-safe database access with WAL mode for concurrent reads, automatic schema migrations, and event logging for audit trails.

§Architecture

  • Single write connection behind Arc<Mutex<Connection>> for thread safety
  • Read-only connection spawning for parallel queries
  • Automatic WAL mode and performance pragmas

§Example

use flow_db::Database;

let db = Database::open(std::path::Path::new("flow.db")).unwrap();
let features = flow_db::FeatureStore::get_all(&db.writer().lock().unwrap()).unwrap();

Re-exports§

pub use feature::FeatureStore;

Modules§

event_log
feature
migration
schema
task_sync

Structs§

Database
Database handle with thread-safe write connection and ability to spawn read-only connections.