gravity icon indicating copy to clipboard operation
gravity copied to clipboard

decimal 数据类型精度丢失

Open x-ainger opened this issue 4 years ago • 1 comments

mysqlbatch: image 将 decimal 格式的数据,转换为 golang float64 类型,会导致精度丢失 此处可采用 "github.com/shopspring/decimal" decimal.Decimal{}

mysqlstream: 设置 go-mysql sync 参数:UseDecimal: true

x-ainger avatar Apr 20 '21 05:04 x-ainger

具体怎么丢失?直接写 mysql 应该没问题的。 序列化的话 json 本来就没有 decimal

Ryan-Git avatar Apr 21 '21 06:04 Ryan-Git