Package-level declarations
Types
How a storage's presence operators see a stored null and an empty array.
How a storage aggregates. HAVING, top-N by a metric, dense date-histogram fill and the windows may be RESIDUAL; percentiles and distinct counts need the records themselves, so they are NATIVE or NONE. A storage declares it with of.
The declarations registered in code (querySchemaRegistration), each for the model its context names. 9.x's classpath and working-directory declaration files are gone: the Manifest (ManifestQuerySchemaSource) states what they supplemented.
The profile of an aggregate's read model: every record carries an identity, a payload and an event time: the snapshots (SnapshotQueryModelProfile) and the event streams (EventsQueryModelProfile).
A fact a declaration states, or leaves to a source of lower priority.
The Catalog's compilation of one aggregate model: merges the declarations of sources into the logical model, asks the storage adapter for its facts about it, and compiles them into the published QueryModelSchema. The first load is shared by concurrent callers; a refresh reloads the sources and the storage's native structures and replaces the published schema only when it compiles to a different schema: when the version and the native facts are unchanged, the published instance is kept. A provisional schema is never published: it is answered for provisionalTtl, so a storage that is never written is not asked again on every query, and the first load after that compiles the storage again. Once the storage exists its schema is the one published, at most provisionalTtl after it does.
The event streams of one aggregate type: one record per stream, identified by (aggregateId, version), its events an array whose conditions are element predicates (ELEMENT_MATCH), so count counts commits and a page never splits one. Per-event analytics expand the array (AggregationQuery.elements).
The query schema of each aggregate's events model as the Manifest states it: the source of the events array's declaration and the EventsQueryModelProfile of each aggregate type.
A provider of one fixed schema, for a model whose schema is built in code (tests, tools, the query TCK).
The logical definition of a model: the merged value tree of every source, shared unchanged with every native binding snapshot, with the sensitivity policy its masked values are protected under. The core builds it; a storage adapter reads its values, each logical path template with its value, to report its facts.
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.
Supplies the instance of each custom mask strategy a Manifest names. The runtime does not load classes by name, so a host registers the strategies its domain declares; a strategy no resolver supplies fails the schema build instead of leaving the value unmasked.
How a storage pages. Neither mode has a residual implementation, so each is NATIVE or NONE. A storage declares it with of.
What storage lets a field do. A closed set: a backend grants a subset per field, and every query rule is written against these values. A storage adapter reports, for each logical path, the ones its native structures execute (QueryValueBindings).
Whether a value holds one value per record, or many (an array, or a value inside one).
A field kept only for existing callers: it can still be queried, but new queries and view definitions should avoid it. message says why, or what to use instead; omitted when the declaration gave none.
Where a logical field is stored for one capability. physicalScope is the physical container physicalField lies in whose elements storage indexes as separate documents, such as an Elasticsearch nested mapping, so a backend addresses the field through it; null when there is none.
Where a storage keeps a logical value for one capability, as its adapter reports it (of): the physicalPath in the stored record, whose * key slots the core fills from the logical path; the native storageTypes there, or null when the storage does not know them; the physicalScope, the container whose elements the storage indexes as separate documents (an Elasticsearch nested mapping), when there is one; and whether an index backs it (indexed), null when the storage does not say. indexed never gates a capability: the descriptor publishes it.
The effective capabilities of one field, compiled once from its value definition, the capabilities storage grants it, its sensitivity, its element scopes and the model's storage support. Admission checks each reference against this record, the descriptor publishes it, and it lists each capability with the cost class its spec states, which an entry gate that refuses expensive operations also reads. The value rules of the operator, group and metric specs are decided here, once, so admission and the descriptor cannot disagree about them.
What one source declares about one logical value, in the capability descriptor's vocabulary; each fact may be left Unset for a source of lower priority to state. A source of higher priority cannot drop a sensitivity a lower one declares: replacing a protected structure keeps its masks, or fails.
One field or nested value: its shape (kind, types, nullability, structure) and semantics (enum, time, text).
One resolved field of a QueryModelSchema with its capability facts. Facts that depend only on the field and its schema are computed once per instance; static fields are resolved once per schema.
How query results mask a sensitive value, as the Manifest's x-wow-mask states it (@Sensitive.mask): the built-in mask that keeps Keep.prefix leading and Keep.suffix trailing code points, or a custom Strategy named by its binary class name.
A read model a query runs against: SNAPSHOT, a DATASET (QueryDataset), or a custom model. The events model of an aggregate's log is not a record set a backend filters freely, so it is not one of these.
How the Catalog compiles one aggregate model: from its context and its storage's facts to a schema provider.
Record layout and invariants of one QueryModel: the built-in Snapshot, and each declared dataset (DatasetQueryModelProfile). The hierarchy is closed to this module: its constructor is internal.
Published facts only: model values and operation-specific native locations.
The current schema of one aggregate model, compiled once and recompiled on refresh.
One part of a QueryPathTemplate: a named Property, a dynamic Key whose name the core captures from the logical path (a map's key, numbered by its Key.slot), or an array's Item.
A logical or physical path of a model as segments (QueryPathSegment): state.lines[].sku is Property(state), Property(lines), Item, Property(sku). A storage adapter reports its bindings by the logical template (LogicalQuerySchema.values) and gives each binding's physical template (of).
The Catalog: compiles the query schema of every aggregate model this instance serves, one provider per aggregate type and model, with its compiler (by default the model sources merged, see QueryModelCompiler.of). Each storage only reports its native facts, through the storage adapter storages locates. Gateways and point reads read their schema here.
The read model of one aggregate type a schema is compiled for.
What one source declares about a model's fields, by logical field.
Declares a model's fields in code, in the vocabulary of the capability descriptor: the programmatic source of declarations (BeanQuerySchemaSource) beside the Manifest's (ManifestQuerySchemaSource), and how tests describe a model.
A failure of a query schema: of a query against it, or of the schema itself.
Sees each revalidation of one schema (QuerySchemaCatalog.revalidate): where a host records its metrics.
A declaration of context's model, as querySchemaRegistration builds it.
Where a model's field declarations come from: the Manifest's state schema ($defs plus x-wow-*, ManifestQuerySchemaSource), declarations registered in code (BeanQuerySchemaSource), or any other source a host adds. The Catalog merges the declarations of every source by priority, a higher one stating a fact over a lower one.
A model whose schema cannot be loaded, such as one without a query backend: QueryErrors.FAILED.
A query that does not fit its model or the model's storage: QueryErrors.INVALID with the violation it breaks. Without a violation it is a schema that does not validate, a server fault (QueryErrors.FAILED).
What a field's value means beyond its type; a field has at most one. A type this version does not know reads as Unknown, so a client on an older version can still read a newer server's descriptor. The wire names (the descriptor's type) are TEMPORAL_DATE, TEMPORAL_EPOCH, TEMPORAL_FORMATTED, DECIMAL, MONEY, DURATION and REFERENCE, as QueryJson writes them.
Whether a filter or sort may compare a protected value. displayComparable lets queries compare SensitivityLevel.DISPLAY values (the 9.x default); SensitivityLevel.CONFIDENTIAL values never compare.
A storage's port into the Catalog: it reports what its native structures (indexes, mappings, validators) prove about a logical model, and nothing else. The Catalog merges the model's sources and compiles the reported facts into the model's schema, applying every rule that does not depend on the storage.
What a storage proves about one read model, in the storage-neutral vocabulary of capabilities: for each logical path, the capabilities its native structures can execute and the physical location each binds to, with the projection and response locations; and the storage's model-wide support. Which native types, index kinds or mapping options prove a capability is the storage's knowledge; what a logical value must be for a capability to apply at all is the Catalog's. An adapter builds them with build (or builder from Java).
A storage-neutral family of native types a logical value may be stored as. A storage adapter maps each family to its own native types (BSON types, Elasticsearch field kinds); which families a logical value needs for a capability is the Catalog's decision (storageFamilies).
Where a storage still departs from the strict table of storageFamilies. Each rule is a known divergence between storages, kept so that every adapter reproduces today's capabilities exactly; the defaults are the strict table (STRICT), and of gives another.
Where the QuerySchemaCatalog finds the storage of an aggregate model: the QueryStorageAdapter of the query backend that serves it, or null when no backend does. The Catalog needs a storage's facts only, never its backend.
A storage's own name for a native type, such as a PostgreSQL jsonb cast or a MongoDB BSON type (of): a letter or _, then letters, digits, _ and -.
What a storage serves at one logical path, as its adapter reports it (of): the bindings, the location each capability it can execute reads, and where a projection takes the value from (projectionPath) and a response returns it (responsePath), null where the storage cannot project or return it.
One immutable logical value shape, shared by backend schema snapshots: its kind, the scalar valueTypes, an object's properties and additionalProperties, an array's items, a union's alternatives, and what the sources declare about it (semanticType, maskRule, aliases, deprecated). The core builds it from the model's sources; a storage adapter reads it, through LogicalQuerySchema, to report what its storage serves. Collection inputs are snapshotted; mutable enum JSON is detached on read.
The error catalog: every rule a query can break, as structured facts. Each violation names its stable code, renders its message from its facts, and belongs to a Kind that decides the error it becomes (rejection): the one place a rejection is rendered. Codes are a contract (added, never renamed); texts are not.
What a storage declares beyond each field's native capabilities, bound into the schema by its adapter (QueryStorageFacts.Builder.storage); a storage declares it with of, or takes NATIVE.
How a storage supports a query feature: natively, through the core after the storage, or not at all.
Functions
Flattens nested unions into their non-union alternatives; any other value is its own single alternative.
The fields a query on this model can name as written: the system fields and the declarations of sources, merged into the logical model as DefaultQueryModelSchemaProvider merges them, before any storage facts. Fields under a map, whose keys are the caller's, are left out.
Whether this value may be an array holding a null element: an array whose items the schema lets be null.
The values an operation on this value compares: the value itself, an array's items (one member layer, without flattening the definition) and a union's alternatives, each a non-union value. A storage adapter asks each one which storage families a capability needs (storageFamilies).
The declaration block builds.
The native type families this scalar value needs for capability: one set per declared alternative, and storage proves the capability when its native types cover every set and fall in some set. An empty list, or a list with an empty set, means no storage can prove the capability for this value.