Documentation
¶
Overview ¶
Package sqlcconfig parses sqlc configuration files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnTarget ¶
type ColumnTarget struct {
Schema string
Table string
Name string
// contains filtered or unexported fields
}
ColumnTarget identifies a table column referenced by a sqlc override.
func (ColumnTarget) IsZero ¶
func (c ColumnTarget) IsZero() bool
IsZero reports whether the column target is unset.
func (*ColumnTarget) UnmarshalYAML ¶
func (c *ColumnTarget) UnmarshalYAML(value *yaml.Node) error
UnmarshalYAML supports both string and mapping forms for column targets.
type Config ¶
type Config struct {
Version string `yaml:"version"`
SQL []SQLBlock `yaml:"sql"`
Overrides []Override `yaml:"overrides"`
// contains filtered or unexported fields
}
Config represents the subset of sqlc configuration required for override migration.
func (Config) ColumnType ¶
ColumnType returns the SQLite type for the referenced column if known.
func (Config) SchemaWarnings ¶
SchemaWarnings returns a copy of schema parsing warnings encountered during load.
type GoType ¶
type GoType struct {
Import string `yaml:"import"`
Package string `yaml:"package"`
Type string `yaml:"type"`
Pointer bool `yaml:"pointer"`
// contains filtered or unexported fields
}
GoType captures sqlc go_type override definitions.
func (GoType) Normalize ¶
func (g GoType) Normalize() (GoTypeInfo, error)
Normalize returns the normalized Go type information for this override.
type GoTypeInfo ¶
GoTypeInfo represents a normalized Go type description.
type Override ¶
type Override struct {
DBType string `yaml:"db_type"`
Column ColumnTarget `yaml:"column"`
GoType GoType `yaml:"go_type"`
}
Override mirrors sqlc override entries for db_type or column overrides.