1
0
mirror of https://github.com/beego/bee.git synced 2025-07-05 18:20:18 +00:00

自动生成基于数据库的Hprose发布服务。

This commit is contained in:
Liujian
2014-10-14 21:30:32 +08:00
parent 7905d77f05
commit f75d8997ef
4 changed files with 1348 additions and 1 deletions

View File

@ -499,7 +499,13 @@ func (mysqlDB *MysqlDB) GetColumns(db *sql.DB, table *Table, blackList map[strin
// getGoDataType maps an SQL data type to Golang data type
func (*MysqlDB) GetGoDataType(sqlType string) (goType string) {
if v, ok := typeMappingMysql[sqlType]; ok {
var typeMapping = map[string]string{}
if isCreateHproseApp {
typeMapping = typeMappingMysqlOfRpc
} else {
typeMapping = typeMappingMysql
}
if v, ok := typeMapping[sqlType]; ok {
return v
} else {
ColorLog("[ERRO] data type (%s) not found!\n", sqlType)