Documentation ¶
Index ¶
Constants ¶
View Source
const ( TYPE_NUMBER = iota + 1 // tinyint, smallint, mediumint, int, bigint, year TYPE_FLOAT // float, double TYPE_ENUM // enum TYPE_SET // set TYPE_STRING // other TYPE_DATETIME // datetime TYPE_TIMESTAMP // timestamp TYPE_DATE // date TYPE_TIME // time TYPE_BIT // bit TYPE_JSON // json )
Variables ¶
View Source
var ErrMissingTableMeta = errors.New("missing table meta")
View Source
var ErrTableNotExist = errors.New("table is not exist")
View Source
var HAHealthCheckSchema = "mysql.ha_health_check"
Functions ¶
Types ¶
type Index ¶
func (*Index) FindColumn ¶
type Table ¶
type Table struct { Schema string Name string Columns []TableColumn Indexes []*Index PKColumns []int }
func NewTableFromSqlDB ¶
func (*Table) FindColumn ¶
func (*Table) GetPKColumn ¶
func (ta *Table) GetPKColumn(index int) *TableColumn
Click to show internal directories.
Click to hide internal directories.