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

#223 in Database interfaces

Download history 114/week @ 2024-01-01 160/week @ 2024-01-08 161/week @ 2024-01-15 143/week @ 2024-01-22 179/week @ 2024-01-29 57/week @ 2024-02-05 134/week @ 2024-02-12 370/week @ 2024-02-19 99/week @ 2024-02-26 111/week @ 2024-03-04 95/week @ 2024-03-11 92/week @ 2024-03-18 34/week @ 2024-03-25 130/week @ 2024-04-01 136/week @ 2024-04-08 131/week @ 2024-04-15

434 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–30MB
~508K SLoC