add 'DEFAULT NULL' to point

添加默认值为null 转换成指针类型
This commit is contained in:
谢小军
2020-06-23 12:10:08 +08:00
parent 19b39a0b41
commit 0706dd0747
9 changed files with 39 additions and 27 deletions

View File

@@ -23,7 +23,7 @@ type Config struct {
IsOutFunc bool `yaml:"is_out_func"`
IsGUI bool `yaml:"is_gui"` //
IsTableName bool `yaml:"is_table_name"`
OutFileName string `yaml:"-"`
IsNullToPoint bool `yaml:"is_null_to_point"` // null to porint
}
// MysqlDbInfo mysql database information. mysql 数据库信息
@@ -150,14 +150,6 @@ func SetIsTableName(b bool) {
_map.IsTableName = b
}
func SetOutFileName(f string) {
_map.OutFileName = f
}
func GetOutFileName() string {
return _map.OutFileName
}
// GetURLTag get url tag.
func GetURLTag() string {
if _map.URLTag != "json" && _map.URLTag != "url" {
@@ -203,3 +195,13 @@ func GetDBTag() string {
func SetDBTag(s string) {
_map.DbTag = s
}
// SetIsNullToPoint if with null to porint in struct
func SetIsNullToPoint(b bool) {
_map.IsNullToPoint = b
}
// GetIsNullToPoint get if with null to porint in sturct
func GetIsNullToPoint() bool {
return _map.IsNullToPoint
}