shelly-data 0.5.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 async_repo;
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, TenantBackgroundJobQuota,
    TenantQuotaBackgroundJobs, TransactionalEmailService,
};
pub use async_repo::{
    AsyncCancellationToken, AsyncMemoryRepo, AsyncQueryContext, AsyncRepo, AsyncRepoFuture,
};
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_contract_async, run_with_retry,
    run_with_retry_async, AdapterCallContract, AdapterConformanceCheck, AdapterConformanceReport,
    AnalyticsEvent, AnalyticsSink, AxiomTelemetryBridge, BigQueryAdapter, ClickHouseAdapter,
    ConnectionLifecycle, ConnectionLifecycleHook, DataWindowRequest, DataWindowResponse,
    InMemoryAxiomSink, InMemoryBigQueryAdapter, InMemoryClickHouseAdapter, 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, KeysetCursor, KeysetDirection, KeysetPagination, Pagination, Query,
    QueryWindow, Sort, SortDirection, WindowToken, WireFormatProfile,
};
pub use repo::{
    adapter_for, AdapterDriver, BigQueryDriver, ClickHouseDriver, CompactRowsPayload,
    IncrementalDiff, MemoryRepo, MySqlAdapter, OpenSearchAdapterDriver, PostgresAdapter, Repo, Row,
    SingleStoreDriver, SqliteAdapter, StoredRow, TenantPolicyContext, TenantPolicyDecision,
    TenantPolicyHook, TenantRepoConfig, TenantRepoOperation, TenantScopedRepo, WindowPage,
};
pub use schema::{Field, FieldType, Schema, SchemaDefinition};