Support for an arbitrary precision rational type in fields would be convenient - libGMP and num-bigrational provide solutions to this, and BigDecimal would not suffice as a solution for numbers like 1/3.
Describe the solution
I am unsure how SurrealDB implements storage, let alone how it binds to TiKV, and what those implications must be, which is why I think it might be reasonable for some data types to be exclusive to particular backends, depending on their capabilities.
Alternative methods
I imagine it would be possible to implement the same functionality provided by the mentioned libraries directly in the database using two decimals as the numerator and denominator, using a system similar to postgres domains to declare a type, and stored procedures to perform actions like GCD reduction of a fraction, things like that.
Contact Details
athan.clark@gmail.com
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
@athanclark I think this issues should be opened in the https://github.com/surrealdb/surrealdb. As this isn't docs related and more of a feature request I will close this issue here.
Is your feature request related to a problem?
Support for an arbitrary precision rational type in fields would be convenient - libGMP and num-bigrational provide solutions to this, and
BigDecimal
would not suffice as a solution for numbers like1/3
.Describe the solution
I am unsure how SurrealDB implements storage, let alone how it binds to TiKV, and what those implications must be, which is why I think it might be reasonable for some data types to be exclusive to particular backends, depending on their capabilities.
Alternative methods
I imagine it would be possible to implement the same functionality provided by the mentioned libraries directly in the database using two
decimals
as the numerator and denominator, using a system similar to postgres domains to declare a type, and stored procedures to perform actions like GCD reduction of a fraction, things like that.Contact Details
athan.clark@gmail.com
Is there an existing issue for this?
Code of Conduct