Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Default 无,原名称copy abc => abc Default = StrategyType("Default") // FirstLetterUpper 仅首字母大写 abc => Abc FirstLetterUpper = StrategyType("FirstLetterUpper") // UnderlineToCamel 下划线转驼峰(首字母小写) a_b_c => aBC UnderlineToCamel = StrategyType("UnderlineToCamel") // UnderlineToUpper 下划线转大写 a_b_c => ABC UnderlineToUpper = StrategyType("UnderlineToUpper") )
View Source
var GoSqlNullTypes = map[string]string{
"bool": "sql.NullBool",
"byte": "sql.NullByte",
"int8": "sql.NullByte",
"int16": "sql.NullInt16",
"int": "sql.NullInt32",
"int64": "sql.NullInt64",
"float32": "sql.NullFloat64",
"float64": "sql.NullFloat64",
"string": "sql.NullString",
}
View Source
var GoTypeOpVales = map[string]string{
">": "0",
"!=": "\"\"",
}
View Source
var GoTypeOps = map[string]string{
"byte": ">",
"int8": ">",
"int16": ">",
"int32": ">",
"int": ">",
"int64": ">",
"float32": ">",
"float64": ">",
"string": "!=",
}
View Source
var MysqlToGoTypes = map[string]string{
"bit": "bool",
"tinyint": "byte",
"smallint": "int8",
"mediumint": "int16",
"int": "int",
"bigint": "int64",
"float": "float32",
"double": "float64",
"decimal": "float64",
"date": "time.Time",
"time": "string",
"year": "int8",
"datetime": "string",
"timestamp": "int64",
"char": "string",
"varchar": "string",
"tinytext": "string",
"mediumtext": "string",
"text": "string",
"longtext": "string",
"tinyblob": "byte[]",
"mediumblob": "byte[]",
"blob": "byte[]",
"longblob": "byte[]",
}
Functions ¶
This section is empty.
Types ¶
type CfgConfiguration ¶
type Configuration ¶
type Configuration struct { Module string OutputDir string Verbose bool IncludeTables []string Global *GlobalConfiguration Entity *EntityConfiguration MapperEnable bool Config *CfgConfiguration }
type EntityConfiguration ¶
type EntityConfiguration struct { PKG string TableToEntityStrategy StrategyType ColumnToFieldStrategy StrategyType FileNameStrategy StrategyType JSONTag bool JSONTagKeyStrategy StrategyType FieldIdUpper bool Comment bool FieldComment bool NamePrefix string NameSuffix string Orm bool }
type GlobalConfiguration ¶
type StrategyType ¶
type StrategyType string
Click to show internal directories.
Click to hide internal directories.