# postgres-es
**A Postgres implementation of the `EventStore` trait in cqrs-es2.**
[](https://github.com/brgirgis/postgres-es/actions/workflows/crates-io.yml)
[](https://github.com/brgirgis/postgres-es/actions/workflows/rust-ci.yml)
[](https://crates.io/crates/postgres-es2)
[](https://docs.rs/postgres-es2)
---
## Installation
```toml
[dependencies]
postgres-es2 = "0.2.0"
```
## Usage
```
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)])
```
## Change log
### `v0.2.0`
- Transfer of ownership
- Upgrade dependencies
- Add GitHub CI support
- Convert to a modular structure
- Automate GitHub deployment
## TODOs
- Some additional framework around `GenericQueryRepository` to simplify event replay.
## Demo
A demo application [is available here](https://github.com/brgirgis/cqrs-demo).