1 unstable release
0.1.0 | Aug 14, 2021 |
---|
#2526 in Database interfaces
32KB
851 lines
cqrs-es2-sql
A SQL implementation of the cqrs-es2 stores.
Installation
[dependencies]
cqrs-es2 = "^0.3"
serde = { version = "^1.0.127", features = ["derive"] }
serde_json = "^1.0.66"
cqrs-es2-sql = "0.1.0"
postgres = { version = "^0.19.1", features = ["with-serde_json-1"] }
Usage
use postgres::{Client, NoTls};
use cqrs_es2_sql::postgres_cqrs;
let connection = Client::connect("postgresql://demo_user:demo_pass@localhost:5432/demo", NoTls).unwrap();
let cqrs = postgres_cqrs(connection, vec![Box::new(my_query)])
Change log
v0.1.0
- Move from deprecated repo
- Consolidate store implementations
- Use
cqrs-es2
version 0.4.0
TODO
- Some additional framework around
GenericQueryRepository
to simplify event replay.
Demo
A demo application is available here.
Dependencies
~7–17MB
~240K SLoC