| Crates.io | postgres-es |
| lib.rs | postgres-es |
| version | 0.4.12 |
| created_at | 2020-04-22 13:26:46.776454+00 |
| updated_at | 2024-09-13 16:29:59.897679+00 |
| description | A Postgres implementation of an event repository for cqrs-es. |
| homepage | |
| repository | https://github.com/serverlesstechnology/postgres-es |
| max_upload_size | |
| id | 232928 |
| size | 51,749 |
A Postgres implementation of the
PersistedEventRepositorytrait in cqrs-es.
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:
docker-compose to quickly setup a local databaseA 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:
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-tlsruntime-tokio-rustls (default)runtime-async-std-native-tlsruntime-async-std-rustlsruntime-actix-native-tlsruntime-actix-rustls