Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NullMap = map[string]string{
"int": "sql.NullInt64",
"string": "sql.NullString",
"float": "sql.NullFloat64",
"bool": "sql.NullBool",
}
NullMap is map that relates MySQL's null to Go's null(database/sql)
View Source
var TypeMap = map[string]string{
"tinyint(1)": "bool",
"int*unsigned": "uint",
"int": "int",
"float": "float64",
"varchar": "string",
"text": "string",
"datetime": "time.Time",
"timestamp": "time.Time",
"date": "time.Time",
}
TypeMap is map that relates MySQL's type to Go's type
Functions ¶
func FormatDAOName ¶ added in v1.1.0
func FormatInitialisms ¶ added in v1.1.0
FormatInitialisms returns string formated by common initialisms
func ToCamelCaseFromSnakeCase ¶ added in v1.1.0
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator has buffer of source code
func (*Generator) GenerateDAO ¶ added in v1.1.0
func (g *Generator) GenerateDAO(column repository.Column)
GenerateDAO makes a part of import packages and dao struct.
func (*Generator) GenerateHead ¶
GenerateHead makes common header
func (*Generator) GenerateMISC ¶ added in v1.1.0
GenerateMISC makes miscellaneous functions.
Click to show internal directories.
Click to hide internal directories.