column

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 26 Imported by: 2 modules, 4 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

Overview

Package column refines canonical view columns during explicit transcription. It delegates database metadata detection to SQLX and query rewriting to SQLParser; it owns no runtime scanner, cache, connector registry, or row map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyWriterMetadata

func ApplyWriterMetadata(component *spec.Component) error

ApplyWriterMetadata promotes explicitly authored SQLX field metadata into the canonical facts required by mutation planning. It is intentionally called only by writer generation; readers neither require nor infer identity from author tags.

func ValidateProjectionAnnotations

func ValidateProjectionAnnotations(view *spec.View, projected []string) error

ValidateProjectionAnnotations checks SQL view annotations against authoritative output names, supplied by the SQL projection or by SQLX column discovery.

Types

type Connections

type Connections map[string]*sql.DB

Connections is a static connector set suitable for command composition and tests. Production composition may supply its own DBResolver.

func (Connections) ResolveDB

func (c Connections) ResolveDB(_ context.Context, name string) (*sql.DB, error)

type DBResolver

type DBResolver interface {
	ResolveDB(context.Context, string) (*sql.DB, error)
}

DBResolver resolves one configured connector for compile-time discovery.

type Refiner

type Refiner struct {
	// contains filtered or unexported fields
}

Refiner enriches canonical views with SQLX-discovered scalar columns.

func New

func New(resolver DBResolver) *Refiner

func (*Refiner) Refine

func (r *Refiner) Refine(ctx context.Context, component *spec.Component, resources fs.FS, input *TemplateInput) error

func (*Refiner) RefineRoot

func (r *Refiner) RefineRoot(ctx context.Context, component *spec.Component, resources fs.FS, input *TemplateInput) error

RefineRoot discovers the root relation tree before generated input contracts are rebuilt for parameterized independent views.

func (*Refiner) RefineViews

func (r *Refiner) RefineViews(ctx context.Context, component *spec.Component, resources fs.FS, input *TemplateInput) error

RefineViews discovers independent view trees against the rebuilt typed input.

func (*Refiner) ValidateSourceProjections

func (r *Refiner) ValidateSourceProjections(component *spec.Component, resources fs.FS) error

ValidateSourceProjections is the no-database validation path. An unresolved wildcard needs discovery; authored annotations are not evidence of outputs.

type TemplateInput

type TemplateInput struct {
	Const             *constant.Values
	Value             reflect.Value
	Variables         []sqltemplate.Variable
	ParameterResolver sqlx.ParameterResolver
	Predicate         exec.PredicateEvaluator
}

TemplateInput is the compile-time contract used to evaluate parameterized SQL before SQLX column discovery. It contains no request or runtime session.

Jump to

Keyboard shortcuts

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