We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go
go version go1.19.4 linux/amd64
GoFrame
v2.2.5
Yes.
CREATE TABLE `demo` ( `id` BIGINT(20) UNSIGNED NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB ; INSERT INTO `demo` (`id`) VALUES (18446744073709551615);
package main import ( "github.com/gogf/gf/v2/frame/g" _ "github.com/gogf/gf/contrib/drivers/mysql/v2" ) func main() { r, e := g.DB().Model("demo").One() if e != nil { panic(e) } g.DumpWithType(r["id"].Val()) }
uint64(18446744073709551615) or uint(18446744073709551615)
int64(-9223372036854775808)
The text was updated successfully, but these errors were encountered:
查源码发现框架 *gdb.Core 的 ConvertValueForLocal 方法的 fieldType 参数依照 float(5,2), unsigned double(5,2), decimal(10,2), char(45), varchar(100), etc. 格式进行处理,但该参数的值来源于 *sql.ColumnType 类型的 DatabaseTypeName 方法,此方法只会返回 "VARCHAR", "TEXT", "NVARCHAR", "DECIMAL", "BOOL", "INT", and "BIGINT" 等格式的值。
float(5,2)
unsigned double(5,2)
decimal(10,2)
char(45)
varchar(100)
Sorry, something went wrong.
@xt-inking 感谢反馈,我先打上标签,后续跟进查看一下。
fix issue #2356
b64b295
#2428
b7badf5
559c1ab
gqcn
No branches or pull requests
1. What version of
Go
and system type/arch are you using?go version go1.19.4 linux/amd64
2. What version of
GoFrame
are you using?v2.2.5
3. Can this issue be re-produced with the latest release?
Yes.
4. What did you do?
5. What did you expect to see?
uint64(18446744073709551615)
or
uint(18446744073709551615)
6. What did you see instead?
int64(-9223372036854775808)
The text was updated successfully, but these errors were encountered: