-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
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
[Question] Does gjson not implement the scan assignment interface of sql? #2895
Comments
@shuqingzai 这个建议好,欢迎一起来共建吧。 |
@shuqingzai This is a good suggestion. You are welcome to join us in building it together. |
Hello @shuqingzai. We like your proposal/feedback and would appreciate a contribution via a Pull Request by you or another community member. We thank you in advance for your contribution and are looking forward to reviewing it! |
这个似乎没办法实现因为,gjson这个结构体已经存在名字叫Scan的方法但是参数与Scanner接口中的Scan不同,但是golang并不支持方法的重写,所以想要实现相关功能可以自己声明一个结构体并嵌入gjson来实现相关功能 |
This seems impossible to implement because the gjson structure already has a method named Scan, but the parameters are different from Scan in the Scanner interface. However, golang does not support method rewriting, so if you want to implement related functions, you can declare a structure yourself. And embed gjson to implement related functions |
@chen-mou This is our current approach, but there will be problems |
我在阅读 gjson 源码时,发现并没有实现 database/sql 相关扫描赋值接口,导致我在设置值是,报错,是否可以实现这些常用的接口呢?
1. What version of
Go
and system type/arch are you using?#-> % go version go version go1.21.0 darwin/amd64
2. What version of
GoFrame
are you using?3. Can this issue be re-produced with the latest release?
是的
4. What did you do?
5. What did you expect to see?
6. What did you see instead?
The text was updated successfully, but these errors were encountered: