eventsourcing/memory_store
Types
pub opaque type MemoryStore(entity, command, event, error)
Functions
pub fn load_aggregate_entity(
memory_store: MemoryStore(a, b, c, d),
aggregate_id: String,
) -> Result(a, Nil)
Load a aggregate based on a aggregate_id. If the aggregate is not present, it returns an emtpy aggregate.
pub fn load_events(
memory_store: MemoryStore(a, b, c, d),
aggregate_id: String,
) -> List(EventEnvelop(c))
Load the currently commited events from the memory store. They are wrapped in a MemoryStoreEventEnvelop variant from the EventEnvelop type.