mongo-drivergo.mongodb.org/mongo-driver/bson/decimal Index | Files

package decimal

import "go.mongodb.org/mongo-driver/bson/decimal"

Index

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.

Source Files

decimal.go

Version
v0.0.15
Published
Sep 27, 2018
Platform
darwin/amd64
Imports
3 packages
Last checked
23 seconds ago

Tools for package owners.