sql

package
v0.0.60 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullDuration

type NullDuration struct {
	Data time.Duration

	Valid bool // Valid is true if Data is not NULL
}

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

func (*NullDuration) Scan

func (nj *NullDuration) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (NullDuration) Value

func (nj NullDuration) Value() (driver.Value, error)

Value implements the driver.Valuer interface.

type NullJson

type NullJson struct {
	Data interface{} // must be set with a pointer to zero value of expect type

	Valid bool // Valid is true if Data is not NULL
}

NullJson represents an interface that may be null. NullJson implements the Scanner interface so it can be used as a scan destination, similar to sql.NullString. Deprecate, use go-nulljson instead. For more information, see: https://godoc.org/github.com/searKing/golang/tools/cmd/go-nulljson

func (*NullJson) Scan

func (nj *NullJson) Scan(src interface{}) error

Scan implements the sql.Scanner interface.

func (NullJson) Value

func (nj NullJson) 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