mirror of
https://github.com/beego/bee.git
synced 2024-11-25 20:10:55 +00:00
rename for clarity
This commit is contained in:
parent
99b99321e9
commit
b9ff4255ff
@ -41,7 +41,7 @@ type MvcPath struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// typeMapping maps SQL data type to corresponding Go data type
|
// typeMapping maps SQL data type to corresponding Go data type
|
||||||
var typeMapping = map[string]string{
|
var typeMappingMysql = map[string]string{
|
||||||
"int": "int", // int signed
|
"int": "int", // int signed
|
||||||
"integer": "int",
|
"integer": "int",
|
||||||
"tinyint": "int8",
|
"tinyint": "int8",
|
||||||
@ -665,7 +665,7 @@ func camelCase(in string) string {
|
|||||||
|
|
||||||
// getGoDataType maps an SQL data type to Golang data type
|
// getGoDataType maps an SQL data type to Golang data type
|
||||||
func getGoDataType(sqlType string) (goType string) {
|
func getGoDataType(sqlType string) (goType string) {
|
||||||
if v, ok := typeMapping[sqlType]; ok {
|
if v, ok := typeMappingMysql[sqlType]; ok {
|
||||||
return v
|
return v
|
||||||
} else {
|
} else {
|
||||||
fmt.Println("Error:", sqlType, "not found!")
|
fmt.Println("Error:", sqlType, "not found!")
|
||||||
|
Loading…
Reference in New Issue
Block a user