Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove mains and migrations from examples #118

Merged
merged 2 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `AggregateState::new` second parameter from `Uuid` to `impl Into<Uuid>`.
- `AggregateManager::load` first parameter from `Uuid` to `impl Into<Uuid>`.
- `AggregateState::delete` first parameter from `Uuid` to `impl Into<Uuid>`.

- [[#118]]: Merged rebuild examples into one; removed mains and migrations from examples.
---

## [0.7.0]
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ members = [
"examples/customize_persistence_flow",
"examples/delete_aggregate",
"examples/dyn_event_store_in_aggregate",
"examples/rebuild_shared_projection",
"examples/rebuilder",
"examples/rebuild_strategies",
"examples/simple_projection",
"examples/simple_saga",
"examples/simple_side_effect",
Expand Down

This file was deleted.

68 changes: 0 additions & 68 deletions examples/aggregate_merging/src/main.rs

This file was deleted.

This file was deleted.

4 changes: 3 additions & 1 deletion examples/customize_persistence_flow/src/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ impl AggregateManager for CounterAggregate {
aggregate_state: &AggregateState<Self::State>,
events: Vec<Self::Event>,
) -> Result<Vec<StoreEvent<Self::Event>>, Self::Error> {
// Here is the persistence flow customization.
self.event_store
.persist(|pool| async move {
let mut connection: PoolConnection<Postgres> = pool.acquire().await?;
Expand Down Expand Up @@ -91,7 +92,8 @@ impl AggregateManager for CounterAggregate {

for store_event in store_events.iter() {
for policy in self.event_store.policies().iter() {
// We want to just log errors instead of return them
// We want to just log errors instead of return them. This is the customization
// we wanted.
match policy.handle_event(store_event).await {
Ok(_) => (),
Err(error) => println!("{:?}", error),
Expand Down
78 changes: 0 additions & 78 deletions examples/customize_persistence_flow/src/main.rs

This file was deleted.

This file was deleted.

89 changes: 0 additions & 89 deletions examples/delete_aggregate/src/main.rs

This file was deleted.

27 changes: 0 additions & 27 deletions examples/rebuild_shared_projection/Cargo.toml

This file was deleted.

6 changes: 0 additions & 6 deletions examples/rebuild_shared_projection/README.md

This file was deleted.

This file was deleted.

Loading