ericlagergren

package
v0.0.0-...-3014034 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(typeMap *pgtype.Map)

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

func TryWrapNumericEncodePlan

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

func TryWrapNumericScanPlan

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

Types

type ComposeError

type ComposeError struct {
	Val interface{}
}

func (ComposeError) Error

func (e ComposeError) Error() string

type Decimal

type Decimal decimal.Big

func (*Decimal) Compose

func (d *Decimal) Compose(form byte, negative bool, coefficient []byte, exponent int32) error

ported from https://github.com/ericlagergren/decimal/blob/495c53812d05/decomposer.go#L76

func (*Decimal) Decompose

func (d *Decimal) Decompose(
	buf []byte,
) (form byte, negative bool, coefficient []byte, exponent int32)

ported from https://github.com/ericlagergren/decimal/blob/495c53812d05/decomposer.go#L43

func (Decimal) NumericValue

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

func (*Decimal) ScanNumeric

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

type NoPlanError

type NoPlanError struct{}

func (NoPlanError) Error

func (e NoPlanError) Error() string

type NumericCodec

type NumericCodec struct {
	pgtype.NumericCodec
}

func (NumericCodec) DecodeValue

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

type ScanError

type ScanError struct {
	Err error
}

func (ScanError) Error

func (e ScanError) Error() string

type ScanNumericError

type ScanNumericError struct {
	Val interface{}
}

func (ScanNumericError) Error

func (e ScanNumericError) Error() string

type TypeAssertError

type TypeAssertError struct{}

func (TypeAssertError) Error

func (e TypeAssertError) Error() string

Jump to

Keyboard shortcuts

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