Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 无,原名称copy abc => abc None = StrategyType("None") // 仅首字母大写 abc => Abc OnlyFirstLetterUpper = StrategyType("OnlyFirstLetterUpper") // 下划线转驼峰(首字母小写) a_b_c => aBC UnderlineToCamel = StrategyType("UnderlineToCamel") // 下划线转大写 a_b_c => ABC UnderlineToUpper = StrategyType("UnderlineToUpper") )
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": "string",
"time": "string",
"year": "int8",
"datetime": "string",
"timestamp": "string",
"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
ExcludeTables []string
Global *GlobalConfiguration
Model *ModelConfiguration
Mapper *MapperConfiguration
Config *CfgConfiguration
Predicate *PredicateConfiguration
Controller *ControllerConfiguration
Service *ServiceConfiguration
}
type ControllerConfiguration ¶
type ControllerConfiguration struct {
PKG string
NameStrategy StrategyType
VarNameStrategy StrategyType
RouteStrategy StrategyType
FileNameStrategy StrategyType
NamePrefix string
NameSuffix string
RoutePrefix string
RouteSuffix string
VarNamePrefix string
VarNameSuffix string
Comment bool
}
type GlobalConfiguration ¶
type MapperConfiguration ¶
type MapperConfiguration struct {
PKG string
NameStrategy StrategyType
VarNameStrategy StrategyType
FileNameStrategy StrategyType
NamePrefix string
NameSuffix string
VarNamePrefix string
VarNameSuffix string
Comment bool
Batis string
}
type ModelConfiguration ¶
type ModelConfiguration struct {
PKG string
TableToModelStrategy StrategyType
ColumnToFieldStrategy StrategyType
FileNameStrategy StrategyType
JSONTag bool
JSONTagStrategy StrategyType
FieldIdUpper bool
Comment bool
FieldComment bool
NamePrefix string
NameSuffix string
}
type PredicateConfiguration ¶
type ServiceConfiguration ¶
type ServiceConfiguration struct {
PKG string
NameStrategy StrategyType
VarNameStrategy StrategyType
FileNameStrategy StrategyType
NamePrefix string
NameSuffix string
VarNamePrefix string
VarNameSuffix string
Comment bool
}
type StrategyType ¶
type StrategyType string
Click to show internal directories.
Click to hide internal directories.