shelly-data 0.4.0

Data-layer primitives for Shelly LiveView (schemas, changesets, repo, migrations).
Documentation
//! Shelly data-layer primitives.
//!
//! This crate is intentionally transport-agnostic and DB-driver-agnostic.
//! It provides:
//! - schema metadata
//! - changeset casting/validation
//! - repo traits + an in-memory adapter abstraction
//! - query composition primitives
//! - migration loading/state application helpers

mod adapter;
mod app_services;
mod changeset;
mod error;
mod integrations;
mod migration;
mod query;
mod repo;
mod schema;

pub use adapter::{AdapterKind, DatabaseConfig};
pub use app_services::{
    map_app_service_error, map_app_service_result, AppServiceError, AppServiceErrorKind,
    AppServiceResult, AuthCredentials, AuthIdentity, AuthSession, BackgroundJobHandle,
    BackgroundJobRequest, BackgroundJobService, BackgroundJobState, BackgroundJobStatus,
    CacheBackend, CacheEntry, EmailMessage, EmailReceipt, IdentityService, InMemoryCacheBackend,
    InMemoryIdentityService, InMemoryQueueBackend, InMemoryTransactionalEmailService,
    JobOrchestratorBackgroundJobs, QueueBackend, QueueMessage, TransactionalEmailService,
};
pub use changeset::{Changeset, ValidationError};
pub use error::{DataError, DataResult};
pub use integrations::{
    map_integration_error, map_integration_result, query_from_search,
    run_adapter_conformance_suite, run_with_contract, run_with_retry, AdapterCallContract,
    AdapterConformanceCheck, AdapterConformanceReport, AnalyticsEvent, AnalyticsSink,
    AxiomTelemetryBridge, ConnectionLifecycle, ConnectionLifecycleHook, InMemoryAxiomSink,
    InMemoryJobOrchestrator, InMemoryOpenSearchAdapter, InMemorySingleStoreAdapter,
    IntegrationError, IntegrationErrorKind, IntegrationResult, JobCompletionCallback, JobHandle,
    JobOrchestrator, JobRequest, JobState, JobStatus, LifecycleHooks, OpenSearchAdapter,
    QueryContext, RetryPolicy, SearchRequest, SearchResponse, SingleStoreAdapter, SqlCommand,
    TriggerDevAdapter, TypedQueryBoundary, CONTEXT_TAG_CORRELATION_ID, CONTEXT_TAG_REQUEST_ID,
    CONTEXT_TAG_RETRY_INITIAL_BACKOFF_MS, CONTEXT_TAG_RETRY_MAX_ATTEMPTS,
    CONTEXT_TAG_RETRY_MAX_BACKOFF_MS, CONTEXT_TAG_TIMEOUT_MS,
};
pub use migration::{
    load_migrations, AppliedMigration, Migration, MigrationEngine, MigrationStatus,
};
pub use query::{Filter, FilterOperator, Pagination, Query, Sort, SortDirection};
pub use repo::{
    adapter_for, AdapterDriver, MemoryRepo, MySqlAdapter, PostgresAdapter, Repo, Row,
    SqliteAdapter, StoredRow,
};
pub use schema::{Field, FieldType, Schema, SchemaDefinition};