Crate cqrs_es2_sql

Crate cqrs_es2_sql 

Source
Expand description

§cqrs-es2-sql

A Postgres implementation of the EventStore trait in cqrs-es2.

Publish Test Crates.io docs

§Installation

[dependencies]
cqrs-es2 = "^0.2"
serde = { version = "^1.0.127", features = ["derive"] }
serde_json = "^1.0.66"
cqrs-es2-sql = "0.2.3"
postgres = { version = "^0.19.1", features = ["with-serde_json-1"] }

Structs§

EventStore
Storage engine using an Postgres backing. This is the only persistent store currently provided.
GenericQueryRepository
This provides a simple query repository that can be used both to return deserialized views and to act as a query processor.
SnapshotEventStore
Storage engine using an Postgres backing and relying on a serialization of the aggregate rather than individual events. This is similar to the “snapshot strategy” seen in many CQRS frameworks.

Functions§

get_cqrs
A convenience function for creating a CqrsFramework
get_snapshot_cqrs
A convenience function for creating a CqrsFramework using a snapshot store

Type Aliases§

Cqrs
A convenience type for creating a CqrsFramework backed by EventStore and using a simple metadata supplier with time of commit.
SnapshotCqrs
A convenience type for creating a CqrsFramework backed by SnapshotSqlStore and using a simple metadata supplier with time of commit.