Skip to main content

Module infrastructure

Module infrastructure 

Source
Expand description

Infrastructure property extraction from AST statements.

Extracts structured metadata from connections, sources, and tables-from-source statements. Used by both the compiler (to persist to SQLite) and the LSP catalog (to build the explore page).

ยงExtraction Rules

Statement KindProduces
CREATE CONNECTIONInfrastructure::Connection
CREATE SOURCEInfrastructure::Source
CREATE TABLE .. FROMInfrastructure::TableFromSource
Everything elseNone

For connections, PublicKey1 and PublicKey2 options are filtered out (they are auto-generated SSH key material, not user-configurable).

Property values that reference secrets or objects carry the reference name in secret_ref / object_ref for downstream linking.

Macrosยง

options_to_properties ๐Ÿ”’
Convert a slice of source/connection options into Property entries.

Structsยง

Property ๐Ÿ”’
A key-value property extracted from an infrastructure objectโ€™s AST.

Enumsยง

Infrastructure ๐Ÿ”’
Extracted infrastructure metadata for an object.

Functionsยง

connection_type_name ๐Ÿ”’
Format a CreateConnectionType as a human-readable string.
extract ๐Ÿ”’
Extract infrastructure properties from a statement, if applicable.
extract_connection ๐Ÿ”’
Extract structured properties from a CREATE CONNECTION statement.
extract_source ๐Ÿ”’
Extract structured properties from a CREATE SOURCE statement.
extract_table_from_source ๐Ÿ”’
Extract structured properties from a CREATE TABLE FROM SOURCE statement.
format_option_value ๐Ÿ”’
Format a WithOptionValue<Raw> into a display string and optional ref IDs.
raw_item_name_to_string ๐Ÿ”’
Extract the unqualified string from a RawItemName.