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§
- Param
Value - 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_coredependent on a specific database driver. - Repo
Error - 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 instoreit_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
Tidentified by keyK. 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§
- Repo
Result - Convenience alias for results returned by repository methods.