ManifestQuerySchemaSource

class ManifestQuerySchemaSource(manifest: Manifest, strategies: MaskStrategyResolver = MaskStrategyResolver.NONE) : QuerySchemaSource

The query schema of each aggregate's snapshot model as the Manifest states it: the aggregate's state schema in $defs becomes the declaration of state, its x-wow-* keywords (written by manifest-tools from the :query-api annotations, #4332) the semantic types, aliases and sensitivity of its fields. Nothing is introspected at run time. The snapshot's system fields come from the model's profile (SnapshotQueryModelProfile), not from here.

Only the snapshot model's state is declared here; the events model's events is EventsQuerySchemas'. An aggregate whose snapshots are disabled is declared too: no snapshot query runs over it, but a state read of it is masked and admitted by this schema, through the policy gateway of a type whose snapshots are not queried (me.ahoo.wow.query.state.SnapshotPolicyGateway). An aggregate the Manifest does not hold has no declaration here.

Custom mask strategies (x-wow-mask.strategy) are resolved through strategies: the runtime does not load classes by name, so an unregistered one fails the schema build.

Constructors

Link copied to clipboard
constructor(manifest: Manifest, strategies: MaskStrategyResolver = MaskStrategyResolver.NONE)

Properties

Link copied to clipboard
open override val priority: Int

Functions

Link copied to clipboard

The declaration of type's snapshot state and of its access attributes (accessDeclaration), compiled once, whether its snapshots are enabled or not; empty when the Manifest does not hold the aggregate.

Link copied to clipboard
open suspend override fun load(context: QuerySchemaContext): List<QuerySchemaDeclaration>

The declarations of context's model this source holds.