nullable

package
v0.6.9 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Float64

type Float64 struct {
	sql.NullFloat64
}

func NewFloat64

func NewFloat64(i float64) Float64

func (Float64) Evaluated added in v0.5.24

func (i Float64) Evaluated() float64

func (*Float64) Scan

func (i *Float64) Scan(value interface{}) error

func (Float64) Value

func (i Float64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type Int32

type Int32 struct {
	sql.NullInt32
}

func NewInt32

func NewInt32(i int32) Int32

func (Int32) Evaluated added in v0.5.24

func (i Int32) Evaluated() int32

func (Int32) Value

func (i Int32) Value() (driver.Value, error)

Value implements the driver Valuer interface. The integer is converted to an int64 as Sql does not support int32 types

type Int64

type Int64 struct {
	sql.NullInt64
}

func NewInt64

func NewInt64(i int64) Int64

func (Int64) Evaluated added in v0.5.24

func (i Int64) Evaluated() int64

func (Int64) Value

func (i Int64) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type String

type String struct {
	sql.NullString
}

func NewString

func NewString(str string) String

func (String) Value

func (s String) Value() (driver.Value, error)

type Time

type Time struct {
	sql.NullTime
}

func NewTime added in v0.5.24

func NewTime(t time.Time) Time

func NewTimeFromUnix

func NewTimeFromUnix(unix int64) Time

func (Time) Evaluated added in v0.5.24

func (s Time) Evaluated() time.Time

func (Time) Unix

func (s Time) Unix() int64

func (Time) Value

func (s Time) 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