- Made
EventStoreWriter
more general, allowing anykey
andposition
types. We also provide aVersionedEventStoreWriter
type alias that usesUUID
andEventVersion
. - Added useful
unsafeSqlStoreGlobalStreamEvents
function. - Got rid of the word
Aggregate
throughout the codebase since that term is too overloaded from DDD. It was replaced either byCommandHandler
or just stream.
- Breaking change: Split up
EventStore
intoEventStoreWriter
andEventStoreReader
. There is now a ton of code sharing between reading from individual streams and reading from the global stream. This also simplified a lot of the event and projection types (now just variations onStreamEvent
andStreamProjection
). - GHC 8.2.1 compatibility
- Added
ProjectionCache
for cachingProjection
state in event streams. - Added
EventStoreQueryRange
to the APIs of the event store and the globally ordered event store. This allows the user to specify optional start and stop points for the query. - Added versions of the
MonadState
event stores that can include other state along with theEventMap
. These are calledembeddedStateEventStore
andembeddedStateGloballyOrderedEventStore
. - Made
Projection
and instance ofContravariant
so it is easier to change theevent
type parameter. - Added a
GloballyOrderedProjection
abstraction to make projecting from globally-ordered event streams simpler. - Added useful
projectionMapMaybe
function. - Added the
runEventStoreUsing
andrunGloballyOrderedEventStoreUsing
functions for running event stores in different monads than the original.
- Refactored
ProcessManager
so it acts more like a read model that emits commands and events. Got rid ofProcessManagerRouter
- Fix race condition in postgres event store where sequence numbers won't be monotonically increasing when multiple writers are writing to the events table. Fixed with an explicit lock on the events table.
- Restructured record types for events paired with version numbers and global sequence numbers.
- Created an in-memory event store for
MonadState
ineventful-memory
.
- Small pedantic fixes for examples and test suites.
- Added links to the github repo in the cabal files.
Initial Hackage release of eventful
. It is already fairly full-featured along
with some documentation and examples.