nulltypes

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 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) 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