Crate ruvswarm_persistence

Crate ruvswarm_persistence 

Source
Expand description

Persistence layer for ruvswarm with SQLite and ORM support

This crate provides a flexible persistence layer with support for:

  • SQLite backend for native platforms
  • IndexedDB backend for WASM targets
  • In-memory storage for testing
  • Repository pattern with type-safe queries
  • Transaction support and connection pooling

Re-exports§

pub use models::AgentModel;
pub use models::EventModel;
pub use models::MessageModel;
pub use models::MetricModel;
pub use models::TaskModel;
pub use memory::MemoryStorage;
pub use sqlite::SqliteStorage;

Modules§

memory
In-memory storage implementation for testing and development
migrations
Database migration management
models
Data models for persistence layer
sqlite
SQLite backend implementation for native platforms

Structs§

QueryBuilder
Query builder for type-safe queries with parameterized values

Enums§

StorageError
Storage error types

Traits§

Repository
Repository pattern implementation
Storage
Storage trait for persistence operations
Transaction
Transaction trait for atomic operations

Functions§

init_storage
Initialize storage based on target platform