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
[PostgreSQL] Obtaining Null values from varchar/text columns in DB results in Optional("") being returned #211
Comments
Reproduced, looking into it now. Thanks for the thorough bug report! |
Fixed in ZewoGraveyard/PostgreSQL@c009b18, tagged 0.14.1. Try |
Verified for the case: So, probably a bit better distinguish is required between NULL and ""... |
Reminder for self - need to add a check using |
Okay, really fixed this time. ZewoGraveyard/PostgreSQL@a3dbab5 @0.14.3 |
Optional("") returned where nil is expected
Based on TodoBackend project (https://github.com/Zewo/TodoBackend) I did very similar PSQL store for my project. When my model contains String? fields replicating the null-allowed text or varchar columns in DB, if I insert nil values when writing it to DB I expect the nil values to be returned by the get methods as well. DB correctly has NULL values in it, but values returned by get(id) or getAll() methods are Optional("") instead of nil.
Steps to reproduce
Expected: nil values are nil values in both and comparison succeeds.
Actual: nil values were replaced by Optional("")
My code:
Test results:
So I expect it to be reproducible there.
If not - please let me know and I will add more info.
The text was updated successfully, but these errors were encountered: