Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EImportsHead = map[string]string{
"stirng": `"string"`,
"time.Time": `"time"`,
"gorm.Model": `"gorm.io/gorm"`,
"fmt": `"fmt"`,
}
EImportsHead imports head options. import包含选项
View Source
var TypeMysqlDicMp = map[string]string{
"smallint": "int16",
"smallint unsigned": "uint16",
"int": "int",
"int unsigned": "uint",
"bigint": "int64",
"bigint unsigned": "uint64",
"varchar": "string",
"char": "string",
"date": "time.Time",
"datetime": "time.Time",
"bit(1)": "int8",
"tinyint": "int8",
"tinyint unsigned": "uint8",
"tinyint(1)": "int8",
"tinyint(1) unsigned": "int8",
"json": "string",
"text": "string",
"timestamp": "time.Time",
"double": "float64",
"mediumtext": "string",
"longtext": "string",
"float": "float32",
"tinytext": "string",
"enum": "string",
}
TypeMysqlDicMp Accurate matching type.精确匹配类型
View Source
var TypeMysqlMatchMp = map[string]string{
`^(int)`: "int64",
`^(tinyint)[(]\d+[)]`: "int8",
`^(smallint)[(]\d+[)]`: "int16",
`^(int)[(]\d+[)]`: "int",
`^(bigint)[(]\d+[)]`: "int64",
`^(char)[(]\d+[)]`: "string",
`^(enum)[(](.)+[)]`: "string",
`^(varchar)[(]\d+[)]`: "string",
`^(varbinary)[(]\d+[)]`: "[]byte",
`^(decimal)[(]\d+,\d+[)]`: "float64",
`^(mediumint)[(]\d+[)]`: "string",
`^(double)[(]\d+,\d+[)]`: "float64",
`^(float)[(]\d+,\d+[)]`: "float64",
`^(datetime)[(]\d+[)]`: "time.Time",
`^(timestamp)`: "time.Time",
`^(text)`: "string",
`^(date )`: "time.Time",
}
TypeMysqlMatchMp Fuzzy Matching Types.模糊匹配类型
Functions ¶
func GetTypeName ¶
getTypeName Type acquisition filtering.类型获取过滤
Types ¶
type Field ¶ added in v2.0.5
type Field struct { Field string `gorm:"column:Field"` Type string `gorm:"column:Type"` Null string `gorm:"column:Null"` Key string `gorm:"column:Key"` Default string `gorm:"column:Default"` Extra string `gorm:"column:Extra"` Privileges string `gorm:"column:Privileges"` Comment string `gorm:"column:Comment"` }
Click to show internal directories.
Click to hide internal directories.