master
xxjwxc 2 years ago
commit f47811a170

@ -32,6 +32,7 @@ db_info:
self_type_define: # 自定义数据类型映射
datetime: time.Time
time: time.Time
^(int)[(]\d+[)]: int
out_file_name: "" # 自定义生成文件名
web_tag_type: 0 # json tag类型 0: 小驼峰 1: 下划线

@ -73,6 +73,13 @@ func getTypeName(name string, isNull bool) string {
return fixNullToPorint(v, isNull)
}
// Fuzzy Regular Matching.模糊正则匹配自定义类型
for selfKey, selfVal := range selfDefineTypeMqlDicMap {
if ok, _ := regexp.MatchString(selfKey, name); ok {
return fixNullToPorint(selfVal, isNull)
}
}
// Precise matching first.先精确匹配
if v, ok := cnf.TypeMysqlDicMp[name]; ok {
return fixNullToPorint(v, isNull)

Loading…
Cancel
Save