decimal

package module
v0.0.0-...-1d36b5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 5 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(m *pgtype.Map)

Register registers the shopspring/decimal integration with a pgtype.ConnInfo.

func TryWrapNumericEncodePlan

func TryWrapNumericEncodePlan(value interface{}) (plan pgtype.WrappedEncodePlanNextSetter, nextValue interface{}, ok bool)

func TryWrapNumericScanPlan

func TryWrapNumericScanPlan(target interface{}) (plan pgtype.WrappedScanPlanNextSetter, nextDst interface{}, ok bool)

Types

type Decimal

type Decimal decimal.Decimal

func (Decimal) Float64Value

func (d Decimal) Float64Value() (pgtype.Float8, error)

func (Decimal) Int64Value

func (d Decimal) Int64Value() (pgtype.Int8, error)

func (Decimal) NumericValue

func (d Decimal) NumericValue() (pgtype.Numeric, error)

func (*Decimal) ScanFloat64

func (d *Decimal) ScanFloat64(v pgtype.Float8) error

func (*Decimal) ScanInt64

func (d *Decimal) ScanInt64(v pgtype.Int8) error

func (*Decimal) ScanNumeric

func (d *Decimal) ScanNumeric(v pgtype.Numeric) error

type NullDecimal

type NullDecimal decimal.NullDecimal

func (NullDecimal) Float64Value

func (d NullDecimal) Float64Value() (pgtype.Float8, error)

func (NullDecimal) Int64Value

func (d NullDecimal) Int64Value() (pgtype.Int8, error)

func (NullDecimal) NumericValue

func (d NullDecimal) NumericValue() (pgtype.Numeric, error)

func (*NullDecimal) ScanFloat64

func (d *NullDecimal) ScanFloat64(v pgtype.Float8) error

func (*NullDecimal) ScanInt64

func (d *NullDecimal) ScanInt64(v pgtype.Int8) error

func (*NullDecimal) ScanNumeric

func (d *NullDecimal) ScanNumeric(v pgtype.Numeric) error

type NumericCodec

type NumericCodec struct {
	pgtype.NumericCodec
}

func (NumericCodec) DecodeValue

func (NumericCodec) DecodeValue(tm *pgtype.Map, oid uint32, format int16, src []byte) (interface{}, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL