SnapshotProperties
The fields of a snapshot record a query names, as QueryFields: the system fields and STATE, under which the aggregate's state lies. Each name is its path in upper snake case, a nested segment after __: OPERATOR__ID is operator.id.
The compiler generates a <State>Properties object for the state of each aggregate whose module has wow-query-api on its class path. It extends this class, so it carries these fields beside the state's own, which it names after the Kotlin properties of their full path: OrderStateProperties.STATE__STATUS is state.status, and STATE__ITEMS__PRODUCT_ID is state.items.productId, named inside STATE__ITEMS.elementMatch { }. Without a state at hand, the system fields are on the companion: SnapshotProperties.LAST_EVENT_TIME.
val query = listQuery {
filter {
OrderStateProperties.STATE__STATUS eq OrderStatus.PAID
OrderStateProperties.OPERATOR__ID eq "user-1"
}
sort { OrderStateProperties.LAST_EVENT_TIME.desc() }
}Inheritors
Properties
The aggregate's id, unique within its tenant.
Whether the aggregate is deleted; a query sees only the others unless it filters on the deletion state.
When the aggregate got its first event, in epoch milliseconds.
Who sent the command that created the aggregate, as OPERATOR.
When the aggregate got its last event, in epoch milliseconds.
Who sent the last command: {id, tenantId, crossScope}, or null for an anonymous caller.
The aggregate's owner, null when it has none.
The aggregate's space, null when it has none.
The aggregate's state.
The aggregate's tenant.
The aggregate's version: the number of its events.