Crate storeit_core

Crate storeit_core 

Source
Expand description

Core traits for the storeit-rs repository library. This crate is database-agnostic and should not contain any backend-specific logic.

Modules§

transactions
Backend-agnostic transaction abstractions modeled after Spring’s TransactionTemplate. This module defines only generic types and traits. Backends provide implementations.

Enums§

ParamValue
A backend-agnostic representation of a database parameter value. This is used to pass entity field values from generated code to backend adapters without making storeit_core dependent on a specific database driver.
RepoError
Lightweight, backend-agnostic error type for repository operations.

Traits§

Fetchable
Marker trait for types that can be fetched from a database. Implemented via #[derive(Fetchable)] proc-macro in storeit_macros.
Identifiable
Trait for entities that have an identifiable key. This trait exposes the key type and column name so macros can introspect it.
Insertable
Trait for types whose fields can be extracted for an INSERT statement. This is implemented by the #[derive(Fetchable)] macro.
Repository
A trait describing a minimal, asynchronous repository interface for an entity T identified by key K. This is intentionally DB-agnostic. Concrete backends provide implementations.
RowAdapter
A tiny adapter for mapping a backend-specific row type into an entity T. Backends (e.g., rusqlite, mysql_async, tokio_postgres) can implement this for their row representations.
Updatable
Trait for types whose fields can be extracted for an UPDATE statement. This is implemented by the #[derive(Fetchable)] macro.

Type Aliases§

RepoResult
Convenience alias for results returned by repository methods.

Attribute Macros§

async_trait