Documentation ¶
Index ¶
- func DecimalFromString(s string) decimal.Decimal
- type NullBool
- type NullDate
- func (d NullDate) Day() int
- func (d NullDate) IsZero() bool
- func (d *NullDate) MarshalJSON() ([]byte, error)
- func (d NullDate) Month() time.Month
- func (d *NullDate) Scan(value interface{}) error
- func (d NullDate) T() time.Time
- func (d *NullDate) UnmarshalJSON(v []byte) error
- func (d NullDate) Value() (driver.Value, error)
- func (d NullDate) YMD() (year, month, day int)
- func (d NullDate) Year() int
- type NullDecimal
- type NullFloat64
- type NullInt0
- type NullIntM1
- type NullString
- type NullTime
- type NullUint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecimalFromString ¶
Types ¶
type NullBool ¶
type NullBool bool
NullBool is a bool that can be NULL (from DB)
type NullDate ¶
type NullDate string
func (*NullDate) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*NullDate) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
type NullDecimal ¶
func (NullDecimal) D ¶
func (d NullDecimal) D() decimal.Decimal
func (NullDecimal) MarshalJSON ¶
func (n NullDecimal) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*NullDecimal) Scan ¶
func (d *NullDecimal) Scan(value interface{}) error
func (*NullDecimal) UnmarshalJSON ¶
func (n *NullDecimal) UnmarshalJSON(v []byte) error
UnmarshalJSON implements json.Unmarshaler
type NullFloat64 ¶
type NullFloat64 float64
NullFloat64 is a float64 with the 0 value being nil (on sending to sql)
func (*NullFloat64) Scan ¶
func (n *NullFloat64) Scan(value interface{}) error
Scan implements the Scanner interface.
type NullInt0 ¶
type NullInt0 int
NullInt0 is a normal int (0 = nil)
type NullIntM1 ¶
type NullIntM1 int
NullIntM1 is a normal int (-1 = nil)
type NullString ¶
type NullString string
func (*NullString) Scan ¶
func (n *NullString) Scan(value interface{}) error
Scan implements the Scanner interface.
func (NullString) String ¶
func (n NullString) String() string
func (*NullString) UnmarshalJSON ¶
func (n *NullString) UnmarshalJSON(v []byte) error
UnmarshalJSON implements json.Unmarshaler
type NullTime ¶
func (NullTime) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*NullTime) UnmarshalJSON ¶
implements json.Unmarshaler
type NullUint64 ¶
type NullUint64 uint64
func (*NullUint64) Scan ¶
func (n *NullUint64) Scan(value interface{}) error
Scan implements the Scanner interface.
Click to show internal directories.
Click to hide internal directories.