I don't see a dedicated decoder for decimals in the Sqlite module docs. I also don't see a way to convert a different type of number to a decimal in roc's docs, so I'm a bit at a loss for how to store and retrieve decimal values from sqlite in roc.
I'll try to answer my own questions. There isn't a decimal decoder for Sqlite, but there is a U64 decoder. So as long as you don't need the full 128 bits of the Decimal type, you can decode a U64, use Num.to_u128 to cast to U128, then use Num.dec_from_bits to cast that to a Decimal.
Yeah I think it's a limitation in the old compiler - but probably not a priority to fix with the new compiler just around the corner.
Last updated: Feb 20 2026 at 12:27 UTC