dbtypes

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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

func (NullFloat32) Value

func (this NullFloat32) Value() (driver.Value, 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

func (NullFloat64) Value

func (this NullFloat64) Value() (driver.Value, 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) Get added in v1.1.0

func (this NullInt16) Get() int16

func (NullInt16) IsNull added in v1.1.0

func (this NullInt16) IsNull() bool

func (NullInt16) MarshalJSON added in v1.1.0

func (this NullInt16) MarshalJSON() ([]byte, error)

func (*NullInt16) Scan added in v1.1.0

func (this *NullInt16) Scan(value interface{}) error

func (NullInt16) Set added in v1.1.0

func (this NullInt16) Set(v *int16)

func (NullInt16) UnmarshalJSON added in v1.1.0

func (this NullInt16) UnmarshalJSON(bytes []byte) error

func (NullInt16) Value added in v1.1.0

func (this NullInt16) Value() (driver.Value, error)

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) Get added in v1.1.0

func (this NullInt32) Get() int32

func (NullInt32) IsNull added in v1.1.0

func (this NullInt32) IsNull() bool

func (NullInt32) MarshalJSON

func (this NullInt32) MarshalJSON() ([]byte, error)

func (*NullInt32) Scan

func (this *NullInt32) Scan(value interface{}) error

func (NullInt32) Set

func (this NullInt32) Set(v *int32)

func (NullInt32) UnmarshalJSON added in v1.1.0

func (this NullInt32) UnmarshalJSON(bytes []byte) error

func (NullInt32) Value

func (this NullInt32) Value() (driver.Value, error)

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) Get added in v1.1.0

func (this NullInt64) Get() int64

func (NullInt64) IsNull added in v1.1.0

func (this NullInt64) IsNull() bool

func (NullInt64) MarshalJSON

func (this NullInt64) MarshalJSON() ([]byte, error)

func (*NullInt64) Scan

func (this *NullInt64) Scan(value interface{}) error

func (NullInt64) Set

func (this NullInt64) Set(v *int64)

func (NullInt64) UnmarshalJSON added in v1.1.0

func (this NullInt64) UnmarshalJSON(bytes []byte) error

func (NullInt64) Value

func (this NullInt64) Value() (driver.Value, error)

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) Get added in v1.1.0

func (this NullInt8) Get() int8

func (NullInt8) IsNull added in v1.1.0

func (this NullInt8) IsNull() bool

func (NullInt8) MarshalJSON

func (this NullInt8) MarshalJSON() ([]byte, error)

func (*NullInt8) Scan

func (this *NullInt8) Scan(value interface{}) error

func (NullInt8) Set

func (this NullInt8) Set(v *int8)

func (NullInt8) UnmarshalJSON added in v1.1.0

func (this NullInt8) UnmarshalJSON(bytes []byte) error

func (NullInt8) Value

func (this NullInt8) Value() (driver.Value, error)

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

func (NullString) Value

func (this NullString) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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