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
SQLxadapter.
Structs§
- Active
Relation - Active keepsake membership with its stored relation definition.
- Applied
Keepsake - Result of an apply operation.
- Audit
Cursor - Keyset cursor for audit event reads in stable
(occurred_at, id)order. - Audit
Event Record - A persisted audit event together with its stable storage id.
- Audit
Outbox Cursor - Keyset cursor for audit outbox export in stable id order.
- Audit
Outbox Record - Audit outbox row for external delivery workers.
- Fulfilled
Expiry Candidate - Due fulfillment expiry candidate.
- Local
Relation Cache - Local in-process relation definition cache.
- Local
Relation Cache Config - Configuration for local in-process relation definition caching.
- Membership
Cursor - Keyset cursor for active relation membership scans.
- Noop
Relation Cache - Relation cache implementation that never stores entries.
- Postgres
Backend - Postgres backend marker.
- Sqlx
Keepsake Repository SQLx-backed keepsake repository.- Timed
Expiry Candidate - Due timed expiry candidate.
- Timed
Sqlx Keepsake Repository - Timestamp-scoped repository view.
Enums§
- Repository
Error - SQL repository errors.
Traits§
- Keepsake
Sqlx Backend SQLxbackend supported by Keepsake.- Relation
Cache - Adapter for relation definition caching.
Type Aliases§
- Keepsake
Repository - Default Postgres-backed keepsake repository.
- Postgres
Keepsake Repository - Postgres-backed keepsake repository.
- Repository
Result - Result alias for SQL repository operations.
- Timed
Keepsake Repository - Default Postgres timestamp-scoped repository view.