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 Kind | Produces |
|---|---|
CREATE CONNECTION | Infrastructure::Connection |
CREATE SOURCE | Infrastructure::Source |
CREATE TABLE .. FROM | Infrastructure::TableFromSource |
| Everything else | None |
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
Propertyentries.
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
CreateConnectionTypeas 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.