Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdditionalComment ¶ added in v0.7.0
type AdditionalComment struct {
Table string `yaml:"table"`
TableComment string `yaml:"tableComment"`
ColumnComments map[string]string `yaml:"columnComments"`
}
AdditionalComment is the struct for table relation from yaml
type AdditionalData ¶ added in v0.4.0
type AdditionalData struct {
Relations []AdditionalRelation `yaml:"relations"`
Comments []AdditionalComment `yaml:"comments"`
}
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) AddAdditionalData ¶ added in v0.7.0
AddAdditionalData add additional data (relations, comments) from yaml buffer
func (*Schema) FindTableByName ¶
FindTableByName find table by table name
func (*Schema) LoadAdditionalData ¶ added in v0.7.0
LoadAdditionalData load additional data (relations, comments) from yaml file
Click to show internal directories.
Click to hide internal directories.