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§
- Admin
Dovecote - Explicit all-tenant PostgreSQL Dovecote operations.
- Crate
Version - 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.
- Migration
Compatibility - A checked crate-version range for a migration artifact.
- Migration
Compatibility Error - Returned when a migration’s maximum supported release precedes its minimum.
- Postgres
Dovecote - PostgreSQL adapter for Dovecote’s durable event and delivery schema.
- Snapshot
Pager - A bounded, finite read over one PostgreSQL repeatable-read snapshot.
- Tenant
Dovecote - PostgreSQL Dovecote operations restricted to one validated tenant.
Enums§
- Claim
Error - Errors returned while selecting and claiming a batch of events.
- Enqueue
Error - Errors returned while enqueueing an event.
- Finalize
Error - Errors returned by the migration-only delivery finalizer.
- Import
Error - Errors returned by the migration-only importer.
- Mutation
Error - Errors returned by fenced post-claim mutations.
- Page
Error - Errors returned by live and snapshot paging.
- Schema
Error - Errors returned while checking the installed schema.
- Transient
Kind - 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_ SQL - 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.