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§

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.

Enums§

ClaimError
Errors returned while selecting and claiming a batch of events.
EnqueueError
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
TransientKind
PostgreSQL SQLSTATE categories for failures callers may retry as a whole operation. The original SQLx error remains available as the source.

Constants§

MIGRATIONS
The migration sequence shipped with this adapter; entries are append-only.
SCHEMA_VERSION
Schema version adapters compare before using these migration artifacts.

Functions§

ack
Acknowledges one current, unexpired claim.
begin_snapshot
Starts a finite PostgreSQL snapshot pager.
check_schema
Verifies the tables and all columns required by schema version 1.
claim
Claims pending and expired events in ascending row-id order.
enqueue
Inserts an event and its pending delivery in the supplied caller transaction.
finalize_pending_delivery_for_migration
Finalises one canonical pending migration import in the caller-owned transaction.
import_for_migration
Imports one event and a portable legacy delivery state in the supplied transaction. The caller remains responsible for commit or rollback.
page
Reads a bounded live page after after_row_id.
quarantine
Moves one current, unexpired claim to the terminal quarantined state.
release
Returns one current, unexpired claim to pending after a delay.
renew
Renews one current, unexpired claim using PostgreSQL’s current time.
retry
Returns one current, unexpired claim to pending and records its failure.