Help us shape the future of Go! Take the 2026 Go Developer Survey

nulltypes

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullString

type NullString struct {
	sql.NullString
}

NullString is an alias for mysql.NullTime data type

func NewString

func NewString(s string, valid bool) NullString

NewString creates a new Time.

func (NullString) ForceString added in v0.14.0

func (ns NullString) ForceString() string

ForceString returns the string or empty string if not Valid

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

MarshalJSON for NullString

func (*NullString) SetNull

func (ns *NullString) SetNull()

SetNull sets the Valied filed to fals and zeros the string

func (*NullString) SetString

func (ns *NullString) SetString(str string)

SetString sets valid to tru and sets string field TODO: test these...

type NullTime

type NullTime struct {
	sql.NullTime
}

NullTime is an alias for mysql.NullTime data type

func NewTime

func NewTime(t time.Time, valid bool) NullTime

NewTime creates a new Time.

func (NullTime) Equal

func (n NullTime) Equal(c NullTime) bool

func (NullTime) MarshalJSON

func (nt NullTime) MarshalJSON() ([]byte, error)

MarshalJSON for NullTime

Jump to

Keyboard shortcuts

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