typex

package module
v0.0.0-...-bcb46c0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonText

type JsonText types.JSONText

JsonText is a types.JSONText, just for alias

type NullBool

type NullBool struct {
	sql.NullBool
}

NullString wraps sql.NullBool.

func NewNullBool

func NewNullBool(b bool) NullBool

NewNullBool will create a new NullBool.

type NullBytes

type NullBytes struct {
	Bytes []byte
	Valid bool
}

NullTime represents a []byte that may be null. NullBytes implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.

func NewNullBytes

func NewNullBytes(b []byte) NullBytes

NewNullBytes create a new NullBytes. It will check if the given bytes is valid.

func (*NullBytes) Scan

func (nb *NullBytes) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullBytes) Value

func (nb NullBytes) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullFloat

type NullFloat struct {
	sql.NullFloat64
}

NullFloat wraps sql.NullFloat64.

func NewNullFloat

func NewNullFloat(f float64) NullFloat

NewNullFloat will create a new NullFloat.

type NullInt

type NullInt struct {
	sql.NullInt64
}

NullInt wraps sql.NullInt.

func NewNullInt

func NewNullInt(i int64) NullInt

NewNullInt will create a new NullInt.

type NullJsonText

type NullJsonText types.NullJSONText

NullJsonText is a types.NullJSONText just for alias

func NewNullJsonText

func NewNullJsonText(m json.RawMessage) NullJsonText

NewNullJsonText will create a new NullJsonText.

type NullString

type NullString struct {
	sql.NullString
}

NullString wraps sql.NullString.

func NewNullString

func NewNullString(s string) NullString

NewNullString will create a new NullString.

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime represents a time.Time that may be null. NullTime implements the sql.Scanner interface so it can be used as a scan destination, similar to sql.NullString.

func NewNullTime

func NewNullTime(t time.Time) NullTime

NewNullTime create a new NullTime. It will check if the given time is valid.

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) 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