Versions in this module Expand all Collapse all v1 v1.1.2 Oct 27, 2020 v1.1.1 Oct 27, 2020 Changes in this version + const TYPE_BINARY + const TYPE_BIT + const TYPE_DATE + const TYPE_DATETIME + const TYPE_DECIMAL + const TYPE_ENUM + const TYPE_FLOAT + const TYPE_JSON + const TYPE_MEDIUM_INT + const TYPE_NUMBER + const TYPE_POINT + const TYPE_SET + const TYPE_STRING + const TYPE_TIME + const TYPE_TIMESTAMP + var ErrMissingTableMeta = errors.New("missing table meta") + var ErrTableNotExist = errors.New("table is not exist") + var HAHealthCheckSchema = "mysql.ha_health_check" + func IsTableExist(conn mysql.Executer, schema string, name string) (bool, error) + type Index struct + Cardinality []uint64 + Columns []string + Name string + func NewIndex(name string) *Index + func (idx *Index) AddColumn(name string, cardinality uint64) + func (idx *Index) FindColumn(name string) int + type Table struct + Columns []TableColumn + Indexes []*Index + Name string + PKColumns []int + Schema string + UnsignedColumns []int + func NewTable(conn mysql.Executer, schema string, name string) (*Table, error) + func NewTableFromSqlDB(conn *sql.DB, schema string, name string) (*Table, error) + func (ta *Table) AddColumn(name string, columnType string, collation string, extra string) + func (ta *Table) AddIndex(name string) (index *Index) + func (ta *Table) FindColumn(name string) int + func (ta *Table) GetColumnValue(column string, row []interface{}) (interface{}, error) + func (ta *Table) GetPKColumn(index int) *TableColumn + func (ta *Table) GetPKValues(row []interface{}) ([]interface{}, error) + func (ta *Table) String() string + type TableColumn struct + Collation string + EnumValues []string + FixedSize uint + IsAuto bool + IsUnsigned bool + IsVirtual bool + MaxSize uint + Name string + RawType string + SetValues []string + Type int