Versions in this module Expand all Collapse all v0 v0.1.0 Oct 5, 2026 Changes in this version + func ApplyConstraintToColumns(table *Table, c Constraint) + func ApplyTableConstraints(table *Table) + func CheckTableDropRefs(tables []Table, schema, name string) error + func CheckTypeDropRefs(tables []Table, schema, name string) error + func DetectRelationships(schema *Schema) + func DetectSoftDelete(table *Table, columns []string) (column string, strategy string, err error) + func DetectUpdateColumns(table *Table, names []string) []string + func DiscoverFiles(paths []string) ([]string, error) + func IsAggregateFunction(funcName string) bool + func MoveTableReferences(tables []Table, name, oldSchema, newSchema string) + func ParseFiles(p Parser, files []string) error + func RecomputeColumnUnique(table *Table, colName string) + func RenameColumn(table *Table, oldName, newName string) error + func RenameColumnReferences(tables []Table, schema, table, oldName, newName string) + func RenameTableReferences(tables []Table, schema, oldName, newName string) + func UnresolvedForeignKeys(tables []Table) []error + type Attribute struct + Name string + Type string + type Column struct + Aggregate string + AutoIncrement bool + Comment string + Default string + FKReference *FKReference + GeneratedExpr string + GeneratedStorage string + GoTypeImport string + GoTypeLiteral string + InlineUnique bool + Name string + Nullable bool + PrimaryKey bool + Type string + Unique bool + func ColumnByName(table *Table, name string) *Column + type CompositeType struct + Attributes []Attribute + Comment string + Name string + Schema string + type Constraint struct + CheckExpression string + Columns []string + Method string + Name string + ReferenceColumns []string + ReferenceSchema string + ReferenceTable string + Type ConstraintType + Where string + type ConstraintType int + const Check + const ForeignKey + const Index + const PrimaryKey + const Unique + func (ct ConstraintType) String() string + type DomainType struct + BaseType string + Comment string + Constraints []Constraint + Name string + Schema string + type Enum struct + Comment string + Name string + Schema string + Values []string + type FKReference struct + Column string + Schema string + Synthetic bool + Table string + type Parser interface + Parse func(filename string, sql []byte) error + Schema func() *Schema + type Relationship struct + BaseName string + FKColumn string + Filter string + JunctionLocalFK string + JunctionReferenceFK string + JunctionTable string + Name string + Side RelationshipSide + Sort []RelationshipSort + SourceTable string + TargetTable string + Type RelationshipType + type RelationshipSide int + const SideChild + const SideParent + const SideUnspecified + func (s RelationshipSide) String() string + type RelationshipSort struct + Column string + Direction string + type RelationshipType int + const ManyToMany + const OneToMany + const OneToOne + func (rt RelationshipType) String() string + type Schema struct + CompositeTypes []CompositeType + DomainTypes []DomainType + Enums []Enum + Relationships []Relationship + Sets []Set + Tables []Table + Views []View + Warnings []string + func (s *Schema) Sort() + type Set struct + Comment string + Name string + Schema string + Values []string + type Table struct + Columns []Column + Comment string + Constraints []Constraint + Name string + Schema string + Strict bool + WithoutRowID bool + type View struct + Columns []Column + ConcurrentlyRefreshable bool + Materialized bool + Name string + SQL string + Schema string + func BuildView(parsed ViewSQL, rawSQL string, annotations *ViewAnnotations, tables []Table) (*View, error) + func MergeViewAnnotations(introspected []View, annotated []View, ...) []View + type ViewAnnotations struct + NullableColumns []string + PKColumns []string + TypeOverrides map[string]ViewTypeAnnotation + func ParseViewAnnotations(content string) (*ViewAnnotations, error) + type ViewSQL struct + Columns []ViewSelectColumn + Materialized bool + Name string + Schema string + TableAliases map[string]string + type ViewSelectColumn struct + Aggregate string + Alias string + SourceColumn string + SourceTable string + type ViewTypeAnnotation struct + GoType string + ImportPath string