Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalData ¶ added in v0.4.0
type AdditionalData struct {
Relations []AdditionalRelation `yaml:"relations"`
}
AdditionalData is the struct for table relations from yaml
type AdditionalRelation ¶ added in v0.4.0
type AdditionalRelation struct { Table string `yaml:"table"` Columns []string `yaml:"columns"` ParentTable string `yaml:"parentTable"` ParentColumns []string `yaml:"parentColumns"` Def string `yaml:"def"` }
AdditionalRelation is the struct for table relation from yaml
type Column ¶
type Column struct { Name string Type string Nullable bool Default sql.NullString Comment string ParentRelations []*Relation ChildRelations []*Relation }
Column is the struct for table column
type Constraint ¶ added in v0.2.2
Constraint is the struct for database constraint
type Relation ¶
type Relation struct { Table *Table Columns []*Column ParentTable *Table ParentColumns []*Column Def string IsAdditional bool }
Relation is the struct for table relation
type Schema ¶
Schema is the struct for database schema
func (*Schema) FindTableByName ¶
FindTableByName find table by table name
func (*Schema) LoadAdditionalRelations ¶ added in v0.4.0
LoadAdditionalRelations load additional relations from yaml file
Click to show internal directories.
Click to hide internal directories.