Documentation ¶
Index ¶
- type NullFloat32
- func (this NullFloat32) Get() float32
- func (this NullFloat32) IsNull() bool
- func (this NullFloat32) MarshalJSON() ([]byte, error)
- func (this *NullFloat32) Scan(value interface{}) error
- func (this NullFloat32) Set(v *float32)
- func (this NullFloat32) UnmarshalJSON(bytes []byte) error
- func (this NullFloat32) Value() (driver.Value, error)
- type NullFloat64
- func (this NullFloat64) Get() float64
- func (this NullFloat64) IsNull() bool
- func (this NullFloat64) MarshalJSON() ([]byte, error)
- func (this *NullFloat64) Scan(value interface{}) error
- func (this NullFloat64) Set(v *float64)
- func (this NullFloat64) UnmarshalJSON(bytes []byte) error
- func (this NullFloat64) Value() (driver.Value, error)
- type NullInt16
- func (this NullInt16) Get() int16
- func (this NullInt16) IsNull() bool
- func (this NullInt16) MarshalJSON() ([]byte, error)
- func (this *NullInt16) Scan(value interface{}) error
- func (this NullInt16) Set(v *int16)
- func (this NullInt16) UnmarshalJSON(bytes []byte) error
- func (this NullInt16) Value() (driver.Value, error)
- type NullInt32
- func (this NullInt32) Get() int32
- func (this NullInt32) IsNull() bool
- func (this NullInt32) MarshalJSON() ([]byte, error)
- func (this *NullInt32) Scan(value interface{}) error
- func (this NullInt32) Set(v *int32)
- func (this NullInt32) UnmarshalJSON(bytes []byte) error
- func (this NullInt32) Value() (driver.Value, error)
- type NullInt64
- func (this NullInt64) Get() int64
- func (this NullInt64) IsNull() bool
- func (this NullInt64) MarshalJSON() ([]byte, error)
- func (this *NullInt64) Scan(value interface{}) error
- func (this NullInt64) Set(v *int64)
- func (this NullInt64) UnmarshalJSON(bytes []byte) error
- func (this NullInt64) Value() (driver.Value, error)
- type NullInt8
- func (this NullInt8) Get() int8
- func (this NullInt8) IsNull() bool
- func (this NullInt8) MarshalJSON() ([]byte, error)
- func (this *NullInt8) Scan(value interface{}) error
- func (this NullInt8) Set(v *int8)
- func (this NullInt8) UnmarshalJSON(bytes []byte) error
- func (this NullInt8) Value() (driver.Value, error)
- type NullString
- func (n NullString) Get() string
- func (n NullString) IsNull() bool
- func (this NullString) MarshalJSON() ([]byte, error)
- func (this *NullString) Scan(value interface{}) error
- func (n NullString) Set(v *string)
- func (this NullString) UnmarshalJSON(bytes []byte) error
- func (this NullString) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullFloat32 ¶
type NullFloat32 struct {
// contains filtered or unexported fields
}
NullFloat64 represents a float64 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullFloat32) Get ¶ added in v1.1.0
func (this NullFloat32) Get() float32
func (NullFloat32) IsNull ¶ added in v1.1.0
func (this NullFloat32) IsNull() bool
func (NullFloat32) MarshalJSON ¶
func (this NullFloat32) MarshalJSON() ([]byte, error)
func (*NullFloat32) Scan ¶
func (this *NullFloat32) Scan(value interface{}) error
func (NullFloat32) Set ¶
func (this NullFloat32) Set(v *float32)
func (NullFloat32) UnmarshalJSON ¶ added in v1.1.0
func (this NullFloat32) UnmarshalJSON(bytes []byte) error
type NullFloat64 ¶
type NullFloat64 struct {
// contains filtered or unexported fields
}
NullFloat64 represents a float64 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullFloat64) Get ¶ added in v1.1.0
func (this NullFloat64) Get() float64
func (NullFloat64) IsNull ¶ added in v1.1.0
func (this NullFloat64) IsNull() bool
func (NullFloat64) MarshalJSON ¶
func (this NullFloat64) MarshalJSON() ([]byte, error)
func (*NullFloat64) Scan ¶
func (this *NullFloat64) Scan(value interface{}) error
func (NullFloat64) Set ¶
func (this NullFloat64) Set(v *float64)
func (NullFloat64) UnmarshalJSON ¶ added in v1.1.0
func (this NullFloat64) UnmarshalJSON(bytes []byte) error
type NullInt16 ¶ added in v1.1.0
type NullInt16 struct {
// contains filtered or unexported fields
}
NullInt16 represents an int16 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullInt16) MarshalJSON ¶ added in v1.1.0
func (NullInt16) UnmarshalJSON ¶ added in v1.1.0
type NullInt32 ¶
type NullInt32 struct {
// contains filtered or unexported fields
}
NullInt32 represents an int64 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullInt32) MarshalJSON ¶
func (NullInt32) UnmarshalJSON ¶ added in v1.1.0
type NullInt64 ¶
type NullInt64 struct {
// contains filtered or unexported fields
}
NullInt64 represents an int64 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullInt64) MarshalJSON ¶
func (NullInt64) UnmarshalJSON ¶ added in v1.1.0
type NullInt8 ¶
type NullInt8 struct {
// contains filtered or unexported fields
}
NullInt8 represents an int64 that may be null.
NullInt64 implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
func (NullInt8) MarshalJSON ¶
func (NullInt8) UnmarshalJSON ¶ added in v1.1.0
type NullString ¶
type NullString struct {
// contains filtered or unexported fields
}
NullString represents a string that may be null.
NullString implements - encoding/json.Mashaller - encoding/json.Unmarshaller - sql.Scanner - sql/driver.Valuer
Example Usage:
var s NullString err := db.QueryRow("SELECT name FROM foo WHERE id=?", id).Scan(&s) ... if !s.IsNull() { // use s.Get() } else { // NULL value }
func (NullString) Get ¶ added in v1.1.0
func (n NullString) Get() string
func (NullString) IsNull ¶ added in v1.1.0
func (n NullString) IsNull() bool
func (NullString) MarshalJSON ¶
func (this NullString) MarshalJSON() ([]byte, error)
func (*NullString) Scan ¶
func (this *NullString) Scan(value interface{}) error
func (NullString) Set ¶
func (n NullString) Set(v *string)
func (NullString) UnmarshalJSON ¶ added in v1.1.0
func (this NullString) UnmarshalJSON(bytes []byte) error