Documentation
¶
Index ¶
- Constants
- Variables
- func CorrectColumn(source interface{}, tp string) interface{}
- func ParseValueByType(vv interface{}, t DataType) (interface{}, error)
- func RepairData(mp map[string]interface{}, name2Type map[string]string) ([]interface{}, string, int, error)
- func TrimBoth(s, trim string) string
- func TrimEnd(s, trim string) string
- func TrimStart(s, trim string) string
- type DataType
- type MysqlDesc
- type MysqlTypeConverter
Constants ¶
View Source
const ( DataTypeString = iota DataTypeInt DataTypeFloat DataTypeTime DateTimeLayout = "2006-01-02 15:04:05" DateLayout = "2006-01-02" )
Variables ¶
Functions ¶
func CorrectColumn ¶
func CorrectColumn(source interface{}, tp string) interface{}
func ParseValueByType ¶
func RepairData ¶
Types ¶
type DataType ¶
type DataType int
func ParseTypeByMysqlType ¶
ParseTypeByMysqlType 将MySQL的数据类型转换为Go语言内部转换用的DataType
type MysqlTypeConverter ¶
type MysqlTypeConverter struct {
// contains filtered or unexported fields
}
func NewMysqlTypeConvModel ¶
func NewMysqlTypeConvModel(mysqlConn *sql.DB) *MysqlTypeConverter
func (*MysqlTypeConverter) ObtainMysqlTypeMap ¶
Click to show internal directories.
Click to hide internal directories.