opt

package
v0.0.0-...-2f30d10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const JsonNullValue = "null"

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonNull

type JsonNull[T any] struct {
	JsonV T
	Set   bool
}

func NewJsonNull

func NewJsonNull[T any](t T) *JsonNull[T]

func (*JsonNull[T]) MarshalJSON

func (jn *JsonNull[T]) MarshalJSON() ([]byte, error)

func (*JsonNull[T]) UnmarshalJSON

func (jn *JsonNull[T]) UnmarshalJSON(b []byte) error

type JsonSqlNull

type JsonSqlNull[T SqlNullInf] struct {
	JsonNull[T]
	SqlNull[T]
}

func NewJsonSqlNull

func NewJsonSqlNull[T SqlNullInf](t T) *JsonSqlNull[T]

type Option

type Option[T any] struct {
	// contains filtered or unexported fields
}

func NewOption

func NewOption[T any](t T) *Option[T]

func (*Option[T]) Get

func (o *Option[T]) Get() (t T)

func (*Option[T]) IsSet

func (o *Option[T]) IsSet() bool

func (*Option[T]) Set

func (o *Option[T]) Set(t T)

type SqlNull

type SqlNull[T any] struct {
	SqlV  T
	Valid bool
}

func NewSqlNull

func NewSqlNull[T any](t T) *SqlNull[T]

func (*SqlNull[T]) Scan

func (sn *SqlNull[T]) Scan(value any) error

func (*SqlNull[T]) Value

func (sn *SqlNull[T]) Value() (driver.Value, error)

type SqlNullInf

type SqlNullInf interface {
	sql.Scanner
	driver.Valuer
}

Jump to

Keyboard shortcuts

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