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 }}
Repository navigation
Add support for Mongo's Decimal128 data type #8840
Current Parse Server "Number" data type only supports numbers up to Mongo's double data type max value
Feature / Enhancement Description
Mongo 3.4 added support for Decimal128, adding support for it would allow servers to store numbers that they couldn't store before, all while keeping all query functions still working (afaik Decimal128 supports $gt, $gte, $lt, $lte, $eq, etc...)
Implementation I think would be very straightforward, the problem with this data type that it's not natively supported in all SDKs, so Parse Server would probably need to send the Decimal128 as a string in the Response and the SDK would need to convert the string back to a BigDecimal class (probably available in all languages)
Another problem is to find another alternative for Postgres, but I am no expert in Postgres so idk..
Example Use Case
I think any app that deals with monetary values need this data type, most blockchains use uint256 (max value of 2^256-1) for value representation...
Alternatives / Workarounds
You can store big numbers using strings right now, but that doesn't support number specific query functions...
How would you imagine to implement this? With a new { __type: "decimal128", value: "..." }? And what should the type be called, bigdecimal, decimal128,..?
Activity
parse-github-assistant commentedon Dec 25, 2023
Thanks for opening this issue!
mtrezza commentedon Dec 25, 2023
How would you imagine to implement this? With a new
{ __type: "decimal128", value: "..." }? And what should the type be called,bigdecimal,decimal128,..?feat: Add support for Decimal128 data type