Documentation
¶
Overview ¶
Package vet is the go/analysis analyzer: it finds sqlshape.Query[R, P](literal) calls, expands each template, checks every expansion against schema.sql and matches result columns / parameters against R / P.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Analyzer = &analysis.Analyzer{ Name: "sqlshape", Doc: "checks every expansion of sqlshape.Query templates against schema.sql and the Go result / parameter types", Run: run, Requires: []*analysis.Analyzer{inspect.Analyzer}, ResultType: reflect.TypeOf((*consumers.Index)(nil)), }
Analyzer is the sqlshape checker.
Functions ¶
This section is empty.
Types ¶
type BindingFact ¶
type BindingFact struct {
Kind byte // 'e' enum, 'v' CHECK IN value set, 'l' lookup table rows, 'd' domain, 'k' key identity
Key string
Labels []string // enum labels, for downstream conversion / switch checks
}
BindingFact records what a Go type was bound to in the package that declares it or uses it.
func (*BindingFact) AFact ¶
func (*BindingFact) AFact()
func (*BindingFact) String ¶
func (f *BindingFact) String() string
type ConstSetFact ¶
type ConstSetFact struct{ Values []string }
ConstSetFact records the string constants declared for a named string type.
func (*ConstSetFact) AFact ¶
func (*ConstSetFact) AFact()
func (*ConstSetFact) String ¶
func (f *ConstSetFact) String() string
type TypeBindingFact ¶
type TypeBindingFact struct{ PG string }
TypeBindingFact records the PG type a Go type declares it carries.
func (*TypeBindingFact) AFact ¶
func (*TypeBindingFact) AFact()
func (*TypeBindingFact) String ¶
func (f *TypeBindingFact) String() string