Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnInfo ¶
type ColumnInfo struct { Index int Name string Type string IsPrimary bool Nullable bool Default string HasDefault bool Unsigned bool AutoIncrement bool }
ColumnInfo hold column base info
func FindColumnByName ¶
func FindColumnByName(cols []*ColumnInfo, cname string) *ColumnInfo
FindColumnByName returns the column matches column name
type ColumnWithValue ¶
type ColumnWithValue struct { Column *ColumnInfo Value interface{} }
ColumnWithValue holds column value
func FillColumnsWithValue ¶
func FillColumnsWithValue(ti *TableInfo, values []interface{}) []*ColumnWithValue
FillColumnsWithValue fills columns value with binlog value final columns count is determined by binlog columns, so make sure binlog columns count is not greater than table info columns (panic)
func (*ColumnWithValue) ValueToString ¶
func (c *ColumnWithValue) ValueToString() string
ValueToString converts value to string type
type TableInfo ¶
type TableInfo struct { Schema string Name string Columns []*ColumnInfo IndexColumns []*ColumnInfo // Check table info changed BinlogColumns int }
TableInfo hold column info
func GetTableInfo ¶
GetTableInfo get table info from database
func (*TableInfo) GetTableColumnInfo ¶
GetTableColumnInfo get columns info from database
Click to show internal directories.
Click to hide internal directories.