fix bug for tinyint(8) unsigned

When I used this tool to generate files, I found that even if the table structure did not change, the generated files would change. After debugging. Finding the configuration here will cause the program to find two keys randomly. The original code might have tinyint (8) unsigned randomly match int8 or Unit8. Put the unsigned one to the front, and then test it. This problem will not happen again.
master
lubin 4 years ago committed by GitHub
parent aa434356e0
commit 75475dfa6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,10 +42,15 @@ var TypeMysqlDicMp = map[string]string{
"longblob": "[]byte",
}
// TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
// TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
var TypeMysqlMatchMp = map[string]string{
`^(tinyint)[(]\d+[)]`: "int8",
`^(tinyint)[(]\d+[)] unsigned`: "uint8",
`^(smallint)[(]\d+[)] unsigned`: "uint16",
`^(int)[(]\d+[)] unsigned`: "uint32",
`^(bigint)[(]\d+[)] unsigned`: "uint64",
`^(tinyint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int16",
`^(int)[(]\d+[)]`: "int",
`^(bigint)[(]\d+[)]`: "int64",

Loading…
Cancel
Save