A Postgres implementation of the
EventStore
trait in cqrs-es.
toml
[dependencies]
postgres-es = "0.1.1"
cqrs-es = "0.1.1"
``` use postgreses::{postgrescqrs, PostgresStore, Connection};
let connection = Connection::new("postgresql://demouser:demopass@localhost:5432/demo"); let cqrs = postgreses::postgrescqrs(connection, vec![Box::new(my_query)]) ```
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.