InMemoryEventQueryStorage
class InMemoryEventQueryStorage(streams: suspend (AggregateType) -> List<EventStreamRecord>, delay: Duration = Duration.ZERO) : QueryBindings<AggregateType>
The in-memory reference backend of the events model: the InMemoryQueryBackend of each aggregate type over the event streams streams gives for it, each as stored (EventStreamRecords.stored), in the order given. It passes QueryBackendSpec as the snapshot one does, and declares the same capabilities: every filter operator but full-text search, element scopes and their expansion, sorts, pages, counts and aggregation, HAVING, top-N, dense fill and windows left to the core.
A host serves the events of a log in memory from it, over the streams the log holds; it reads them all on every query, so it is for local runs, demos and tests.
Constructors
Link copied to clipboard
constructor(streams: suspend (AggregateType) -> List<EventStreamRecord>, delay: Duration = Duration.ZERO)
Functions
Link copied to clipboard
The binding of key, or null when this storage does not serve it.