Skip to main content

Crate dovecote_sqlx_postgres

Crate dovecote_sqlx_postgres 

Source
Expand description

PostgreSQL schema and SQLx boundary for Dovecote.

This crate publishes versioned PostgreSQL migration artifacts and implements the caller-transaction-bound enqueue, schema verification, leased lifecycle operations, and live and finite snapshot paging for Dovecote. The locking, database-time, fencing, and rollback contracts are covered by repository tests; release advertisement remains subject to the published support matrix and release gates.

Structs§

AdminDovecote
Explicit all-tenant PostgreSQL Dovecote operations.
CrateVersion
Numeric crate version used to evaluate migration compatibility without parsing free-form requirement strings.
Migration
An immutable SQL artifact whose compatibility metadata cannot be fabricated by callers of the adapter crate.
MigrationCompatibility
A checked crate-version range for a migration artifact.
MigrationCompatibilityError
Returned when a migration’s maximum supported release precedes its minimum.
PostgresDovecote
PostgreSQL adapter for Dovecote’s durable event and delivery schema.
SnapshotPager
A bounded, finite read over one PostgreSQL repeatable-read snapshot.
TenantDovecote
PostgreSQL Dovecote operations restricted to one validated tenant.

Enums§

ClaimError
Errors returned while selecting and claiming a batch of events.
EnqueueError
Errors returned while enqueueing an event.
FinalizeError
Errors returned by the migration-only delivery finalizer.
ImportError
Errors returned by the migration-only importer.
MutationError
Errors returned by fenced post-claim mutations.
PageError
Errors returned by live and snapshot paging.
SchemaError
Errors returned while checking the installed schema.
TransientKind
PostgreSQL SQLSTATE categories for failures callers may retry as a whole operation. The original SQLx error remains available as the source.

Constants§

LEGACY_MIGRATION
The immutable schema version 1 artifact used by pre-tenant deployments.
MIGRATIONS
The clean-install migration sequence shipped with this adapter.
RLS_PROFILE_SQL
Installs the opt-in RLS policies for a tenant-aware schema.
SCHEMA_VERSION
Schema version adapters compare before using these migration artifacts.
V1_TENANT_ACTIVATE_SQLDeprecated
SQL that validates an operator-owned backfill and activates version 2.
V1_TENANT_ACTIVATE_V2_SQL
Corrected SQL that validates an operator-owned backfill and activates version 2.
V1_TENANT_PREPARE_SQL
SQL that adds nullable tenant columns to a version 1 deployment.

Functions§

bind_tenant
Binds a validated tenant to the current transaction for the RLS profile.
check_schema
Verifies the tables and all columns required by schema version 2.