Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIStr ¶
type CIStr struct { O string `json:"O"` // Original string. L string `json:"L"` // Lower case string. }
CIStr is case insensitive string.
type ColumnInfo ¶
type ColumnInfo struct { Name CIStr `json:"name"` Offset int `json:"offset"` DefaultValue interface{} `json:"default"` types.FieldType `json:"type"` Comment string `json:"comment"` }
ColumnInfo provides meta data describing of a table column.
type DBInfo ¶
type DBInfo struct { Name CIStr `json:"db_name"` // DB name. Tables []*TableInfo `json:"-"` // Tables in the DB. }
DBInfo provides meta data describing a DB.
type IndexColumn ¶
type IndexColumn struct {
Name CIStr `json:"name"` // Index name
}
IndexColumn provides index column info.
type IndexInfo ¶
type IndexInfo struct { Name CIStr `json:"idx_name"` // Index name. Table CIStr `json:"tbl_name"` // Table name. Columns []*IndexColumn `json:"idx_cols"` // Index columns. Unique bool `json:"is_unique"` // Whether the index is unique. Primary bool `json:"is_primary"` // Whether the index is primary key. Comment string `json:"comment"` // Comment Tp IndexType `json:"index_type"` // Index type: Btree or Hash }
IndexInfo provides meta data describing a DB index. It corresponds to the statement `CREATE INDEX Name ON Table (Column);` See https://dev.mysql.com/doc/refman/5.7/en/create-index.html
Click to show internal directories.
Click to hide internal directories.