Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MaterializePrepared ¶ added in v0.39.2
func MaterializePrepared(columns []PreparedColumn) view.Columns
MaterializePrepared creates fresh runtime columns from validated metadata.
Types ¶
type Detector ¶
type Detector struct{}
Detector resolves columns for shape-generated views.
Rules:
- schema field order is canonical order
- wildcard SQL always performs DB discovery
- newly discovered columns are appended at the end
- matched columns keep schema order but refresh metadata from DB
type PreparedColumn ¶ added in v0.39.2
PreparedColumn is a result column from an authoritative offline schema/model. Name is the vendor result name (including SQL aliases), not a Go field name. Type must be concrete; SQL annotations alone are not an authoritative schema. Value fields and immutable reflect.Type make metadata safe to copy.
func ResolvePrepared ¶ added in v0.39.2
func ResolvePrepared(ctx context.Context, request PreparedRequest, resolve PreparedResolver) ([]PreparedColumn, error)
ResolvePrepared checks the trusted provider's result without opening a DB or falling back to discovery. Neither the request nor the result can mutate SQL.
type PreparedRequest ¶ added in v0.39.2
type PreparedRequest struct {
Component string
View string
Connector string
SQL string
ExecutableSQL string
}
PreparedRequest identifies the exact result being compiled. SQL has local embedded sources and constants expanded; ExecutableSQL is the unchanged source. The provider is trusted Go integration code, never a runtime request field.
type PreparedResolver ¶ added in v0.39.2
type PreparedResolver func(context.Context, PreparedRequest) (*PreparedResult, error)
type PreparedResult ¶ added in v0.39.2
type PreparedResult struct {
Columns []PreparedColumn
Table string
}
PreparedResult must describe the complete, ordered result projection. Table is optional and accepted only when SQL proves that direct physical source.