xorm
xorm copied to clipboard
关于 uint64@Mysql
复现
type A struct {
Id int64 xorm:"pk autoincr"
Test uint64
}
生成表以后
DBTool.DBEngine().Exec("REPLACE INTO a (test
) VALUES"+
"(?)", uint64(18446744073709551615))
执行会报错
Error 1264: Out of range value for column 'xxxx' at row xxx
how to fixed it?
I just find, use the UINT64_MAX value to insert the table, and the error is found: Error 1264: Out of range value for column 'xxx' at row 1 my table column defined with bigint(20) unsigned
I found the max value of integer can not be more than INT64_MAX