Documentation ¶
Overview ¶
Package decimal implements a Decimal128 type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decimal128 ¶
type Decimal128 struct {
// contains filtered or unexported fields
}
Decimal128 holds decimal128 BSON values.
func NewDecimal128 ¶
func NewDecimal128(h, l uint64) Decimal128
NewDecimal128 creates a Decimal128 using the provide high and low uint64s.
func ParseDecimal128 ¶
func ParseDecimal128(s string) (Decimal128, error)
ParseDecimal128 takes the given string and attempts to parse it into a valid Decimal128 value.
func (Decimal128) GetBytes ¶
func (d Decimal128) GetBytes() (uint64, uint64)
GetBytes returns the underlying bytes of the BSON decimal value as two uint16 values. The first contains the most first 8 bytes of the value and the second contains the latter.
func (Decimal128) String ¶
func (d Decimal128) String() string
String returns a string representation of the decimal value.
Click to show internal directories.
Click to hide internal directories.