Documentation ¶
Index ¶
- func ScaleBytes(s string, scale uint8) []byte
- type Decimal
- func (d Decimal) BigInt() big.Int
- func (d Decimal) Bytes() []byte
- func (d *Decimal) IsPositive() bool
- func (d *Decimal) SetInteger(integer uint32, ind uint8)
- func (d *Decimal) SetPositive(positive bool)
- func (d *Decimal) SetPrec(prec uint8)
- func (d *Decimal) SetScale(scale uint8)
- func (d Decimal) String() string
- func (d Decimal) ToFloat64() float64
- func (d Decimal) UnscaledBytes() []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ScaleBytes ¶
ScaleBytes converts a stringified decimal to a scaled byte slice
Types ¶
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
Decimal represents decimal type in the Microsoft Open Specifications: http://msdn.microsoft.com/en-us/library/ee780893.aspx
func Float64ToDecimal ¶
Float64ToDecimal converts float64 to decimal
func Float64ToDecimalScale ¶
Float64ToDecimalScale converts float64 to decimal; user can specify the scale
func Int64ToDecimalScale ¶
Int64ToDecimalScale converts float64 to decimal; user can specify the scale
func StringToDecimalScale ¶
StringToDecimalScale converts string to decimal
func (*Decimal) IsPositive ¶
IsPositive returns true if the Decimal is positive
func (*Decimal) SetInteger ¶
SetInteger sets the ind'th element in the integer array
func (*Decimal) SetPositive ¶
SetPositive sets the positive member
func (Decimal) UnscaledBytes ¶
UnscaledBytes converts decimal to a unscaled byte slice
Click to show internal directories.
Click to hide internal directories.