Crates.io | postgres-es2 |
lib.rs | postgres-es2 |
version | 0.2.3 |
source | src |
created_at | 2021-08-12 06:57:54.212616 |
updated_at | 2021-08-13 18:03:41.558625 |
description | A Postgres implementation of an event store for cqrs-es2. |
homepage | |
repository | https://github.com/brgirgis/postgres-es2 |
max_upload_size | |
id | 435140 |
size | 50,136 |
A Postgres implementation of the EventStore
trait in cqrs-es2.
[dependencies]
cqrs-es2 = "^0.2"
serde = { version = "^1.0.127", features = ["derive"] }
serde_json = "^1.0.66"
postgres-es2 = "0.2.3"
postgres = { version = "^0.19.1", features = ["with-serde_json-1"] }
use postgres::{Client, NoTls};
use postgres_es2::PostgresCqrs;
let connection = Client::connect("postgresql://demo_user:demo_pass@localhost:5432/demo", NoTls).unwrap();
let cqrs = postgres_es2::postgres_cqrs(connection, vec![Box::new(my_query)])
v0.2.3
v0.2.2
v0.2.1
v0.2.0
GenericQueryRepository
to simplify event replay.A demo application is available here.