Expand description
Service layer: provider abstraction, owned Database handle,
transaction helpers, batch execution, and CLI display traits.
Copyright (c) systemprompt.io — Business Source License 1.1. See https://systemprompt.io for licensing details.
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::connection::PoolConfig;pub use postgres::transaction::PostgresTransaction;pub use provider::DatabaseProvider;pub use schema_linter::LintError;pub use schema_linter::LintSeverity;pub use schema_linter::created_table_names;pub use schema_linter::lint_declarative_schema;pub use schema_linter::lint_declarative_schemas;pub use transaction::BoxFuture;pub use transaction::with_transaction_retry;
Modules§
- database
- Top-level
Databasehandle that owns one or twoDatabaseProviderinstances (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
PostgreSQLimplementation ofcrate::services::DatabaseProvider.- provider
- Trait abstractions over a database backend.
- schema_
linter - Declarative-schema linter.
- transaction
- A transaction wrapper over
PgDbPoolthat retries the whole closure on a serialization failure, without going through the dyn-safe trait.