#cqrs #event-sourcing #serverless #lambda

cqrs-es2-sql

A SQL implementation of an event store for cqrs-es2

1 unstable release

0.1.0 Aug 14, 2021

#52 in #event-sourcing

MIT license

31KB
851 lines

cqrs-es2-sql

A SQL implementation of the cqrs-es2 stores.

Publish Test Crates.io docs


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–14MB
~266K SLoC