32 releases

0.4.11 Feb 20, 2024
0.4.10 Aug 27, 2023
0.4.9 May 27, 2023
0.4.8 Mar 10, 2023
0.0.18 May 5, 2020

#220 in Database interfaces

Download history 101/week @ 2024-02-01 90/week @ 2024-02-08 242/week @ 2024-02-15 242/week @ 2024-02-22 83/week @ 2024-02-29 121/week @ 2024-03-07 86/week @ 2024-03-14 75/week @ 2024-03-21 98/week @ 2024-03-28 123/week @ 2024-04-04 117/week @ 2024-04-11 109/week @ 2024-04-18 52/week @ 2024-04-25 76/week @ 2024-05-02 208/week @ 2024-05-09 171/week @ 2024-05-16

514 downloads per month

Apache-2.0

47KB
1K SLoC

postgres-es

A Postgres implementation of the PersistedEventRepository trait in cqrs-es.


Usage

Add to your Cargo.toml file:

[dependencies]
cqrs-es = "0.4.11"
postgres-es = "0.4.11"

Requires access to a Postgres DB with existing tables. See:

A simple configuration example:

let store = default_postgress_pool("postgresql://my_user:my_pass@localhost:5432/my_db");
let cqrs = postgres_es::postgres_cqrs(pool, vec![])

Things that could be helpful:

Runtime and TLS configuration

This package defaults to expect the Tokio runtime and the Rustls library for TLS. If a different combination is desired the appropriate feature flag should be used:

  • runtime-tokio-native-tls
  • runtime-tokio-rustls (default)
  • runtime-async-std-native-tls
  • runtime-async-std-rustls
  • runtime-actix-native-tls
  • runtime-actix-rustls

Crates.io docs docs

Dependencies

~16–28MB
~503K SLoC