This commit is contained in:
谢小军
2020-09-24 17:40:32 +08:00
parent aacd550f5a
commit a70ab3ff83
2 changed files with 12 additions and 6 deletions

View File

@@ -22,3 +22,11 @@ db_info:
database : oauth_db database : oauth_db
type: 0 # 数据库类型:0:mysql , 1:sqlite , 2:mssql type: 0 # 数据库类型:0:mysql , 1:sqlite , 2:mssql
# sqlite
# db_info:
# host : /Users/xxj/Downloads/caoguo # type=1的时候host为yml文件全路径
# port :
# username :
# password :
# database :
# type: 1 # 数据库类型:0:mysql , 1:sqlite , 2:mssql

View File

@@ -43,18 +43,16 @@ var TypeMysqlDicMp = map[string]string{
"integer": "int64", "integer": "int64",
} }
// TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
// 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",