Open utterances-bot opened 3 years ago
目前有点bug,正在处理,有什么问题,可以在这留言
create_at 和 update_at 无法转换
很多数据类型都无法转换,时间,decimal
create_at 和 update_at 无法转换
感谢提出来,现在已经处理好了.你可以看看
很多数据类型都无法转换,时间,decimal
这个正在处理
很多数据类型都无法转换,时间,decimal
你提出的问题都已处理,还增加了:
你这个是json转go sql转go 有没有逆反过来的转换.
你这个是json转go sql转go 有没有逆反过来的转换.
这个没有,自己认为使用场景很少
字段类型后面可以不加 长度么 比如 id
int(10) UNSIGNED NOT NULL AUTO_INCREMENT, 不应该是 type:int(10) unsigned; 而是type:int unsigned;
索引能处理下吗,现在没有处理索引
gorm:"column:id;type:int(10) unsigned;primary_key;AUTO_INCREMENT" json:"id"
的自动递增应改到type 里面,要不不生效 gorm:"column:id;type:int(11) unsigned auto_increment;primary_key;comment:自增id" json:"id"
时间类型,default:null没有生成
似乎无法设置外键
要能支持生成索引就更好了
tinyint 类型的 转成 int8 或者 int32 就可以了, int 一般都是 int64,太大了
可以将 数据库列名 也输出出来吗?例如:
var BlacklistsColumns = struct {
ID string
Email string
Type string
CreatedAt string
UpdatedAt string
}{
ID: "id",
Email: "email",
Type: "type",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
sqlite是不是还没支持?
sqlite是不是还没支持?
还没有
在线工具:SQL转GORM Model - 潇洒哥和黑大帅 - Golang学习 - 英语学习
在线SQL转Golang Struct工具,SQL转GORM模型,SQL转Struct,SQL转Go
https://printlove.cn/tools/sql2gorm/