Skip to main content

Crate lenso_postgres_kit

Crate lenso_postgres_kit 

Source
Expand description

PostgreSQL lifecycle support for storage owned by one Lenso Module.

This crate deliberately is not a shared State Module, SQL Capability, or repository abstraction. A Module keeps ownership of its data model, migrations, queries, and transaction boundaries. The kit only makes the repetitive PostgreSQL schema lifecycle explicit and fail-closed.

Macros§

sql_migrations
Declares immutable migrations whose SQL bodies live in dedicated files.

Structs§

Migration
One immutable, ordered migration owned by a Module.
OwnedPostgres
A verified, schema-scoped PostgreSQL pool for one Module.
SchemaOperator
Explicit operator-only setup and upgrade workflows for one owned schema.
SchemaPlan
An immutable description of one Module-owned PostgreSQL schema.

Enums§

PlanError
A schema plan is invalid and cannot be used for setup or preparation.
PostgresKitError
A PostgreSQL schema lifecycle operation failed without applying a fallback.
SetupOutcome
Result of explicitly setting up an owned schema.
UpgradeOutcome
Result of explicitly upgrading an owned schema.