vanilla

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorFailedToCheckRecord = fmt.Errorf("failed to check record")
	ErrorRecordWasNotFound   = fmt.Errorf("record was not found")
	ErrorNoAffected          = fmt.Errorf("no affected")
	ErrorNoLastInsertId      = fmt.Errorf("no last insert id")
)

Functions

func IsJsonNull

func IsJsonNull(data []byte) bool

Types

type NullBool

type NullBool struct {
	sql.NullBool
}

func NewNullBool

func NewNullBool(ok bool) *NullBool

func (NullBool) MarshalJSON

func (null NullBool) MarshalJSON() ([]byte, error)

func (NullBool) Print

func (null NullBool) Print() string

func (NullBool) Ptr

func (nb NullBool) Ptr() (out *bool)

func (*NullBool) UnmarshalJSON

func (null *NullBool) UnmarshalJSON(data []byte) error

type NullInt

type NullInt struct {
	sql.NullInt64
}

func NewNullInt

func NewNullInt(i int) *NullInt

func NewNullInt64

func NewNullInt64(i int64) *NullInt

func (NullInt) Int

func (null NullInt) Int() int

func (NullInt) MarshalJSON

func (null NullInt) MarshalJSON() ([]byte, error)

func (NullInt) Print

func (null NullInt) Print() string

func (NullInt) Ptr

func (null NullInt) Ptr() (out *int)

func (*NullInt) UnmarshalJSON

func (null *NullInt) UnmarshalJSON(data []byte) error

type NullKeyValue

type NullKeyValue struct {
	KeyValue map[string]string
	Valid    bool
}

func NewNullMapStringString

func NewNullMapStringString(object map[string]string) *NullKeyValue

func (NullKeyValue) MarshalJSON

func (null NullKeyValue) MarshalJSON() ([]byte, error)

func (NullKeyValue) Print

func (null NullKeyValue) Print() string

func (*NullKeyValue) Scan

func (null *NullKeyValue) Scan(value interface{}) error

func (*NullKeyValue) UnmarshalJSON

func (null *NullKeyValue) UnmarshalJSON(data []byte) error

func (NullKeyValue) Value

func (null NullKeyValue) Value() (driver.Value, error)

type NullObject

type NullObject struct {
	Object map[string]interface{}
	Valid  bool
}

func NewNullObject

func NewNullObject(object map[string]interface{}) *NullObject

func (NullObject) MarshalJSON

func (null NullObject) MarshalJSON() ([]byte, error)

func (NullObject) Print

func (null NullObject) Print() string

func (*NullObject) Scan

func (null *NullObject) Scan(value interface{}) error

func (*NullObject) UnmarshalJSON

func (null *NullObject) UnmarshalJSON(data []byte) error

func (NullObject) Value

func (null NullObject) Value() (driver.Value, error)

type NullString

type NullString struct {
	sql.NullString
}

func NewNullString

func NewNullString(s string) *NullString

func (NullString) MarshalJSON

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

func (NullString) Print

func (null NullString) Print() string

func (NullString) Ptr

func (ns NullString) Ptr() (out *string)

func (*NullString) UnmarshalJSON

func (ns *NullString) UnmarshalJSON(data []byte) (err error)

type NullTime

type NullTime struct {
	sql.NullTime
}

func NewNullTime

func NewNullTime(t time.Time) *NullTime

func (NullTime) MarshalJSON

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

func (NullTime) Print

func (null NullTime) Print() string

func (NullTime) Ptr

func (nt NullTime) Ptr() (out *time.Time)

func (*NullTime) UnmarshalJSON

func (nt *NullTime) UnmarshalJSON(data []byte) error

type NullUint8

type NullUint8 struct {
	sql.NullByte
}

func NewNullUint8

func NewNullUint8(b uint8) *NullUint8

func (NullUint8) MarshalJSON

func (null NullUint8) MarshalJSON() ([]byte, error)

func (NullUint8) Print

func (null NullUint8) Print() string

func (NullUint8) Ptr

func (null NullUint8) Ptr() (out *uint8)

func (NullUint8) Uint8

func (null NullUint8) Uint8() uint8

func (*NullUint8) UnmarshalJSON

func (null *NullUint8) UnmarshalJSON(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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