Skip to main content

Crate dovecote_sqlx_sqlite

Crate dovecote_sqlx_sqlite 

Source
Expand description

SQLite schema and SQLx boundary for Dovecote.

SQLite’s single-writer model is a distinct support contract. Write and claim transactions therefore use explicit BEGIN IMMEDIATE; busy errors are retried only by the bounded policy configured on SqliteDovecote.

Structs§

AdminDovecote
Explicit administrative SQLite handle.
BusyConfig
Bounded busy handling for SQLite’s single-writer lock.
CrateVersion
Numeric crate version used to evaluate migration compatibility.
Migration
One immutable, versioned SQLite migration artifact.
MigrationCompatibility
A checked crate-version range for a migration artifact.
MigrationCompatibilityError
Error returned when a migration compatibility range is inverted.
SnapshotPager
A finite pager retaining one SQLite read transaction. The explicit marker makes accidental movement across unrelated executors a compile-time error.
SqliteDovecote
SQLite adapter for Dovecote’s durable event and delivery schema.
TenantDovecote
Ordinary SQLite 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 claim-token-fenced delivery mutations.
PageError
Errors returned by live and snapshot paging.
SchemaError
Errors returned while checking the installed schema.
TransientKind
Errors that can be retried by the adapter’s bounded busy policy.

Constants§

DEFAULT_BUSY_RETRIES
Default number of whole-operation retries after each configured busy timeout.
DEFAULT_BUSY_TIMEOUT
Default per-connection wait before returning SQLITE_BUSY.
LEGACY_MIGRATION
The immutable schema version 1 artifact for pre-tenant deployments.
MIGRATIONS
All migration artifacts shipped by this adapter, in version order.
SCHEMA_VERSION
Schema version implemented by this adapter.
V1_TENANT_ACTIVATE_SQL
SQL that validates backfill and activates tenant constraints.
V1_TENANT_PREPARE_SQL
SQL that adds nullable tenant columns to a version 1 deployment.

Functions§

begin_enqueue
Alias for begin_write for callers about to enqueue an event.
begin_write
Begins a caller write transaction using the default busy policy. The returned transaction is safe to pass to TenantDovecote::enqueue.
check_schema
Verifies the exact v2 table shape, constraints, indexes, and foreign key of the installed schema. It never applies a migration.