QueryModelProfile

sealed class QueryModelProfile

Record layout and invariants of one built-in QueryModel.

Every snapshot/event-stream difference that the query runtime depends on lives here, so gateways, validators, maskers and backends ask the profile instead of branching on QueryModel themselves. Custom models have no profile; operations that need one of these facts reject them.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

When the record last changed: the default orderBy of FIRST and LAST metrics.

Link copied to clipboard

When the record's aggregate got its first event, or null when a record does not say.

Link copied to clipboard

Unique record identity: the target of id filters and the tie-breaker of every cursor.

Link copied to clipboard
Link copied to clipboard
abstract val payloadField: QueryField

Logical field that holds the user payload; masked fields must live below it.

Link copied to clipboard
open val payloadTypeField: QueryField? = null

Field that names the payload type of each record, or null when the payload is monomorphic.

Link copied to clipboard

The field an authenticated caller scope must pin when requireAuthenticatedScope is on: the tenant, the isolation boundary of every built-in model.

Link copied to clipboard

Fields that every record of this model carries, independent of the aggregate.

Link copied to clipboard
open val variantElement: QueryField? = null

The element whose variants are typed payloads (an event stream's body), or null for a monomorphic payload.

Functions

Link copied to clipboard

Returns the scope appended to a query whose filter does not scope it explicitly, or MatchAllFilter when the model has no implicit scope.

Link copied to clipboard

The logical field a system-field filter (ID, TENANT_ID, DELETION, ...) targets: identityField for the record identity, the shared record metadata otherwise.

Link copied to clipboard
open fun validateProjection(projection: Projection)

Rejects a projection that would return records the model cannot interpret.