add: now, you can set tablePrefix

This commit is contained in:
young
2021-01-07 22:35:25 +08:00
parent 39f7512c11
commit 0c3732eb0f
8 changed files with 32 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ type Config struct {
IsGUI bool `yaml:"is_gui"` //
IsTableName bool `yaml:"is_table_name"`
IsNullToPoint bool `yaml:"is_null_to_point"` // null to porint
TablePrefix string `yaml:"table_prefix"` // 表前缀
}
// DBInfo mysql database information. mysql 数据库信息
@@ -205,3 +206,13 @@ func SetIsNullToPoint(b bool) {
func GetIsNullToPoint() bool {
return _map.IsNullToPoint
}
// SetTablePrefix set table prefix
func SetTablePrefix(t string) {
_map.TablePrefix = t
}
// GetTablePrefix get table prefix
func GetTablePrefix() string {
return _map.TablePrefix
}

View File

@@ -43,6 +43,7 @@ var _map = Config{
IsOutSQL: false,
IsOutFunc: true,
IsGUI: false,
TablePrefix: "",
}
var configPath string