Expand description
PostgreSQL event store backend for EventCore.
This crate provides a production-grade PostgresEventStore backed by PostgreSQL,
with ACID transactions, advisory locks, and connection pooling via sqlx.
Event immutability is enforced by PostgreSQL triggers. Stream pattern matching follows the conventions described in ADR-0047.
PostgresEventStore implements EventStore, EventReader, CheckpointStore,
and ProjectorCoordinator from eventcore-types.
§Getting Started
use eventcore_postgres::PostgresEventStore;
let store = PostgresEventStore::new("postgres://user:pass@localhost/mydb").await?;Structs§
- Coordination
Guard - Guard type that releases leadership when dropped.
- MaxConnections
- Maximum number of database connections in the pool.
- Postgres
Checkpoint Store - Postgres-backed checkpoint store for tracking projection progress.
- Postgres
Config - Configuration for PostgresEventStore connection pool.
- Postgres
Event Store - PostgreSQL-backed event store implementing EventCore’s storage traits.
- Postgres
Projector Coordinator - Postgres-backed projector coordinator for distributed leadership.
Enums§
- Coordination
Error - Error type for projector coordination operations.
- Postgres
Checkpoint Error - Error type for PostgresCheckpointStore operations.
- Postgres
Event Store Error - Errors that can occur when creating a
PostgresEventStore.