33 releases

0.4.12 Sep 13, 2024
0.4.11 Feb 20, 2024
0.4.10 Aug 27, 2023
0.4.9 May 27, 2023
0.0.18 May 5, 2020

#193 in Database interfaces

Download history 147/week @ 2024-09-24 74/week @ 2024-10-01 44/week @ 2024-10-08 79/week @ 2024-10-15 72/week @ 2024-10-22 58/week @ 2024-10-29 35/week @ 2024-11-05 84/week @ 2024-11-12 174/week @ 2024-11-19 42/week @ 2024-11-26 107/week @ 2024-12-03 283/week @ 2024-12-10 285/week @ 2024-12-17 21/week @ 2024-12-24 80/week @ 2024-12-31 313/week @ 2025-01-07

749 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

~14–27MB
~411K SLoC