github.com/ydb-platform/ydb-go-sdk/v3@v3.89.2/internal/decimal/type.go (about) 1 package decimal 2 3 import "math/big" 4 5 type Decimal struct { 6 Bytes [16]byte 7 Precision uint32 8 Scale uint32 9 } 10 11 func (d *Decimal) String() string { 12 v := FromInt128(d.Bytes, d.Precision, d.Scale) 13 14 return Format(v, d.Precision, d.Scale) 15 } 16 17 func (d *Decimal) BigInt() *big.Int { 18 return FromInt128(d.Bytes, d.Precision, d.Scale) 19 }