Merge pull request #83 from quhaowk/gormt-t

增加"double unsigned"类型
This commit is contained in:
xxj
2020-11-18 12:12:28 +08:00
committed by GitHub

View File

@@ -29,6 +29,7 @@ var TypeMysqlDicMp = map[string]string{
"text": "string", "text": "string",
"timestamp": "time.Time", "timestamp": "time.Time",
"double": "float64", "double": "float64",
"double unsigned": "float64",
"mediumtext": "string", "mediumtext": "string",
"longtext": "string", "longtext": "string",
"float": "float32", "float": "float32",
@@ -45,27 +46,28 @@ var TypeMysqlDicMp = map[string]string{
// TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型 // TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
var TypeMysqlMatchMp = map[string]string{ var TypeMysqlMatchMp = map[string]string{
`^(tinyint)[(]\d+[)] unsigned`: "uint8", `^(tinyint)[(]\d+[)] unsigned`: "uint8",
`^(smallint)[(]\d+[)] unsigned`: "uint16", `^(smallint)[(]\d+[)] unsigned`: "uint16",
`^(int)[(]\d+[)] unsigned`: "uint32", `^(int)[(]\d+[)] unsigned`: "uint32",
`^(bigint)[(]\d+[)] unsigned`: "uint64", `^(bigint)[(]\d+[)] unsigned`: "uint64",
`^(tinyint)[(]\d+[)]`: "int8", `^(tinyint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int16", `^(smallint)[(]\d+[)]`: "int16",
`^(int)[(]\d+[)]`: "int", `^(int)[(]\d+[)]`: "int",
`^(bigint)[(]\d+[)]`: "int64", `^(bigint)[(]\d+[)]`: "int64",
`^(char)[(]\d+[)]`: "string", `^(char)[(]\d+[)]`: "string",
`^(enum)[(](.)+[)]`: "string", `^(enum)[(](.)+[)]`: "string",
`^(varchar)[(]\d+[)]`: "string", `^(varchar)[(]\d+[)]`: "string",
`^(varbinary)[(]\d+[)]`: "[]byte", `^(varbinary)[(]\d+[)]`: "[]byte",
`^(blob)[(]\d+[)]`: "[]byte", `^(blob)[(]\d+[)]`: "[]byte",
`^(binary)[(]\d+[)]`: "[]byte", `^(binary)[(]\d+[)]`: "[]byte",
`^(decimal)[(]\d+,\d+[)]`: "float64", `^(decimal)[(]\d+,\d+[)]`: "float64",
`^(mediumint)[(]\d+[)]`: "string", `^(mediumint)[(]\d+[)]`: "string",
`^(double)[(]\d+,\d+[)]`: "float64", `^(double)[(]\d+,\d+[)]`: "float64",
`^(float)[(]\d+,\d+[)]`: "float64", `^(double)[(]\d+,\d+[)] unsigned`: "float64",
`^(float)[(]\d+,\d+[)] unsigned`: "float64", `^(float)[(]\d+,\d+[)]`: "float64",
`^(datetime)[(]\d+[)]`: "time.Time", `^(float)[(]\d+,\d+[)] unsigned`: "float64",
`^(bit)[(]\d+[)]`: "[]uint8", `^(datetime)[(]\d+[)]`: "time.Time",
`^(text)[(]\d+[)]`: "string", `^(bit)[(]\d+[)]`: "[]uint8",
`^(integer)[(]\d+[)]`: "int", `^(text)[(]\d+[)]`: "string",
`^(integer)[(]\d+[)]`: "int",
} }