Skip to main content

Module services

Module services 

Source
Expand description

Service layer: provider abstraction, owned Database handle, transaction helpers, batch execution, and CLI display traits.

Re-exports§

pub use database::Database;
pub use database::DatabaseExt;
pub use database::DbPool;
pub use display::DatabaseCliDisplay;
pub use executor::SqlExecutor;
pub use postgres::PostgresProvider;
pub use postgres::transaction::PostgresTransaction;
pub use provider::DatabaseProvider;
pub use provider::DatabaseProviderExt;
pub use transaction::BoxFuture;
pub use transaction::with_transaction;
pub use transaction::with_transaction_raw;
pub use transaction::with_transaction_retry;

Modules§

database
Top-level Database handle that owns one or two DatabaseProvider instances (read + optional write) and exposes the query and transaction surface.
display
CLI display traits for printing query results, table descriptors, and database info to stdout.
executor
SQL batch and statement-by-statement execution helpers.
postgres
PostgreSQL implementation of crate::services::DatabaseProvider.
provider
Trait abstractions over a database backend.
transaction
Generic transaction wrappers that work directly with PgPool / PgDbPool without going through the dyn-safe trait.