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
It's really useful for me to generate ORM from Mysql, but I just find "Decimal Data Type" is regarded as string/null.String. Is there any special reason for this? If no, I'm hoping to convert it to float64/null.Float64 like below:
case "double", "double precision", "real":
case "double", "double precision", "real", "decimal":
This was done because float64 can have precision errors when dealing with decimal values, which is particularly dangerous for financial code. You will need to do the conversions yourself for this, as there is no adequate storage in the stdlib to safely represent the decimal values yet, as far as I am aware.
Keep in mind that we've talked about a custom driver that would allow you to select your own data types here: https://github.com/vattle/sqlboiler/pull/102
We'll get to it but eventually but it's not on any immediate roadmaps as we're busy on other things atm.
It's really useful for me to generate ORM from Mysql, but I just find "Decimal Data Type" is regarded as string/null.String. Is there any special reason for this? If no, I'm hoping to convert it to float64/null.Float64 like below:
File : github.com/vattle/sqlboiler/bdb/drivers/mysql.go
Thanks!
Yu
The text was updated successfully, but these errors were encountered: