代码拉取完成,页面将自动刷新
package model
import (
"strings"
"gitee.com/tomatomeatman/golang-repository/bricks/utils/function/data"
)
/**
* 数据库信息
* @author HuangXinBian
*/
type DBInfo struct {
Gsequence string `json:"sequence"` //序列(每次查询都重建)
GsName string `json:"sName"` //库名
GsDbCodeName string `json:"sDbCodeName"` //数据库在代码中的应用名(去除标识如'dev_'等库前缀)
GsSimplName string `json:"sSimplName"` //简化库名 (去除标识如'dev_'、'Bricks'等库前缀)
GsPath string `json:"sPath"` //路径
GsType string `json:"sType"` //数据库类型
GtableInfoList []TableInfo `json:"tableInfoList"` //表集合
}
/**
* 初始化对象
*/
func (this *DBInfo) SetDefault() {
this.Gsequence = data.UUIDUtil{}.Get()
this.GtableInfoList = nil
}
/**
* 设置 库名
* @return sSimplName 简化库名
*/
func (this *DBInfo) SetsName(sName string) {
sName = strings.TrimSpace(sName)
this.GsName = sName
temp := sName
iSt := strings.Index(strings.ToUpper(sName), "DEV_")
if iSt == 0 {
temp = string([]byte(sName)[len("DEV_"):])
this.GsDbCodeName = temp //数据库在代码中的应用名(去除标识如'dev_'等库前缀)
}
if strings.Index(strings.ToUpper(temp), "BRICKS") == 0 {
temp = string([]byte(temp)[len("BRICKS"):])
} else if strings.Index(strings.ToUpper(temp), "PUZZLES") == 0 {
temp = string([]byte(temp)[len("PUZZLES"):])
}
this.GsSimplName = temp //数据库在代码中的应用名(去除标识如'dev_'、'Bricks'等库前缀)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。