column

package
v0.39.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func New

func New() *Detector

func (*Detector) Resolve

func (d *Detector) Resolve(ctx context.Context, resource *view.Resource, aView *view.View) (view.Columns, error)

type PreparedColumn added in v0.39.2

type PreparedColumn struct {
	Name     string
	Type     reflect.Type
	Nullable bool
	Tag      string
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL