Reputation: 54
I am using InfluxDB and need to store very large numbers (uint256
) with full precision (no floating point).
I am currently using strings to achieve this, but I thus loose the ability to perform arithmetic operations on these numbers, which is something I need to implement.
ex.
{ _measurement=transfer, _field=amount, _value=90000000000000000000001 }
{ _measurement=transfer, _field=amount, _value=12000000000000000000000 }
from(bucket: "xxx")
|> range(start: 0)
|> filter(fn: (r) => r._measurement == "transfer" and r._field == "amount")
|> toUint()
|> sum()
I get the following error: runtime error @4:6-4:13: toInt: failed to evaluate map function: cannot convert string "90000000000000000000001" to int due to invalid syntax
Is there a built-in solution like ClickHouse's uint256, or a third-party package to achieve this?
Upvotes: 1
Views: 164