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.

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::connection::mark_schema_changed;
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 Database handle that owns the read provider, an optional write provider and an optional session provider, 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.
schema_linter
Declarative-schema linter.
transaction
A transaction wrapper over PgDbPool that retries the whole closure on a serialization failure, without going through the dyn-safe trait.