Documentation ¶
Index ¶
- func GetThatCardinality(that string) string
- func GetThisCardinality(this string) string
- func WritePuml(w io.Writer, cons *Construction, conf *config.Config) error
- type Column
- type Construction
- func (c *Construction) ApplyExInfo(exInfo config.ExtraConfig)
- func (c Construction) GetGroupToTablesMap() map[string][]string
- func (c *Construction) GetTableMut(tblName string) *Table
- func (c Construction) GetTableToGroupMap() map[string]string
- func (c *Construction) UpdateExRelationsFromForeignKeys()
- type ExRelation
- type ExRelationColumn
- type ForeginKey
- type Index
- type Table
- func (t *Table) AddColumn(name, columnType, key, extra, def string, notnull, isPrimary bool)
- func (t *Table) AddExRelations(referencedTableName string, columns []ExRelationColumn, ...)
- func (t *Table) AddForeginKey(constraintName, columnName, referencedTableName, ReferencedColumnName string)
- func (t *Table) AddIndex(indexName, columnName string)
- func (t *Table) GetExRelationOfReferencedTableMut(tableName string) *ExRelation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetThatCardinality ¶
func GetThisCardinality ¶
Types ¶
type Construction ¶
Construction 中間形式
func NewConstructionFromYaml ¶
func NewConstructionFromYaml(buf []byte) (*Construction, error)
func NewConstructionFromYamlFile ¶
func NewConstructionFromYamlFile(path string) (*Construction, error)
func (*Construction) ApplyExInfo ¶
func (c *Construction) ApplyExInfo(exInfo config.ExtraConfig)
ApplyExInfo は config.ExtraConfig を ExRelations に適用する
func (Construction) GetGroupToTablesMap ¶
func (c Construction) GetGroupToTablesMap() map[string][]string
GetGroupToTablesMap はグループからテーブルリストを得るためのマップを返す
func (*Construction) GetTableMut ¶
func (c *Construction) GetTableMut(tblName string) *Table
GetTableMut は指定したテーブル名のTableへのポインタを返す
func (Construction) GetTableToGroupMap ¶
func (c Construction) GetTableToGroupMap() map[string]string
GetTableToGroupMap はテーブルからグループを得るためのマップを返す
func (*Construction) UpdateExRelationsFromForeignKeys ¶
func (c *Construction) UpdateExRelationsFromForeignKeys()
UpdateExRelationsFromForeignKeys は ForeginKeys を元にして ExRelations を更新する
type ExRelation ¶
type ExRelation struct { ReferencedTableName string `yaml:"referenced_table_name"` Columns []ExRelationColumn `yaml:"columns"` ThisConn string `yaml:"this_conn"` ThatConn string `yaml:"that_conn"` }
type ExRelationColumn ¶
type ForeginKey ¶
type Table ¶
type Table struct { Name string `yaml:"table"` Group string `yaml:"group"` Columns []Column `yaml:"columns"` Indexes []Index `yaml:"indexes"` ForeginKeys []ForeginKey `yaml:"foreign_keys"` ExRelations []ExRelation `yaml:"ex-relations"` IsMaster bool `yaml:"is-master"` }
Table は中間形式中のテーブル型
func (*Table) AddExRelations ¶
func (t *Table) AddExRelations(referencedTableName string, columns []ExRelationColumn, thisConn, thatConn string)
func (*Table) AddForeginKey ¶
func (*Table) GetExRelationOfReferencedTableMut ¶
func (t *Table) GetExRelationOfReferencedTableMut(tableName string) *ExRelation
Click to show internal directories.
Click to hide internal directories.