EventStreamRecords

The records of the events model: a stream as stored, and how the gateway reads one.

Functions

Link copied to clipboard
fun reader(type: AggregateType, masks: PayloadMasks = PayloadMasks.NONE, reading: (EventRecord) -> EventRecord? = { it }): QueryRecordReader

Reads a stored record of type as the model shows it: each event as reading gives it (its current name and revision, its body upgraded; null leaves it out), its body masked by masks. A record without events (a projection dropped them) is returned as it is.

Link copied to clipboard
fun stored(stream: EventStreamRecord): ObjectNode

stream as an events backend returns it: its facts under the model's names (EventStreamFields), each event as stored, {name, revision, body}. A memory backend builds its records so; a log backend reads the same shape.