A Postgres implementation of the
EventStore
trait in cqrs-es.
Add to your Cargo.toml file:
toml
[dependencies]
cqrs-es = "0.2.2"
persist-es = "0.2.2"
postgres-es = "0.2.2"
Requires access to a Postgres DB with existing tables. See:
- Sample database configuration
- Use docker-compose
to quickly setup a local database
A simple configuration example:
let store = default_postgress_pool("postgresql://my_user:my_pass@localhost:5432/my_db");
let cqrs = postgres_es::postgres_cqrs(pool, vec![])
v0.2.2
v0.2.1
v0.2.0
Moved to async/await for better tool support.
v0.1.3
Aggregates now consume events on apply
.
v0.1.2
Require queries to also use Send & Sync.
v0.1.1
Use r2d2_postgres crate to support Send + Sync
for multi-threaded applications.
GenericQueryRepository
to simplify event replay.A demo application is available here.