postgres

package
v0.0.0-...-f418d51 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxIntegralDigits   = 131072 // max digits before the decimal point
	MaxFractionalDigits = 16383  // max digits after the decimal point
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Decimal

type Decimal struct {
	decimal.Decimal
}

func (*Decimal) Scan

func (d *Decimal) Scan(val interface{}) error

Scan implements sql.Scanner.

func (*Decimal) Value

func (d *Decimal) Value() (driver.Value, error)

Value implements driver.Valuer.

type LengthError

type LengthError struct {
	Part string // "integral" or "fractional"
	N    int    // length of invalid part
	// contains filtered or unexported fields
}

LengthError is returned from Decimal.Value when either its integral (digits before the decimal point) or fractional (digits after the decimal point) parts are too long for PostgresSQL.

func (LengthError) Error

func (e LengthError) Error() string

type NullDecimal

type NullDecimal struct {
	Decimal
	Valid bool
}

func (*NullDecimal) Scan

func (n *NullDecimal) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullDecimal) Value

func (n NullDecimal) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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