Skip to content
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

Does the latest version not support Option single result? #521

Closed
LiangYaoHuo opened this issue May 5, 2024 · 4 comments
Closed

Does the latest version not support Option single result? #521

LiangYaoHuo opened this issue May 5, 2024 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@LiangYaoHuo
Copy link

image
提示异常:Some("系统异常:invalid type: map, expected a string")

@Issues-translate-bot Issues-translate-bot changed the title 现在最新版不支持Option单个结果了吗? Does the latest version not support Option single result? May 5, 2024
@zhuxiujia
Copy link
Member

你执行过cargo update 更新依赖了吗?

/// doc you can see https://rbatis.github.io/rbatis.io
#[sql("select max(id) from activity")]
async fn raw_sql(rb: &RBatis, delete_flag: &i32) -> String {
    impled!()
}
2024-05-06 22:24:36.0922484 [INFO] [rbatis] [630047694512984079] => `select max(id) from activity` [0]
"3"
2024-05-06 22:24:36.092448  [INFO] [rbatis] [630047694512984079] <= len=1,rows=[{"max(id)":"3"}]

@zhuxiujia zhuxiujia added the help wanted Extra attention is needed label May 6, 2024
@LiangYaoHuo
Copy link
Author

之前是4.5.11版本,cargo update更新了4.22版本后就不可以了,我看了更改记录,发现是4.20版本后decode.rs那里更改了导致的,然后就不支持解码Option这种类型了
1715010694225

@zhuxiujia zhuxiujia added the bug Something isn't working label May 7, 2024
@zhuxiujia
Copy link
Member

之前是4.5.11版本,cargo update更新了4.22版本后就不可以了,我看了更改记录,发现是4.20版本后decode.rs那里更改了导致的,然后就不支持解码Option这种类型了 1715010694225

嗯,已添加补丁代码,等下次新版本发布

@Issues-translate-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It used to be version 4.5.11, but cargo update stopped working after it was updated to version 4.22. I looked at the change record and found that it was caused by changes in decode.rs after version 4.20, and then the decoding Option type was no longer supported. ![1715010694225](https://private-user-images.githubusercontent.com/65275012/328238506-d9aa6e3f-9fd5-4a8a-9907-32f09ed3a5ed.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp XVCJ9..7BV4X3nFr7GCkC7oK_1gJsCrArGvfz3fYIMVg8_Hgl4)

Well, the patch code has been added, waiting for the next release of the new version

zhuxiujia added a commit that referenced this issue May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants