Skip to main content

Crate keepsake_sqlx

Crate keepsake_sqlx 

Source
Expand description

SQLx adapter for Keepsake.

Human guides and reference material are in the docs/ directory of the repository. API reference: https://docs.rs/keepsake-sqlx.

This crate provides Postgres, SQLite, and MySQL repositories for durable keepsake lifecycle state, relation reads, expiry workers, audit history, and audit outbox export.

SQL audit writes performed by repository commands are transactional: apply, revoke, expiry helpers, and append_audit_event write the audit event and the corresponding outbox row in the same database transaction. External systems such as Kafka, Restate, S3, or warehouse loaders should consume the database outbox through audit_outbox, claim_audit_outbox, ack_audit_outbox, and release_audit_outbox; broker and storage clients intentionally stay outside this crate.

Modules§

prelude
Common imports for application modules using the SQLx adapter.

Structs§

ActiveRelation
Active keepsake membership with its stored relation definition.
AppliedKeepsake
Result of an apply operation.
AuditCursor
Keyset cursor for audit event reads in stable (occurred_at, id) order.
AuditEventRecord
A persisted audit event together with its stable storage id.
AuditOutboxCursor
Keyset cursor for audit outbox export in stable id order.
AuditOutboxRecord
Audit outbox row for external delivery workers.
FulfilledExpiryCandidate
Due fulfillment expiry candidate.
LocalRelationCache
Local in-process relation definition cache.
LocalRelationCacheConfig
Configuration for local in-process relation definition caching.
MembershipCursor
Keyset cursor for active relation membership scans.
NoopRelationCache
Relation cache implementation that never stores entries.
PostgresBackend
Postgres backend marker.
SqlxKeepsakeRepository
SQLx-backed keepsake repository.
TimedExpiryCandidate
Due timed expiry candidate.
TimedSqlxKeepsakeRepository
Timestamp-scoped repository view.

Enums§

RepositoryError
SQL repository errors.

Traits§

KeepsakeSqlxBackend
SQLx backend supported by Keepsake.
RelationCache
Adapter for relation definition caching.

Type Aliases§

KeepsakeRepository
Default Postgres-backed keepsake repository.
PostgresKeepsakeRepository
Postgres-backed keepsake repository.
RepositoryResult
Result alias for SQL repository operations.
TimedKeepsakeRepository
Default Postgres timestamp-scoped repository view.