Skip to main content

properties_view

Function properties_view 

Source
fn properties_view(infos: &[Info<'_>]) -> BuiltinView
Expand description

Build the mz_ontology_properties view: one row per column of every annotated builtin relation.

The generated SQL works in two halves:

  1. Column discovery — An inline VALUES list (ent) maps each entity to its (schema, table) pair. This is joined through mz_schemasmz_objectsmz_columns so the view always reflects the live catalog (column additions/removals are picked up automatically).

  2. Annotation enrichment — A second VALUES list (ann) carries the semantic-type annotations from Ontology::column_semantic_types. Column descriptions come from mz_comments. Both are LEFT JOINed so columns without annotations or comments still appear (with NULLs).