reader

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, its DISPLAY values raw for a query that reveals them. A record without events (a projection dropped them) is returned as it is. The masked fields of a scheduled command a body holds, which the model's schema does not name, go to the reader's met.