-
Notifications
You must be signed in to change notification settings - Fork 296
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
Word64 does not roundtrip through a database correctly #1552
Comments
MySQL have |
NorfairKing
changed the title
Word64 does not roundtrip through sqlite correctly
Word64 does not roundtrip through a database correctly
Sep 18, 2024
Related issue: #1095 And a potential fix #1096 I agree this is really unfortunate. I think we'd need to remove the instance for |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Reports
The
Word64
instance forPersistField
does not roundtrip through databases correctly.It uses
fromIntegral
for converting betweenWord64
andInt64
.While this does technically roundtrip, the database values will be silently wrong because negative values will be saved instead of positive ones.
Example:
This does technically roundtrip:
BUT the database will contain
-1
, which does not sort in the same way.Solutions
You could have another
PersistValue
constructor forWord64
, but I'm not sure if all the "supported" databases support such a type.As far as I can tell,
sqlite
supports larger integers by storing them asreal
s but I don't know about other databases:The text was updated successfully, but these errors were encountered: