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

stop using unwrap() in value parsers #108

Closed
achristmascarl opened this issue Sep 28, 2024 · 4 comments · Fixed by #115
Closed

stop using unwrap() in value parsers #108

achristmascarl opened this issue Sep 28, 2024 · 4 comments · Fixed by #115
Labels
bug Something isn't working

Comments

@achristmascarl
Copy link
Owner

achristmascarl commented Sep 28, 2024

description

the value parsers for the db drivers uses unwrap a lot

proposed solution

maybe fall back to an empty string or something else to indicate if the type can't be cast to a string

@achristmascarl achristmascarl added the enhancement New feature or request label Sep 28, 2024
@platlas
Copy link

platlas commented Sep 29, 2024

I just tried with sqlite file saved from QGis and it crashed here:

let received: String = row.try_get_unchecked(col.ordinal()).unwrap();

on table that has column of type MULTIPOLYGON. I think sqlx does not support that type, but it would be nice if it just ignored those values and displayed other columns.

Edit: I had wrong line copied, should be fixed.

@achristmascarl achristmascarl added bug Something isn't working and removed enhancement New feature or request labels Sep 30, 2024
Copy link

github-actions bot commented Oct 3, 2024

Included in release v0.2.7

@achristmascarl
Copy link
Owner Author

@platlas let me know if you have a chance to test this with the MULTIPOLYGON type after the new release and if it still crashes 🙏

@platlas
Copy link

platlas commented Oct 3, 2024

It works now without crashes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants