-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
rows.MapScan 方法是不是有BUG? #191
Comments
Sorry I can't reply in Chinese: It seems like your values are base64 encoded. This is likely done by the driver, or perhaps by some kind of middlewhere somewhere, if this is coming from the web. >>> "aXQgaXMgbXkgYmxvZw==".decode("base64")
'it is my blog'
>>> "eW91IGFyZSBvaz8=".decode("base64")
'you are ok?' Or in Go: b, _ := base64.StdEncoding.DecodeString("aXQgaXMgbXkgYmxvZw==")
fmt.Println(string(b)) This is not |
好的,我已经解决了这个问题。Thank you. The problem has been resolved. |
@panjunjie @jmoiron 俊杰,怎么解决的?我最近也碰到这个问题,numberic(14,3)就变成了[]byte类型了。。 |
@panjunjie 你是怎么解决这个问题的呀 |
解决了问题又不说解决方法,这种人真是自私,只想别人帮助自己,自己解决了就藏着掖着 |
解决方法在这里:#225 |
我从 PostgreSQL 数据库,读取几条数据,并使用 MapScan 填充 []map[string]interface{}{},character varying 字段输出的结果是不正确的,代码如下:
输出的结果如下:
[{"id":1,"title":"aXQgaXMgbXkgYmxvZw=="},{"id":2,"title":"eW91IGFyZSBvaz8="}]
但是实际上结果应该是:
[{"id":1,"title":"this is my article!"},{"id":2,"title":"are you ok?"}]
我这么使用,有什么问题吗?还是 sqlx 有bug?
The text was updated successfully, but these errors were encountered: