You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.
Currently storing BigNumbers as hexadecimal as prisma can only handle up to 53 bit integers, but the thing is that we cannot sort hexadecimals (i don't think?).
Maybe there is a way, but we certainly won't get anything reliable 'order_by' on these.
Not sure yet how to fix...
The text was updated successfully, but these errors were encountered:
but the thing is that we cannot sort hexadecimals (i don't think?)
yeah, unless we write a SCALE-encoded compact integer converter as a psql plugin, i don't think we can sort. psql also allows you to create your own data types, but I'm not sure if prisma exposes that.
postgresql handles up to u64, so if the runtime exposes u128 (like the current balance), then for lossless storage, our only way is to store hex strings/binary.
we could for now store them as u64 though, and wait for the day it breaks (which could happen in 5 months or 5 years or 50 years), but i'm willing to try that. Edit: no, prisma doesn't allow it
Currently storing BigNumbers as hexadecimal as prisma can only handle up to 53 bit integers, but the thing is that we cannot sort hexadecimals (i don't think?).
Maybe there is a way, but we certainly won't get anything reliable 'order_by' on these.
Not sure yet how to fix...
The text was updated successfully, but these errors were encountered: