diff --git a/src/commons/eventsourcing/store.rs b/src/commons/eventsourcing/store.rs index c903355c..4ad46688 100644 --- a/src/commons/eventsourcing/store.rs +++ b/src/commons/eventsourcing/store.rs @@ -37,10 +37,9 @@ pub trait KeyStore { fn has_aggregate(&self, id: &Handle) -> bool; - fn aggregates(&self) -> Vec; // Use Iterator? + fn aggregates(&self) -> Vec; /// Throws an error if the key already exists. - fn store( &self, id: &Handle, @@ -49,7 +48,6 @@ pub trait KeyStore { ) -> Result<(), KeyStoreError>; /// Get the value for this key, if any exists. - fn get( &self, id: &Handle, @@ -57,7 +55,6 @@ pub trait KeyStore { ) -> Result, KeyStoreError>; /// Get the value for this key, if any exists. - fn get_event(&self, id: &Handle, version: u64) -> Result, KeyStoreError>; fn store_event(&self, event: &V) -> Result<(), KeyStoreError>; @@ -65,11 +62,9 @@ pub trait KeyStore { fn store_command(&self, command: StoredCommand) -> Result<(), KeyStoreError>; /// Get the latest aggregate - fn get_aggregate(&self, id: &Handle) -> Result, KeyStoreError>; /// Saves the latest snapshot - overwrites any previous snapshot. - fn store_aggregate( &self, id: &Handle,