nulls

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 5, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64fromUint8s

func Float64fromUint8s(i []byte) float64

Types

type BitBool added in v0.3.20

type BitBool struct {
	Value bool
	Valid bool
}

BitBool is an implementation of a bool for the MySQL type BIT(1). This type allows you to avoid wasting an entire byte for MySQL's boolean type TINYINT.

func (*BitBool) MarshalJSON added in v0.3.20

func (b *BitBool) MarshalJSON() ([]byte, error)

MarshalJSON for BitBool

func (*BitBool) Scan added in v0.3.20

func (b *BitBool) Scan(value interface{}) error

Scan implements the sql.Scanner interface, and turns the bitfield incoming from MySQL into a BitBool

func (*BitBool) UnmarshalJSON added in v0.3.20

func (b *BitBool) UnmarshalJSON(v []byte) error

UnmarshalJSON for Bool

type BitToInt64 added in v0.1.7

type BitToInt64 struct {
	Value int64
	Valid bool
}

func (*BitToInt64) MarshalJSON added in v0.1.7

func (nt *BitToInt64) MarshalJSON() ([]byte, error)

MarshalJSON for Bool

func (*BitToInt64) Scan added in v0.1.7

func (nt *BitToInt64) Scan(value interface{}) error

func (*BitToInt64) UnmarshalJSON added in v0.1.7

func (nt *BitToInt64) UnmarshalJSON(b []byte) error

UnmarshalJSON for Bool

type Bool

type Bool struct {
	Value bool
	Valid bool
}

func (*Bool) MarshalJSON

func (nt *Bool) MarshalJSON() ([]byte, error)

MarshalJSON for Bool

func (*Bool) Scan

func (nt *Bool) Scan(value interface{}) error

func (*Bool) UnmarshalJSON

func (nt *Bool) UnmarshalJSON(b []byte) error

UnmarshalJSON for Bool

type Decimal

type Decimal struct {
	Value float64
	Valid bool
}

func (*Decimal) MarshalJSON

func (nt *Decimal) MarshalJSON() ([]byte, error)

MarshalJSON for Decimal

func (*Decimal) Scan

func (nt *Decimal) Scan(value interface{}) error

func (*Decimal) UnmarshalJSON

func (nt *Decimal) UnmarshalJSON(b []byte) error

UnmarshalJSON for Decimal

type Float64

type Float64 struct {
	Value float64
	Valid bool
}

func (*Float64) MarshalJSON

func (nt *Float64) MarshalJSON() ([]byte, error)

func (*Float64) Scan

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

func (*Float64) UnmarshalJSON

func (nt *Float64) UnmarshalJSON(b []byte) error

type Int64

type Int64 struct {
	Value int64
	Valid bool
}

func (*Int64) MarshalJSON

func (nt *Int64) MarshalJSON() ([]byte, error)

func (*Int64) Scan

func (nt *Int64) Scan(value interface{}) error

func (*Int64) UnmarshalJSON

func (nt *Int64) UnmarshalJSON(b []byte) error

type Numeric

type Numeric struct {
	Value float64
	Valid bool
}

func (*Numeric) MarshalJSON

func (nt *Numeric) MarshalJSON() ([]byte, error)

MarshalJSON for Numeric

func (*Numeric) Scan

func (nt *Numeric) Scan(value interface{}) error

func (*Numeric) UnmarshalJSON

func (nt *Numeric) UnmarshalJSON(b []byte) error

UnmarshalJSON for Numeric

type String

type String struct {
	Value string
	Valid bool
}

String is an alias for sql.String data type

func (*String) MarshalJSON

func (ns *String) MarshalJSON() ([]byte, error)

MarshalJSON for String

func (*String) Scan

func (ns *String) Scan(value interface{}) error

Scan implements the Scanner interface for String

func (*String) UnmarshalJSON

func (ns *String) UnmarshalJSON(b []byte) error

UnmarshalJSON for String

type Time

type Time struct {
	time.Time
	Valid bool
}

func (*Time) MarshalJSON

func (nt *Time) MarshalJSON() ([]byte, error)

MarshalJSON for Time

func (*Time) Scan

func (nt *Time) Scan(value interface{}) error

func (*Time) UnmarshalJSON

func (nt *Time) UnmarshalJSON(b []byte) error

UnmarshalJSON for Time

Jump to

Keyboard shortcuts

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