Add complete SQLite implementation of RelayLabelRepository trait with all CRUD operations (get_label, save_label, delete_label, get_all_labels). Key changes: - Create infrastructure entities module with RelayLabelRecord struct - Implement TryFrom traits for converting between database records and domain types - Add From<sqlx::Error> and From<RelayLabelError> for RepositoryError - Write comprehensive functional tests covering all repository operations - Verify proper handling of edge cases (empty results, overwrites, max length) TDD phase: GREEN - All repository trait tests now passing with SQLite implementation Ref: T036 (specs/001-modbus-relay-control/tasks.md)
17 lines
492 B
Rust
17 lines
492 B
Rust
//! Persistence layer implementations.
|
|
//!
|
|
//! This module contains the concrete implementations of repository traits
|
|
//! for data persistence, including SQLite-based storage for relay labels.
|
|
|
|
/// Mock repository implementation for testing.
|
|
pub mod label_repository;
|
|
|
|
/// Comprehensive tests for `RelayLabelRepository` trait contract (T035).
|
|
#[cfg(test)]
|
|
pub mod label_repository_tests;
|
|
|
|
/// `SQLite` repository implementation for relay labels.
|
|
pub mod sqlite_repository;
|
|
|
|
pub mod entities;
|