Documentation ¶
Index ¶
- func Ptr[T any](value T) *T
- func ZeroPtr[T comparable](value T) *T
- type ComparableText
- type Null
- type NullBool
- func (v NullBool[T]) Get() (value T, ok bool)
- func (v NullBool[T]) IsZero() bool
- func (v NullBool[T]) MarshalJSON() ([]byte, error)
- func (v NullBool[T]) MarshalText() ([]byte, error)
- func (v NullBool[T]) Or(value T) T
- func (v *NullBool[T]) Ptr() *T
- func (v *NullBool[T]) Set(value T)
- func (v NullBool[T]) Std() sql.NullBool
- func (v *NullBool[T]) UnmarshalJSON(data []byte) error
- func (v *NullBool[T]) UnmarshalText(data []byte) error
- type NullFloat
- func (v NullFloat[T]) Get() (value T, ok bool)
- func (v NullFloat[T]) IsZero() bool
- func (v NullFloat[T]) MarshalJSON() ([]byte, error)
- func (v NullFloat[T]) MarshalText() ([]byte, error)
- func (v NullFloat[T]) Or(value T) T
- func (v *NullFloat[T]) Ptr() *T
- func (v *NullFloat[T]) Set(value T)
- func (v NullFloat[T]) Std() sql.NullFloat64
- func (v *NullFloat[T]) UnmarshalJSON(data []byte) error
- func (v *NullFloat[T]) UnmarshalText(data []byte) error
- type NullInt
- func (v NullInt[T]) Get() (value T, ok bool)
- func (v NullInt[T]) IsZero() bool
- func (v NullInt[T]) MarshalJSON() ([]byte, error)
- func (v NullInt[T]) MarshalText() ([]byte, error)
- func (v NullInt[T]) Or(value T) T
- func (v *NullInt[T]) Ptr() *T
- func (v *NullInt[T]) Set(value T)
- func (v NullInt[T]) Std() sql.NullInt64
- func (v NullInt[T]) Std16() sql.NullInt16
- func (v NullInt[T]) Std32() sql.NullInt32
- func (v NullInt[T]) Std64() sql.NullInt64
- func (v *NullInt[T]) UnmarshalJSON(data []byte) error
- func (v *NullInt[T]) UnmarshalText(data []byte) error
- type NullString
- func (v NullString[T]) Get() (value T, ok bool)
- func (v NullString[T]) IsZero() bool
- func (v NullString[T]) MarshalJSON() ([]byte, error)
- func (v NullString[T]) MarshalText() ([]byte, error)
- func (v NullString[T]) Or(value T) T
- func (v *NullString[T]) Ptr() *T
- func (v *NullString[T]) Set(value T)
- func (v NullString[T]) Std() sql.NullString
- func (v *NullString[T]) UnmarshalJSON(data []byte) error
- func (v *NullString[T]) UnmarshalText(data []byte) error
- type NullText
- type NullTime
- func (v NullTime) Get() (value time.Time, ok bool)
- func (v NullTime) IsZero() bool
- func (v NullTime) MarshalJSON() ([]byte, error)
- func (v NullTime) MarshalText() ([]byte, error)
- func (v NullTime) Or(value time.Time) time.Time
- func (v *NullTime) Ptr() *time.Time
- func (v *NullTime) Set(value time.Time)
- func (v NullTime) Std() sql.NullTime
- func (v *NullTime) UnmarshalJSON(data []byte) error
- func (v *NullTime) UnmarshalText(data []byte) error
- type Text
- type Zero
- type ZeroBool
- func (v ZeroBool[T]) Get() (value T, ok bool)
- func (v ZeroBool[T]) IsZeroBool() bool
- func (v ZeroBool[T]) MarshalJSON() ([]byte, error)
- func (v ZeroBool[T]) MarshalText() ([]byte, error)
- func (v ZeroBool[T]) Or(value T) T
- func (v *ZeroBool[T]) Ptr() *T
- func (v *ZeroBool[T]) Set(value T)
- func (v ZeroBool[T]) Std() sql.NullBool
- func (v *ZeroBool[T]) UnmarshalJSON(data []byte) error
- func (v *ZeroBool[T]) UnmarshalText(data []byte) error
- type ZeroFloat
- func (v ZeroFloat[T]) Get() (value T, ok bool)
- func (v ZeroFloat[T]) IsZeroFloat() bool
- func (v ZeroFloat[T]) MarshalJSON() ([]byte, error)
- func (v ZeroFloat[T]) MarshalText() ([]byte, error)
- func (v ZeroFloat[T]) Or(value T) T
- func (v *ZeroFloat[T]) Ptr() *T
- func (v *ZeroFloat[T]) Set(value T)
- func (v ZeroFloat[T]) Std() sql.NullFloat64
- func (v *ZeroFloat[T]) UnmarshalJSON(data []byte) error
- func (v *ZeroFloat[T]) UnmarshalText(data []byte) error
- type ZeroInt
- func (v ZeroInt[T]) Get() (value T, ok bool)
- func (v ZeroInt[T]) IsZeroInt() bool
- func (v ZeroInt[T]) MarshalJSON() ([]byte, error)
- func (v ZeroInt[T]) MarshalText() ([]byte, error)
- func (v ZeroInt[T]) Or(value T) T
- func (v *ZeroInt[T]) Ptr() *T
- func (v *ZeroInt[T]) Set(value T)
- func (v ZeroInt[T]) Std() sql.NullInt64
- func (v ZeroInt[T]) Std16() sql.NullInt16
- func (v ZeroInt[T]) Std32() sql.NullInt32
- func (v ZeroInt[T]) Std64() sql.NullInt64
- func (v *ZeroInt[T]) UnmarshalJSON(data []byte) error
- func (v *ZeroInt[T]) UnmarshalText(data []byte) error
- type ZeroString
- func (v ZeroString[T]) Get() (value T, ok bool)
- func (v ZeroString[T]) IsZeroString() bool
- func (v ZeroString[T]) MarshalJSON() ([]byte, error)
- func (v ZeroString[T]) MarshalText() ([]byte, error)
- func (v ZeroString[T]) Or(value T) T
- func (v *ZeroString[T]) Ptr() *T
- func (v *ZeroString[T]) Set(value T)
- func (v ZeroString[T]) Std() sql.NullString
- func (v *ZeroString[T]) UnmarshalJSON(data []byte) error
- func (v *ZeroString[T]) UnmarshalText(data []byte) error
- type ZeroText
- type ZeroTime
- func (v ZeroTime) Get() (value time.Time, ok bool)
- func (v ZeroTime) IsZeroTime() bool
- func (v ZeroTime) MarshalJSON() ([]byte, error)
- func (v ZeroTime) MarshalText() ([]byte, error)
- func (v ZeroTime) Or(value time.Time) time.Time
- func (v *ZeroTime) Ptr() *time.Time
- func (v *ZeroTime) Set(value time.Time)
- func (v ZeroTime) Std() sql.NullTime
- func (v *ZeroTime) UnmarshalJSON(data []byte) error
- func (v *ZeroTime) UnmarshalText(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZeroPtr ¶
func ZeroPtr[T comparable](value T) *T
Types ¶
type ComparableText ¶
type ComparableText interface { comparable Text }
type NullBool ¶
func NewNullBool ¶
func NullBoolFrom ¶
func NullBoolFromPtr ¶
func (NullBool[T]) MarshalJSON ¶
func (NullBool[T]) MarshalText ¶
func (*NullBool[T]) UnmarshalJSON ¶
func (*NullBool[T]) UnmarshalText ¶
type NullFloat ¶
type NullFloat[T constraints.Float] struct { Value T Valid bool }
func NewNullFloat ¶
func NewNullFloat[T constraints.Float](value T, valid bool) NullFloat[T]
func NullFloatFrom ¶
func NullFloatFrom[T constraints.Float](value T) NullFloat[T]
func NullFloatFromPtr ¶
func NullFloatFromPtr[T constraints.Float](value *T) NullFloat[T]
func (NullFloat[T]) MarshalJSON ¶
func (NullFloat[T]) MarshalText ¶
func (NullFloat[T]) Std ¶
func (v NullFloat[T]) Std() sql.NullFloat64
func (*NullFloat[T]) UnmarshalJSON ¶
func (*NullFloat[T]) UnmarshalText ¶
type NullInt ¶
type NullInt[T constraints.Int] struct { Value T Valid bool }
func NewNullInt ¶
func NewNullInt[T constraints.Int](value T, valid bool) NullInt[T]
func NullIntFrom ¶
func NullIntFrom[T constraints.Int](value T) NullInt[T]
func NullIntFromPtr ¶
func NullIntFromPtr[T constraints.Int](value *T) NullInt[T]
func (NullInt[T]) MarshalJSON ¶
func (NullInt[T]) MarshalText ¶
func (*NullInt[T]) UnmarshalJSON ¶
func (*NullInt[T]) UnmarshalText ¶
type NullString ¶
func NewNullString ¶
func NewNullString[T ~string](value T, valid bool) NullString[T]
func NullStringFrom ¶
func NullStringFrom[T ~string](value T) NullString[T]
func NullStringFromPtr ¶
func NullStringFromPtr[T ~string](value *T) NullString[T]
func (NullString[T]) Get ¶
func (v NullString[T]) Get() (value T, ok bool)
func (NullString[T]) IsZero ¶
func (v NullString[T]) IsZero() bool
func (NullString[T]) MarshalJSON ¶
func (v NullString[T]) MarshalJSON() ([]byte, error)
func (NullString[T]) MarshalText ¶
func (v NullString[T]) MarshalText() ([]byte, error)
func (NullString[T]) Or ¶
func (v NullString[T]) Or(value T) T
func (*NullString[T]) Ptr ¶
func (v *NullString[T]) Ptr() *T
func (*NullString[T]) Set ¶
func (v *NullString[T]) Set(value T)
func (NullString[T]) Std ¶
func (v NullString[T]) Std() sql.NullString
func (*NullString[T]) UnmarshalJSON ¶
func (v *NullString[T]) UnmarshalJSON(data []byte) error
func (*NullString[T]) UnmarshalText ¶
func (v *NullString[T]) UnmarshalText(data []byte) error
type NullText ¶
func NewNullText ¶
func NullTextFrom ¶
func NullTextFromPtr ¶
func (NullText[T]) MarshalText ¶
func (*NullText[T]) UnmarshalText ¶
type NullTime ¶
func NullTimeFrom ¶
func NullTimeFromPtr ¶
func (NullTime) MarshalJSON ¶
func (NullTime) MarshalText ¶
func (*NullTime) UnmarshalJSON ¶
func (*NullTime) UnmarshalText ¶
type Text ¶
type Text interface { encoding.TextMarshaler encoding.TextUnmarshaler }
type Zero ¶
type Zero[T comparable] struct { Value T Valid bool }
func NewZero ¶
func NewZero[T comparable](value T, valid bool) Zero[T]
func ZeroFrom ¶
func ZeroFrom[T comparable](value T) Zero[T]
func ZeroFromPtr ¶
func ZeroFromPtr[T comparable](value *T) Zero[T]
func (Zero[T]) MarshalJSON ¶
func (*Zero[T]) UnmarshalJSON ¶
type ZeroBool ¶
func NewZeroBool ¶
func ZeroBoolFrom ¶
func ZeroBoolFromPtr ¶
func (ZeroBool[T]) IsZeroBool ¶
func (ZeroBool[T]) MarshalJSON ¶
func (ZeroBool[T]) MarshalText ¶
func (*ZeroBool[T]) UnmarshalJSON ¶
func (*ZeroBool[T]) UnmarshalText ¶
type ZeroFloat ¶
type ZeroFloat[T constraints.Float] struct { Value T Valid bool }
func NewZeroFloat ¶
func NewZeroFloat[T constraints.Float](value T, valid bool) ZeroFloat[T]
func ZeroFloatFrom ¶
func ZeroFloatFrom[T constraints.Float](value T) ZeroFloat[T]
func ZeroFloatFromPtr ¶
func ZeroFloatFromPtr[T constraints.Float](value *T) ZeroFloat[T]
func (ZeroFloat[T]) IsZeroFloat ¶
func (ZeroFloat[T]) MarshalJSON ¶
func (ZeroFloat[T]) MarshalText ¶
func (ZeroFloat[T]) Std ¶
func (v ZeroFloat[T]) Std() sql.NullFloat64
func (*ZeroFloat[T]) UnmarshalJSON ¶
func (*ZeroFloat[T]) UnmarshalText ¶
type ZeroInt ¶
type ZeroInt[T constraints.Int] struct { Value T Valid bool }
func NewZeroInt ¶
func NewZeroInt[T constraints.Int](value T, valid bool) ZeroInt[T]
func ZeroIntFrom ¶
func ZeroIntFrom[T constraints.Int](value T) ZeroInt[T]
func ZeroIntFromPtr ¶
func ZeroIntFromPtr[T constraints.Int](value *T) ZeroInt[T]
func (ZeroInt[T]) MarshalJSON ¶
func (ZeroInt[T]) MarshalText ¶
func (*ZeroInt[T]) UnmarshalJSON ¶
func (*ZeroInt[T]) UnmarshalText ¶
type ZeroString ¶
func NewZeroString ¶
func NewZeroString[T ~string](value T, valid bool) ZeroString[T]
func ZeroStringFrom ¶
func ZeroStringFrom[T ~string](value T) ZeroString[T]
func ZeroStringFromPtr ¶
func ZeroStringFromPtr[T ~string](value *T) ZeroString[T]
func (ZeroString[T]) Get ¶
func (v ZeroString[T]) Get() (value T, ok bool)
func (ZeroString[T]) IsZeroString ¶
func (v ZeroString[T]) IsZeroString() bool
func (ZeroString[T]) MarshalJSON ¶
func (v ZeroString[T]) MarshalJSON() ([]byte, error)
func (ZeroString[T]) MarshalText ¶
func (v ZeroString[T]) MarshalText() ([]byte, error)
func (ZeroString[T]) Or ¶
func (v ZeroString[T]) Or(value T) T
func (*ZeroString[T]) Ptr ¶
func (v *ZeroString[T]) Ptr() *T
func (*ZeroString[T]) Set ¶
func (v *ZeroString[T]) Set(value T)
func (ZeroString[T]) Std ¶
func (v ZeroString[T]) Std() sql.NullString
func (*ZeroString[T]) UnmarshalJSON ¶
func (v *ZeroString[T]) UnmarshalJSON(data []byte) error
func (*ZeroString[T]) UnmarshalText ¶
func (v *ZeroString[T]) UnmarshalText(data []byte) error
type ZeroText ¶
type ZeroText[T ComparableText] struct { Zero[T] }
func NewZeroText ¶
func NewZeroText[T ComparableText](value T, valid bool) ZeroText[T]
func ZeroTextFrom ¶
func ZeroTextFrom[T ComparableText](value T) ZeroText[T]
func ZeroTextFromPtr ¶
func ZeroTextFromPtr[T ComparableText](value *T) ZeroText[T]
func (ZeroText[T]) MarshalText ¶
func (*ZeroText[T]) UnmarshalText ¶
type ZeroTime ¶
func ZeroTimeFrom ¶
func ZeroTimeFromPtr ¶
func (ZeroTime) IsZeroTime ¶
func (ZeroTime) MarshalJSON ¶
func (ZeroTime) MarshalText ¶
func (*ZeroTime) UnmarshalJSON ¶
func (*ZeroTime) UnmarshalText ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.